help-glpk
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Help-glpk] maximum function


From: Heinrich Schuchardt
Subject: Re: [Help-glpk] maximum function
Date: Sat, 20 Jun 2015 04:29:59 +0200

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 %f\n", max{t in T} p[t];
printf "The corresponding t is %d\n", min{t in T : p[t] == max{u in T} p[u]} t;
Best regards

Heinrich Schuchardt
 
 
 
Gesendet: Freitag, 19. Juni 2015 um 21:29 Uhr
Betreff: [Help-glpk] maximum function
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 is I don't know how and where to define "t in H"?
 
Thank you so much for your help :-)
 
Haroune
 

reply via email to

[Prev in Thread] Current Thread [Next in Thread]