How to deal with integer linear programming when constant in the objective function is based on solution
Show older comments
Dear Community Member,
I face a problem when doing the integral linear programming. My objective function is not a fixed function.
For example:
objective: min x1+x2+x3+b(x1,x2,x3)
b(x1,x2,x3) is discrete constant number related to different combination of x1,x2 and x3
b=0 when (x1=1,x2=0,x3=1)
b=1 when (x1=0,x2=0,x3=0)
b=2 other
How can I add this b value into the integer linear programming function intlinprog or is there any other way I can achieve this optimization?
Thanks in advance!!!
Answers (1)
John D'Errico
on 28 Jul 2017
Edited: John D'Errico
on 28 Jul 2017
0 votes
Whatever you may think, that is NOT a linear programming problem, since the constant is not actually constant. It is some general (and essentially nonlinear) function of the variables! The constant is not so.
Just because PART of your objective function is linear, the objective function is not linear. Calling it that does not make it so.
A common solution to this type of problem is to solve the default problem, with no constant b at all.
If the minimum is NOT one of those points, then you are done, and need not worry. If the solution is one of those bad points, then if you could provide a simple linear constraint that would prevent the tool from going to those places, then resolve it. If the solution as found is still better than the solution at the singled out locations, then compare it to the solution with this penalty added to it.
Finally, IF you cannot formulate a constraint that intlinprog can use that prevents the optimization from going into that corner, then you need to work harder. But start with the above.
1 Comment
Wenjie Wang
on 28 Jul 2017
Categories
Find more on Choose a Solver in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!