# List comprehension of JuMP variables

**URL:** https://discourse.julialang.org/t/list-comprehension-of-jump-variables/62848
**Category:** Optimization (Mathematical)
**Tags:** jump
**Created:** [June 13, 2021, 5:49pm UTC](https://discourse.julialang.org/t/list-comprehension-of-jump-variables/62848 "2021-06-13T17:49:26Z")
**Posts on this page:** 1
**Showing post:** 8

<div class="post-metadata">

### Author: ![odow](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/odow/32/28685_2.png) [@odow](https://discourse.julialang.org/u/odow)
#### Post date: [June 13, 2021, 9:59pm UTC](https://discourse.julialang.org/t/list-comprehension-of-jump-variables/62848/8 "2021-06-13T21:59:49Z")

</div>

Hi there! Since you’re new to Julia, please read this post.

> [@Please read: make it easier to help you](https://discourse.julialang.org/t/please-read-make-it-easier-to-help-you/14757):
>
> Welcome to the Julia Discourse! We are enthusiastic about helping Julia programmers, both beginner and experienced. This public service announcement (PSA) outlines best practices when asking for help. Following these points makes it easier for us to help you and more likely you’ll get a prompt, useful answer. Keywords are highlighted to make it easier to refer to specific points. Choose a descriptive title that captures the key part of your question, eg “plots with multiple axes” instead of …

In particular, it’s easier to help if you provide a minimal working example that we can copy-paste and see the same result.

> but directly evaluated (0)

Presumably, there is a typo somewhere. I can’t say more because I can’t run your code. The direct equivalent of your Python constraint is:

```Julia
@constraint(
    model, 
    [i=1:I_round, k=1:K_window],
    sum(r_i_j[i, j] * y_i_k[i, k] * s_j_k[j, k] for j in 1:J) >= T1 * y_i_k[i, k],
)

```

---

_[View the full topic](https://discourse.julialang.org/t/list-comprehension-of-jump-variables/62848)._
