How to use objective function in linear programming ?

Hi all.
I have problem used objective function.
I want to apply " f(objective function) = 3x(1) + 4x(2) + 30 "
But In document in linear programming, f = [3 4]
In here, constant can not be used.
How to solve this problem?

回答 (1 件)

Torsten
Torsten 2017 年 8 月 15 日

0 投票

If you minimize 3*x1+4*x2, you automatically minimize 3*x1+4*x2+30.
So a constant in the objective function can be ignored in optimization problems.
Best wishes
Torsten.

1 件のコメント

Alan Weiss
Alan Weiss 2017 年 8 月 15 日
To expand on Torsten's answer, once you find the point that minimizes 3x(1) + 4x(2), you can evaluate the objective function with or without the added 30.
Alan Weiss
MATLAB mathematical toolbox documentation

サインインしてコメントする。

カテゴリ

質問済み:

2017 年 8 月 15 日

コメント済み:

2017 年 8 月 15 日

Community Treasure Hunt

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

Start Hunting!