help-glpk
[Top][All Lists]
Advanced

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

[Help-glpk] Defining subset within a set in GMPL


From: D'Agostino, Larry - TX
Subject: [Help-glpk] Defining subset within a set in GMPL
Date: Tue, 21 Apr 2009 09:46:31 -0500

I could use some help with GMPL.  I’m trying to define a subset for an existing set.  I have defined the following.

 

 

param m;

/* scalar value */

 

set I := 1..m;

/* list of elements */

 

param r{i in I};

/* scalar value of elements I such that 0 <= r(i) <= 1 */

 

 

Now here is some pseudo code I would like to represent in GMPL

 

set NEW = set of( i in I, such that r[i]>0.85 )

 

 

How do I define the set NEW in GMPL? I suppose I could just create two sets and union them but it doesn’t seem very elegant and I would like to keep set I intact from 1..m

 

 

 

 

----------------------------------------------------

Larry D'Agostino

Operations Research Analyst

GMAC ResCap

W:  214.874.2411

M:  214.793.8614

Larry.D’address@hidden

 


reply via email to

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