Page 1 of 1
if statement with constarints
Posted: Fri Jun 30, 2017 4:47 pm
In GAMS model, can I use 'if' statement in any constraint. Please tell me it is possible or not. If yes then please tell me syntax of that.
Re: if statement with constarints
Posted: Sat Jul 01, 2017 6:22 pm
You can't use if-constructs in constraints, but you can use the $-operator (see the manual for more information) in your constraints if the condition relates to a parameter (not to a variable):
Code: Select all
variable E(t), A(t), B(t);
E(t) =E= A(t)$(p(t)>0) + B(t)$(p(t) < 0);
Posted: Sun Jul 02, 2017 5:45 am
Could anyone tell what this error means, apparently syntax for calling algorithm seems correct and as follow
OPTION MINLP = LMLBOA ;
while error massage is attached in attachment, if more information is required to understand error please let me know.