Info
This question is closed. Reopen it to edit or answer.
potential bug in the Simplex method of optimtool box
1 view (last 30 days)
Show older comments
Hi, when I use the linprog function with Simplex method, I found there are some inconsistent codes in the Simplexpiesewise.m and Simplexphasetwo.m files. In the simplexpiesewise.m file, the entering candidate variables are determined with the following constraints:
% Choose the entering variable and check the optimality condition
dualf = c_N - (y * N)';
% k is the chosen (the first one that satisfies the conditions) index of the entering variable
kcands = find( ( (dualf >= tol) & (tol2 < ub_N - x_N) ) | ( (dualf <= -tol) & (x_N - lb_N > tol2) ) );
However, in the simplexphasetwo.m file, the constraints turn to be:
dualf = c_N - (y * Nonbasis)';
enterCandidates = ((dualf >= tol) & (x_N - lb_N > tol2)) | ((dualf <= -tol) & (tol2 < ub_N - x_N));
The two search conditions are different, could you please tell me why? Thanks!
0 Comments
Answers (0)
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!