How can I extract basic and non-basic variables from a linear programming problem using Simplex in Optimization Toolbox 3.1.1 (R2007a)?
4 次查看(过去 30 天)
显示 更早的评论
I am trying to retrieve the basic and nonbasic variables using LINPROG with the Simplex method. I can not figure out how to do this, particularly when the problem has upper bound constraints.
采纳的回答
MathWorks Support Team
2009-6-27
The ability to output the basic and nonbasic variables using LINPROG is not available in Optimization Toolbox 3.1.1 (R2007a).
To work around this issue, our implementation of LINPROG can be adjusted to retrieve the indices of the basic and non-basic variables, although this has not been tested thoroughly. One has to add a line (namely, “restoreBasis = true;”) at the beginning of the 'simplexpresolve.m' and 'simplexpostsolve.m' files. The next step is to change the call to simplex.m from linprog (and also linprog output argument list) so that it can return the variables basicVarIdx and nonbasicVarIdx.
Another approach is to recover the optimal basis using the optimal primal and dual solutions. For more information on this method, refer to the paper by Nimrod Megiddo: 'On Finding Primal- and Dual-Optimal Bases', ORSA Journal of Computing, 3 (1991) 63–65.
0 个评论
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Introduction to Installation and Licensing 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!