Search found 8 matches

by saeid.jafarpour
1 year ago
Forum: Syntax
Topic: Using a variable in a equations condition
Replies: 4
Views: 4715

Re: Using a variable in a equations condition

Manassaldi wrote: 1 year ago Hello, I suggest you make a manually "big M" or convex hull reformulation or try with the indicator constraint. Best!
Hi
I have aleready tested big M but it didnt work.
Thanks for your help.
Saeid
by saeid.jafarpour
1 year ago
Forum: Syntax
Topic: Using a variable in a equations condition
Replies: 4
Views: 4715

Re: Using a variable in a equations condition

Hi, You can use the indicator constraint to achieve what you want for the variable condition in equations. And I just posted a question post here . If someone answers my post, I think you will be able to implement the indicator constraint through my small example! Cheers, Gabriel Hi Thanks for your...
by saeid.jafarpour
1 year ago
Forum: Syntax
Topic: Using a variable in a equations condition
Replies: 4
Views: 4715

Using a variable in a equations condition

hi i need to use variable Pm(m,MEG,t) in a equation condition term as illustrated bellow, however, it is not possible to use a variable in a equations condition. i wonder if there is any solution or trick for this problem. parameter numb(m) G(m,n) PDGmax(m) ; binary variable zz(m,t) ; variable Pm(m,...
by saeid.jafarpour
1 year ago
Forum: Solvers
Topic: Integer solutions
Replies: 2
Views: 2946

Re: Integer solutions

Sorry, one more question. Is it possible that if I set optcr=0, the model doesn't turn to optimal? In other words, does setting optcr=0 turn the integer solutions to optimal in any cases?
by saeid.jafarpour
1 year ago
Forum: Solvers
Topic: Integer solutions
Replies: 2
Views: 2946

Integer solutions

hi
when i run my mip model, the model status is code 8: integer solutions; however when I set optcr to 0 the model turn into optimal. in this situation can i assume that my model is global optimal?
by saeid.jafarpour
1 year ago
Forum: Modeling
Topic: Defining summation range
Replies: 4
Views: 2586

Re: Defining summation range

thank you.i fixed it!
This is the correct script of the equation
This is the correct script of the equation
image.png (2.11 KiB) Viewed 2491 times
by saeid.jafarpour
1 year ago
Forum: Modeling
Topic: Defining summation range
Replies: 4
Views: 2586

Re: Defining summation range

hi
actually i did lots of attemps.
This the code i wrote for the supposed equation
This the code i wrote for the supposed equation
image.png (1.84 KiB) Viewed 2538 times
And this is the error i keep getting!
And this is the error i keep getting!
by saeid.jafarpour
1 year ago
Forum: Modeling
Topic: Defining summation range
Replies: 4
Views: 2586

Defining summation range

hi
I'm quite newbie to the gams. I have a problem defining a limited range for a summation below:
the aforementioned summation
the aforementioned summation
image.png (9.4 KiB) Viewed 2586 times
image.png
please help me writing this equation properly.