필터 지우기
필터 지우기

Info

이 질문은 마감되었습니다. 편집하거나 답변을 올리려면 질문을 다시 여십시오.

Why does linprog generate a 7D optimal solution for 6D simplex problem

조회 수: 1 (최근 30일)
Thomas Kirven
Thomas Kirven 2019년 3월 18일
마감: MATLAB Answer Bot 2021년 8월 20일
When running linprog with 6x18 constraint matrix (m=6,n=18) and 6x1 b vector, the "optimal" solution generated has 7 nonzero elements when it should only be 6. Why is this the case? I have my own implementation of simplex which comes up with a different solution (6 as apposed to 7 nonzero entries) but both have the same objective function value when evaluated at the solution point.
  댓글 수: 10
Thomas Kirven
Thomas Kirven 2019년 3월 20일
Matt J, yep this is the exact code and the solution. Also I checked the solution and it does seem to be correct:
A*linprog(f,[],[],A,b,lb)
gives
ans =
63.0000
-23.0000
-43.0000
29.0000
-54.0000
20.0000
which is b.
Thomas Kirven
Thomas Kirven 2019년 3월 20일
편집: Thomas Kirven 2019년 3월 20일
Thank you very much Mary! I think this makes sense now! A linear combination of vertices on the simplex would totally explain why there are 7 non-zero values. In fact it looks like the solution the interior point comes up with is a linear combination of my independently obtained solution and the matlab dual simplex solution Matt provided. Cool!

답변 (1개)

Thomas Kirven
Thomas Kirven 2019년 3월 20일

이 질문은 마감되었습니다.

Community Treasure Hunt

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

Start Hunting!

Translated by