I cant solve linear programming
古いコメントを表示
Obejctive function: f= 2.84x1 - 0.22x2-3.33x3 + 1.09x4 + 9.39x5 + 9.51x6
Constraints
1.1x1 + 0.9x2 +0.9x3+ 1.0x4 + 1.1x5 + 0.9x6 ≤ 200,000
0.5x1 + 0.35x2 +0.25x3+ 0.25x4 + 0.5x5 + 0.35x6 ≤ 100,000
0.01x1 + 0.15x2 +0.15x3+ 0.18x4 + 0.01x5 + 0.15x6 ≤ 20,000
0.4x1 + 0.06x2 +0.04x3+ 0.05x4 - 0.6x5 + 0.06x6 = 0
0.1x2+0.01x3 + 0.01x4 - 0.9x6 = 0
-6857.6x1 + 364x2 +2032x3- 1145x4 – 6857.6x5 + 364x6 + 21,520x7= 20,000,000
Anyone can show me the code?When I solve it by linprog it says it is unbounded problem. When using optimtool it tell me f need to be double. Who can solve my problem??
採用された回答
その他の回答 (2 件)
John D'Errico
2020 年 2 月 14 日
編集済み: John D'Errico
2020 年 2 月 14 日
1 投票
Who can solve it? Most likely, nobody. Your problem is unbounded. I can go through some mathematics to reduce it to show more clearly, but consider this:
You have a 6 variable problem, with 3 equality constraints. So we can simply enough (using a nullspace argument) show this reduces to a 3 dimensional problem. Thus we need to live in a planar 3-manifold of the 6 dimensional space. Any solution, if such a solution exists must live on that 3-manifold.
However, then you have exactly 3 linear inequality constraints that remain. We can transform them also into the planar manifold. Can you bound a 3-dimensional space using only 3 planes? (Well, yes, in context of minimizing a linear objective function. But there is no assurance that will happen.) There are no bound constraints listed at all. I think you will find the odds are good your problem is unbounded. And, lo, and behold, linprog tells us it is unbounded.
The resolution to your problem? Either find any errors in your equations as written, or accept that the variables probably need lower as well as upper bounds.
Jon
2020 年 2 月 14 日
0 投票
It is of course possible to have a linear programming problem that is unbounded. This happens if there are no constraints that prevent you from choosing a solution that has an infinitely large value of the objective function.
If you do not think that this should be possible for your situation, then perhaps you have not entered either the objective function or the constraints properly into the call to linprog.
Please include your code where you call linprog. Also please use the code button on the MATLAB toolbar to have it formatted nicely.
カテゴリ
ヘルプ センター および File Exchange で Solver Outputs and Iterative Display についてさらに検索
製品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!