## Search found 7 matches

2 weeks ago
Forum: Syntax
Topic: conditional statement
Replies: 2
Views: 367

### Re: conditional statement

ok, thank you so much
2 weeks ago
Forum: Modeling
Topic: Modeling
Replies: 2
Views: 346

### Re: Modeling

Thank you so much
4 months ago
Forum: Syntax
Topic: conditional statement
Replies: 2
Views: 367

### 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...
4 months ago
Forum: Modeling
Topic: Modeling
Replies: 2
Views: 346

### 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...
1 year ago
Forum: Syntax
Topic: summation
Replies: 2
Views: 484

### Re: summation

Thank you so much. I figured it out. But I have another question!

sum((k),(sum((i),x(i,"c",k)* t(ibmp)\$ibmp(i))* N(k)) =L= 1420

ibmp(i) is a subset of i

1 year ago
Forum: Syntax
Topic: summation
Replies: 2
Views: 484

### 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 parameter: C(i) cost per ha of...
1 year ago
Forum: Syntax
Topic: Syntax error
Replies: 1
Views: 282

### 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....