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 08:56:46 -0700 (PDT)

Thanks for your feed back, certainly that has been
my concern as well. I really dislike the optimization
languages such as mExpress or something.

MathProg and AMPL are nice in that they are straight
forward, succinct, bueatiful: the purpose is that,
if you understand math, you can understand it.

But if you would like to look through the example
in the other email, you might find the new feature
 is not that bad :)


--- Pieter Lukasse <address@hidden> wrote:
>   I disagree. It seems to me you're suggesting GNU
> MathProg should be 
> more like a programming language, is that correct? I
> believe that 
> definition languages, like GNU MathProg, can be
> flexible, but should be 
> simple enough so they can easily be used as
> interface layers between 
> solvers and more advanced OR programs.
> 
> Well, that's my feedback (you don't have to agree
> with it :)  )
> 
> 
> 
> Yingjie Lan wrote:
> 
> >Hi,
> >
> >Please consider the following exampl:
> >
> >#############BEGIN CODE#################
> >param problem_dimension >0 integer;
> >param capacity >0 integer;
> >set state_space;
> >
> >if( problem_dimension == 1 ) then {
> >    let state_space := { 1..capacity };
> >}else if( problem_dimension == 2 ) then {
> >    let state_space := { 1..capacity, 
> >                         1..capacity };
> >}else if( problem_dimension == 3 ) then {
> >    let state_space := { 1..capacity,
> >                         1..capacity,
> >                         1..capacity };
> >}else ...
> >#############END CODE#################
> >
> >So, basically, what's going on here is defining 
> >an index set whose dimension is dynamic.
> >
> >Suppose we can support the following syntax:
> >
> >####################
> >  set state_space := 
> >    { 
> >        sc{i in 1..problem_dimension}: 
> >        sc[i] in 1..capacity 
> >    };
> >####################
> >
> >Here
> >##############################
> >sc{i in 1..problem_dimension}
> >##############################
> >
> >declares a dummy tuple 'sc' indexed on 
> >
> >##############################
> >i in 1..problem_dimension, 
> >##############################
> >
> >where 'i' is the dummy variable 
> >to index the dummy tuple 'sc'.
> >
> >Once we have defined it, we would also like to 
> >have similar syntax to reference the elements
> >in the dynamic-dimension set:
> >
> >##############################
> >  param cost{ 
> >    sc{1..problem_dimension} in state_space 
> >  }:= sum{ i in 1..problem_dimension} sc[i];
> >##############################
> >
> >It seems to me very challenging to have this 
> >feature integerated into the language, isn't it?
> >And it would certainly increase the power of 
> >the modeling language. I would appreciate any
> >feed back from you. Thanks!
> >
> >
> >             
> >__________________________________
> >Do you Yahoo!?
> >Yahoo! Mail is new and improved - Ch
> >eck it out!
> >http://promotions.yahoo.com/new_mail
> >
> >
> >_______________________________________________
> >Help-glpk mailing list
> >address@hidden
> >http://lists.gnu.org/mailman/listinfo/help-glpk
> >
> >
> 
> 
> 



                
__________________________________
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]