I believe that it is not necessary to use function max.
For example if you have one variable with two dimensions P(N,T) and you want to find for every N the maximum price you can write
P(N,T) =l= K(N);
Τη ΠαÏασκευή, 30 ΑυγοÏστου 2013 7:30:40 μ.μ. UTC+3, ο χÏήστης Κωνσταντίνος ΠετÏίδης ÎγÏαψε:
hi Dax,
thank you for your helpful reply.
I will try to implement it.
Konstantinos
Τη ΠαÏασκευή, 30 ΑυγοÏστου 2013 10:18:18 Ï€.μ. UTC+3, ο χÏήστης dax ÎγÏαψε:
hi Konstantinos,
you might try :
EQ_XMAX(i) … Y =g= X(i) ;
EQ_SUMX … sum(i, X(i)*Z(i)) =e= Y ;
you need some convexity conditions on the objective function for this to work properly.
but if your model is “well behaved”, this should do the trick.
otherwise, you might want to give a try at DNLP solvers, which allow for explicit “MAX” in equations.
cheers
dax
Le jeudi 29 août 2013 16:28:37 UTC+2, Κωνσταντίνος ΠετÏίδης a écrit :
What I want to model is the following:
SUM(i,X(i)Z(i))=E=MAX(X(i));
set i /1100/
where X(i) is a continuous non negative variable and Z(i) is a binary variable.
Any ideas how to find the maximum of variables X(i) without using function MAX??
Τη Î Îμπτη, 29 ΑυγοÏστου 2013 10:48:11 Ï€.μ. UTC+3, ο χÏήστης Κωνσταντίνος ΠετÏίδης ÎγÏαψε:
Hello all,
is there a function that would compute the maximum of a variable?
I checked in GAMS manual and I found function max, but is used when my problem is anallyticaly written i.e max(x1, x2,…xn).
How can I find the max of x(i) ( in algebraic form)?
I wrote max(x(i)) which provides me with an error and I tried smax(i,x(i)) but this is for parameters only.
Any ideas?
Konstantinos
–
To unsubscribe from this group and stop receiving emails from it, send an email to gamsworld+unsubscribe@googlegroups.com.
To post to this group, send email to gamsworld@googlegroups.com.
Visit this group at http://groups.google.com/group/gamsworld.
For more options, visit https://groups.google.com/groups/opt_out.