Re: [AIMMS] How to use the idea of subset to input the values of parameters

15 views
Skip to first unread message

Leonardo Moraes

unread,
May 20, 2013, 4:20:49 PM5/20/13
to ai...@googlegroups.com
Zack,

smallvehicle and truck are subsets or binary parameters?

If they are subsets, so they should not be defined as smallvehicle(i) nor truck(i), but as smallvehicle and truck (without the car index i). Thus, supposing they are subsets of the original cars set, you should use:

carspeed(i | i in smallvehicle) := 40;
carspeed(i | i in truck) := 25;

But, if they are binary parameters, for instance, smallvehicle(i) = 1 represents car i is a smallvehicle, then you should use:

carspeed(i | smallvehicle(i)) := 40;
carspeed(i | truck(i)) := 25;

Best regards,

Leonardo.


2013/5/20 Zack Shih <short...@gmail.com>
Hi All:

In GAMS, a kind of function can be used to input the value of parameter.  

For ex:
parameter carspeed(i)   ## i is the no. of the car
carspeed(smallvehicle(i))=40;
carspeed(truck(i))=25;     
## smallvehicle(i) and truck(i) are subsets of cars 

My question is, does anyone know how to similar idea to input values of parameters in AIMMS?

Thanks!         

--
You received this message because you are subscribed to the Google Groups "AIMMS - The Modeling System" group.
To unsubscribe from this group and stop receiving emails from it, send an email to aimms+un...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Reply all
Reply to author
Forward
0 new messages