help-glpk
[Top][All Lists]
Advanced

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

Re: [Help-glpk] [feature] defining sets of dynamic dimensions?


From: Yingjie Lan
Subject: Re: [Help-glpk] [feature] defining sets of dynamic dimensions?
Date: Sat, 17 Jul 2004 09:18:45 -0700 (PDT)

Corrections:

Sorry that in the sample code,
forall{} structure should be used 
to indicate simultanous conditions.
Below are the corrected code:

###################################
set ss:={
           s{1..2}:
           forall{i in 1..2} 
              sum{j in 1..i}s[j]<=i*cap
        };
###################################

The cool part for the second approach is that
it can be easily extended to any days:

#########################################
param horizon >0 integer;
set ss:={
           s{i in 1..horizon}:
             forall{i in 1..horizon}
               sum{j in 1..i}s[j] <=i*cap
        };
#########################################


Thanks,

Lan Yingjie


                
__________________________________
Do you Yahoo!?
Vote for the stars of Yahoo!'s next ad campaign!
http://advision.webevents.yahoo.com/yahoo/votelifeengine/





reply via email to

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