[FlopCpp] Iterating over a solution variable and a domain.

Tim Hultberg Tim.Hultberg at eumetsat.int
Tue Jan 8 12:34:19 EST 2008


Some alternatives:
1. The display method of MP_variable does exactly this. See the examples.
2. Generally sets are indexed from 0 to size()-1
3. You might use forall to iterate over a domain, but then you will have to derive a class from Functor. I can show you how to do this if you want and give me the context.

Cheers, Tim

>>> yo yo <yoyovicks at yahoo.fr> 01/08/08 4:48 PM >>>
Hello,

I am trying to use flopcpp, so far the modelling works OK. Now I would like to dump the content of a solution variable. I cannot find any way to iterate over a variable and its domain. How can I do? I do not know the values of the index because they are generated automatically.
I would like to make a "for each" on my solution variables and write the value (with index) to somewhere else. Is this possible?

Thanks for your help.
YO.




      _____________________________________________________________________________ 
Ne gardez plus qu'une seule adresse mail ! Copiez vos mails vers Yahoo! Mail http://mail.yahoo.fr

_______________________________________________
FlopCpp mailing list
FlopCpp at list.coin-or.org
http://list.coin-or.org/mailman/listinfo/flopcpp




More information about the FlopCpp mailing list