Can linprog give an integer value of x's?

Asked by Andrew Alkiviades on 2 Jul 2012
Latest activity Commented on by Andrew Alkiviades on 2 Jul 2012

Hi

I have a linprog code that has x1,x2,x3 and x4 in the objective function.

The results I get give me values in the form: x = 6.6667 0.0420 0 0

Which in the case I am trying to model doesn't make physical sense because the x's represent the number of units of a specific technology, and therefore for example 0.0420 doesn't in fact exist. Is there anyway to "force" linprog to find the optimum integer value of x?

Thank you

0 Comments

Andrew Alkiviades

Products

No products are associated with this question.

1 Answer

Answer by Richard Brown on 2 Jul 2012
Accepted answer

No there isn't. Integer linear programming is a different beast. Perhaps this one from the file exchange might help:

http://www.mathworks.com/matlabcentral/fileexchange/25259-linear-mixed-integer-program-solver

Alternatively, I'm pretty sure there are matlab bindings available for glpk

http://www.gnu.org/software/glpk/

1 Comment

Andrew Alkiviades on 2 Jul 2012

thanks Richard I will give it a go!

Richard Brown

Contact us