Hi guys, i have a set j from j=1 to j=20 (j=1, 2, 3...20)
And i have a constraint:
const(j)... equation
But i need to apply this constraint just for specific j. In this const. just for j=1, j=4, j=7, j=10, j=13, j=16, j=19 (the last one plus 3)
How can i implement this?
Search found 4 matches
- 3 years ago
- Forum: Syntax
- Topic: Equation Domain Restriction
- Replies: 1
- Views: 1391
- 3 years ago
- Forum: Syntax
- Topic: Logical Syntax
- Replies: 2
- Views: 1954
Re: Logical Syntax
Paulo, We don't use strict inequalities in optimization. Google strict inequality math programming for a wealth of reasons why, perspectives, examples, etc. You could use a Big-M method: given a binary variable y, use x-y <= M * y y-x <= M * (1-y) if M is large enough, the constraint x-y<=0 is on w...
- 3 years ago
- Forum: Syntax
- Topic: Logical Syntax
- Replies: 2
- Views: 1954
Logical Syntax
Guys, how can i put a constraint with logical operator like:
const1.. (binaryvariable1= 1 and x(i)-y(i)<0) or (binaryvariable1=0 and x(i)-y(i)>)
I mean, i wish this constraint makes at least one of the conditions being satisfied.
const1.. (binaryvariable1= 1 and x(i)-y(i)<0) or (binaryvariable1=0 and x(i)-y(i)>)
I mean, i wish this constraint makes at least one of the conditions being satisfied.
- 3 years ago
- Forum: Modeling
- Topic: Modeling a logical condition in GAMS
- Replies: 0
- Views: 1686
Modeling a logical condition in GAMS
First of all i wish to tell that i am new in this forum so forgive me for any errors but i really need your help. I am currently doing my last academic work at the university on a MIP model about planning offloading operations on oil plataforms. I have a condition in my work i just dont know how to ...