I have an NLP model in which I am trying to optimize a lot of interdependent variables. I need to put a condition in the model to force on a variable to be positive whenever another variable is positive. I am wondering someone could help me with the syntax.
Thanks
Search found 8 matches
- 5 years ago
- Forum: Syntax
- Topic: condition on two dependent variables
- Replies: 1
- Views: 2104
- 5 years ago
- Forum: Syntax
- Topic: conditional statement
- Replies: 2
- Views: 3266
Re: conditional statement
ok, thank you so much
Re: Modeling
Thank you so much
- 6 years ago
- Forum: Syntax
- Topic: conditional statement
- Replies: 2
- Views: 3266
conditional statement
Hello, I want to create a parameter as below: Parameter di(b) dummy for BMPs; if(l.x2(rt,of,b)GT 0); di(b)=1; else di(b)=0; )); x2(rt,of,b) is one of my variables. But, I get errors as below: Parameter 528 529 di(b) dummy variable for BMPs; 530 if(l.x2(rt,of,b)GT 0); **** $142$149,149,149,148,135,10...
Modeling
Hello, I have a farm multi-objective maximization problem, in which I am maximizing the profit and the nitrogen reduction using farm best practice management. I have variable x2(rt,of,b) the hectares of each crop, which is dimensioned on three sets, rt( crop rotation), of(the type of the crop, for e...
Re: summation
Thank you so much. I figured it out. But I have another question!
I wrote the following sum but I got $140 error. would you please help me!
sum((k),(sum((i),x(i,"c",k)* t(ibmp)$ibmp(i))* N(k)) =L= 1420
ibmp(i) is a subset of i
Thanks in advance
I wrote the following sum but I got $140 error. would you please help me!
sum((k),(sum((i),x(i,"c",k)* t(ibmp)$ibmp(i))* N(k)) =L= 1420
ibmp(i) is a subset of i
Thanks in advance
summation
Hello I defined 3sets for my model. Now I need to add a term to my OBJ function which is the sum of a sum . these are my sets: sets i "option" /p,b,s,d,f,1,2,3,4,5,6,7,8,9,10,11,12/ j "products" /c,l,m/ k "type of product" /1,2,3,4,5,6,7,8,9,10,11,12,13,14/; this is my ...
- 6 years ago
- Forum: Syntax
- Topic: Syntax error
- Replies: 1
- Views: 2372
Syntax error
Hello I m writing a simple farm profit maximization model. I wrote the simple form and I got the answer which means that the model works, but when I used set notation to define variables I got many Syntax errors. Below is the model. would you please help me? I cannot understand where is the problem....