[FlopCpp] Index of the constraint

Tim Hultberg Tim.Hultberg at eumetsat.int
Sun Oct 11 04:30:45 EDT 2015


Hi,

the mailing list is not used very often, but you picked the right one. 

I can try to help if you send me the full example that you say compiles. (are you sure that MP_constraint hh(i,4,dim+1); compiles? It shouldn't)

Anyway I can see a problem in the next lines. The constraints in Flopc++ are symbolic expression trees - the actual coefficients are only generated at the end. Therefore when you write
hh(i, n, dim + 1) = ...
hh(i, m, dim + 1) = ...
only the last expression is kept. (for the same reason a for loop does not seem to be the way to go) Maybe a solution to your problem is simply to have two different symbolic constraints.

Cheers, Tim

________________________________________
From: FlopCpp [flopcpp-bounces at coin-or.org] On Behalf Of Guyves Achtari [11ga10 at queensu.ca]
Sent: 10 October 2015 00:39
To: flopcpp at list.coin-or.org
Subject: [FlopCpp] Index of the constraint

Hi,

It seems like this mailing list is inactive. I have the following question. Perhaps someone can redirect me to the right group:

Using Flopc++, I would like to create sub sets that I can use for multiple constraints:

Example constraint:

MP_constraint

hh(i,4,dim+1);


hh(i, n, dim + 1) = h(n, dim + 1) == c(i, n, dim + 2) - c(i, n + 1, dim + 2) ;

hh(i, m, dim + 1) = h(m, dim + 1) == c(i, m, dim + 2) - c(i, m + 1, dim + 2) ;

with for example n between [0..1] and m[2..3]. Is this possible?

If not, can I simply use a for loop? It seems to compile but the results are not coherent..

Thanks for any suggestions..

Best,

G

Any email message from EUMETSAT is sent in good faith but shall neither be binding nor construed as constituting a commitment by EUMETSAT, except where provided for in a written agreement or contract or if explicitly stated in the email. Please note that any views or opinions presented in this email are solely those of the sender and do not necessarily represent those of EUMETSAT. This message and any attachments are intended for the sole use of the addressee(s) and may contain confidential and privileged information. Any unauthorised use, disclosure, dissemination or distribution (in whole or in part) of its contents is not permitted. If you received this message in error, please notify the sender and delete it from your system.



More information about the FlopCpp mailing list