how to find maximum value or minimum value of a parameter

Hi all,

I would like to ask a question,for example :

set i /p1*p4/;

parameter a(i)/

p1 2
p2 3
p3 4
p5 5 /;

how can I write an general form to express the maximum value of a(i)?

need your help!

Best regards
–~–~---------~–~----~------------~-------~–~----~
To post to this group, send email to gamsworld@googlegroups.com
To unsubscribe from this group, send email to gamsworld+unsubscribe@googlegroups.com
For more options, visit this group at http://groups.google.com/group/gamsworld?hl=en
-~----------~----~----~----~------~----~------~–~—

\

smax(i,a(i))

  • Yogendra.


    On Thu, May 21, 2009 at 1:46 PM, Jens wrote:


    Hi all,

I would like to ask a question,for example :

set i /p1*p4/;

parameter a(i)/

p1 2
p2 3
p3 4
p5 5 /;

how can I write an general form to express the maximum value of a(i)?

need your help!

Best regards



–~–~---------~–~----~------------~-------~–~----~
To post to this group, send email to gamsworld@googlegroups.com
To unsubscribe from this group, send email to gamsworld+unsubscribe@googlegroups.com
For more options, visit this group at http://groups.google.com/group/gamsworld?hl=en
-~----------~----~----~----~------~----~------~–~—

It works. thank you all !!

On May 21, 8:51 pm, Renger van Nieuwkoop
wrote:

smax(i,a(i))
cheers
Renger

-----Original Message-----
From: gamsworld@googlegroups.com [mailto:gamsworld@googlegroups.com] On

Behalf Of Jens
Sent: Thursday, May 21, 2009 8:47 PM
To: gamsworld
Subject: how to find maximum value or minimum value of a parameter

Hi all,

I would like to ask a question,for example :

set i /p1*p4/;

parameter a(i)/

p1 2
p2 3
p3 4
p5 5 /;

how can I write an general form to express the maximum value of a(i)?

need your help!

Best regards- Hide quoted text -