Can linprog give an integer value of x's?

조회 수: 13 (최근 30일)
Andrew Alkiviades
Andrew Alkiviades 2012년 7월 2일
댓글: Seth DeLand 2014년 3월 17일
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

채택된 답변

Richard Brown
Richard Brown 2012년 7월 2일
No there isn't. Integer linear programming is a different beast. Perhaps this one from the file exchange might help:
Alternatively, I'm pretty sure there are matlab bindings available for glpk
  댓글 수: 2
Andrew Alkiviades
Andrew Alkiviades 2012년 7월 2일
thanks Richard I will give it a go!
Seth DeLand
Seth DeLand 2014년 3월 17일
As of R2014a, there's a new function "intlinprog" in Optimization Toolbox designed to solve such problems: http://www.mathworks.com/help/optim/ug/intlinprog.html

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Get Started with Optimization Toolbox에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by