# Variable statement

**URL:** <https://discourse.julialang.org/t/variable-statement/45174>\
**Category:** Optimization (Mathematical)\
**Created:** [August 18, 2020, 6:36pm UTC](https://discourse.julialang.org/t/variable-statement/45174 "2020-08-18T18:36:52Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![mamo](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mamo/32/25591_2.png) [@mamo](https://discourse.julialang.org/u/mamo)\
**Post date:** [August 18, 2020, 6:36pm UTC](https://discourse.julialang.org/t/variable-statement/45174/1 "2020-08-18T18:36:52Z")

</div>

**‘’‘@variable(model,PRDint[o in O, f in F, p in P[f],j in U, t in TIME], lower\_bound=0, upper\_bound=1000, Int)’‘’**

‘’‘@variable(model,PRD[o in O,f in F, p in P[f], j in U, t in TIME, o\<=23 && f\<=13 && p\<=45]==PRDint[o,f,p,j,t]\*bsize[f,p])’‘’’

bsize{f in F, p in P[f]} - parameter

Variable PRDint is used to force variable PRD to take values whom division with bsize gives 0 residual.

Is this a proper statement in Julia?

Thanks.  
marco

---

<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:** [August 18, 2020, 8:18pm UTC](https://discourse.julialang.org/t/variable-statement/45174/2 "2020-08-18T20:18:58Z")

</div>

It’s easier to help if you follow the advice I gave earlier:

> [@Error in constraint statement](https://discourse.julialang.org/t/error-in-constraint-statement/45088/2):
>
> Please take the time to read the first post of [Please read: make it easier to help you - #81](https://discourse.julialang.org/t/psa-make-it-easier-to-help-you/14757/81). You should format your code properly, and provide a minimal working example.
