Mip and Binary Operators

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Mip and Binary Operators

Fraley, Wyatt James

I am attempting to solve a linear program using the mip function, and I don't know how to get binary operators to function.  Here is my objective function.

z = 6x1 + 5x2 + 7x3 -190y1 - 150y2 - 110y3


All of the y variables are binary variables such that

yi = 0 if xi = 0

yi = 1 if xi > 0


I am not sure how to implement this, and any help would be appreciated.  I am familiar with the mip function and have used it many times before.


_______________________________________________
Help-octave mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/help-octave
Reply | Threaded
Open this post in threaded view
|

Re: Mip and Binary Operators

Francesco Potortì
>I am attempting to solve a linear program using the mip function, and I
>don't know how to get binary operators to function.  Here is my
>objective function.
>
>z = 6x1 + 5x2 + 7x3 -190y1 - 150y2 - 110y3
>
>All of the y variables are binary variables such that
>
>yi = 0 if xi = 0
>yi = 1 if xi > 0
>
>I am not sure how to implement this, and any help would be appreciated.
>I am familiar with the mip function and have used it many times before.

Have you looked at the glpk function of Octave?

--
Francesco Potortì (ricercatore)        Voice:  +39.050.621.3058
ISTI - Area della ricerca CNR          Mobile: +39.348.8283.107
via G. Moruzzi 1, I-56124 Pisa         Skype:  wnlabisti
(entrance 20, 1st floor, room C71)     Web:    http://fly.isti.cnr.it


_______________________________________________
Help-octave mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/help-octave