Hello Haroune,
the example below shows how to use the iterated form of the max and min functions.
set T := { 1 .. 10 };
param p{t in T} := sin(t);
display p;
printf The maximum value of p[t] is %fn, max{t in T} p[t];
printf The corresponding t is %dn, min{t in T : p[t] == max{u in T} p[u]}
Hello everyone!
I need your help please. Is it possible to get the maximum of a variable only
in one of her dimension?
For example : I have the variable X[i,j,t] and I want to define something like
that (after the optimisation) :
param Xmax {i in A, j in B} := max {X[i,j,t]}.
The problem
Hi!
Sorry, if I misunderstood something but:
if X is a variable, Xmax can not be a parameter.
If it is just a typo, You can simply do this if the Xmax variables have
a positive coefficient in the objective (considering minimization).
var Xmax{i in A, j in B};
s.t. MaxXmax{i in A, j in B, t