[FlopCpp] Accessing individual MP_Variables from a Set of MP_Variables

Tim Hultberg Tim.Hultberg at eumetsat.int
Tue Aug 28 12:17:01 EDT 2007


Hi,

I am afraid this is not possible at the moment. The MP_variable only
has one variable type, not an array.

Please post a ticket if you havent done it already, and I will
implement it (when I get time)

Cheers, Tim


>>> Dharmashankar Subramanian <dharmash at us.ibm.com> 28/08/2007 17:46
>>>
Hi Tim,
I have the following problem.

Say, I have a MP_Subset, that is indexed over two MP_sets.

s3_subset =new MP_subset<2>(s1, s2)

where, s1 and s2 are two MP_sets.

2.    Next, I define MP_variables over s3_subset, using the syntax:

Y= new MP_variable((*s3_subset))

3.     Next, I want to set the underlying individual variables in Y, to
be 
binary for some, and continuous (with corresponding Lower Bounds/Upper

Bounds) for others. 
I want to do this, based on the indices (corresponding to s1 and s2).


Example:
s1 = {1, 2}
s2 = {a, b}
s3_subset = { (1, a), (1, b), (2, a)}

Now, I want:
Y((1,a)) to be continuous with LB = 0, UB = Infinity.
Y((1,b)) and Y((2, a)) to be Binary.



My question is:
How do I do the above?
The Interface file for MP_Varibale doesn't seem to let me access the 
underlying variables, in Y, individually.






Thanks,
Shankar
-------------------------------------------------------------
Dharmashankar Subramanian
Research Staff Member, 
Analytic Models & Architecture
Math Sciences Department
Route 134, IBM T.J. Watson Research Center,
Yorktown Heights, NY 10598
Phone: 914-945-1588


More information about the FlopCpp mailing list