On 2014-12-11, pegah Ali <[email protected]> wrote:
> ------=_Part_141_146171712.1418307564716
> Content-Type: multipart/alternative; 
>       boundary="----=_Part_142_2134155063.1418307564716"
>
> ------=_Part_142_2134155063.1418307564716
> Content-Type: text/plain; charset=UTF-8
>
> Hello everybody,
>
> I am new to sage and try to solve the following LP with 
> MixedIntegerLinearProgram:
>
>          
>  
> Maximization:
>   3.0 x_0 + 2.0 x_1 - 1.0 x_2
> Constraints:
>   (x_0, x_1, x_2) in {(4.0,5.0,6.0), (1.0,2.0,3.0), (9.0,5.0,2.0)}
>
>
> How can I define MixedIntegerLinearProgram to solve my problem? 
First, you need to declare your variables integer; then
you can formulate your constraints on x_0 and x_1 as linear inequalities
(e.g. 4<=x_0<=6), but you'd have to work harder for x_2;
say, you can set x_2==9*x_3+5*x_4+2*x_5, and
further specify that x_3,4,5 are binary and sum up to 1.

HTH.
>
>
> Thank you for your help
>
> Regards
>

-- 
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sage-support.
For more options, visit https://groups.google.com/d/optout.

Reply via email to