[FlopCpp] Constraint Names and Limited Row Creation by Subset
Shigeru Tsubakitani
stsubakitani at neomeshsolutions.com
Sun Feb 10 19:53:09 EST 2008
I have two questions.
1. How do you print user-specified row and column names rather than "cons1,
cons2 ." for row names and "x1, x2 ." for column names in the matrix file
when you use a matrix print command such as
"MP_model::getDefaultModel()->Solver->WriteLp();"? The setName() method
does not work for this.
2. How do you generate rows only for index combinations defined in a subset?
In the following example, I want to create a row only for (0, 0), but it
creates rows for all 4 index combinations.
MP_set A(2), B(2);
MP_subset<2> AB(A, B);
AB.insert(0, 0);
MP_index a, b;
MP_variable x(A, B);
MP_constraint rTest(A, B);
rTest(a, b).such_that( AB(a, b)) = x(a, b) == 1;
Thanks for your help in advance.
Shigeru
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://list.coin-or.org/pipermail/flopcpp/attachments/20080210/38107303/attachment.html
More information about the FlopCpp
mailing list