Sets as sequences: Ordered Sets BUT for Variable definition

7 views
Skip to first unread message

Kyle

unread,
May 24, 2012, 1:33:14 AM5/24/12
to gamsworld
Hi,

Does anyone know how define an ordered variable limit e.g. I'm
currently defining Ip as:

variables

Ip(i);

Ip.lo('R1') = 0.06842398 ;
Ip.lo('R2') = 0.092937045 ;
Ip.lo('R3') = 0.178932378 ;
Ip.lo('R4') = 0.085610156 ;
Ip.lo('R5') = 0.076745965 ;

I'd like to define it like this:

variables

Ip(i);

Ip.lo(i)
/0.06842398
0.092937045
0.178932378
etc.../

But this syntax isn't correct. Does anyone know the correct syntax?
I've checked the user manual but I can't find it.

Thanks,
Kyle

A.R. Bahari

unread,
May 24, 2012, 3:19:27 AM5/24/12
to gams...@googlegroups.com
Hi dear Kyle
yo can do it in a little different way as:
Parameter
LoweBound(i)   lower bound for lp
/R1   0.06842398
 R2   0.092937045
 R3  0.178932378
etc.../;

Variables
Ip(i);

lp.Lo(i)=LowerBound(i);

I hope this will be useful


--
You received this message because you are subscribed to the Google Groups "gamsworld" group.
To post to this group, send email to gams...@googlegroups.com.
To unsubscribe from this group, send email to gamsworld+...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/gamsworld?hl=en.


Reply all
Reply to author
Forward
0 new messages