I've been taking a class on linear programming and have been working with a lot of different problems and methods of solving them.

All this time however, I have rarely come across an objective function with a constant term in it. This has me thinking, are constant terms allowed in objective functions? Do they change the optimal solution for the problem?

Any insight into this would be appreciated. I would like to settle my curiosity.

For example:

Max z = x1 + 2x2 + 3x3 + 37

Is this a legal objective function? Will the optimal values of x1, x2, and x3 be different if there was no "37" term if solved with some version of simplex?


Including a constant term in the objective does not change the set of optimal solutions, and this is true even for nonlinear programming. Some solvers might not allow it, so you can just omit it, solve, and add it back to your final objective value.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.