0
problem with fot_linprog

[Scilab 6.1.1, FOT v.0.4.1, windows 10]

Let's take a simple example to illustrate the problem:
A = [6, 15, 6; 14, 42, 16; 2, 8, 2];
B = [9; 21; 4]; C = [10; -7; -5]; LB = [0, 0, 0];
[xopt, zmin, exitflag, output, lambda]= fot_linprog (C, A, B, [], [], LB, []);

Everything works fine, except Lagrange multipliers from lambda:
--> disp(lambda.ineqlin);
0.
-0.3125
0.

The correct answer should be [0; +0.3125; 0] (checked by manual calculation and by means of karmarkar)

Dear experts, can someone tell me what I'm doing wrong? Or is this a fot_linprog bug and would it be better to use another tool?


Scilab Toolbox Optimization Toolbox 09-05-22, 6:06 p.m. grandpater
0
More than 60 people have viewed my question, thank you for your interest in this topic. Unfortunately, I have not yet received an answer to my question, so I am trying to figure out the problem in fot_linprog.
My test: C=[1;1]; Aeq=[2, 1]; Beq=[1]; A=[2;-1]; B=[0]; LB=[0;0].
I have tried four methods: 1) manually; 2) Matlab (linprog); 3) Scilab (fot_linprog); 4) Scilab (karmarkar).
The results are as follows: xopt and fopt matched in all cases.
Dual problem: yopt have the same modulus but differ in sign (yopt.eqlin and yopt.ineqlin):
3/4 and 1/4, manual calculation;
-0.75 and 0.25, (Matlab, linprog);
0.75 and-0.25 (Scilab, fot_linprog);
-0.75 and 0.25 (Scilab, karmarkar).
Carefully reading the documentation for the primal-dual LP problem in scilab and some other solvers, I found important (as it seems to me) information about the formulation of the dual problem in linprog (matlab): "...This sign convention matches that of nonlinear solvers (see Constrained Optimality Theory). However, this sign is the opposite of the sign in much linear programming literature, so a linprog Lagrange multiplier is the negative of the associated "shadow price"..."
In this comparison, Scilab (karmarkar) provides the same result as Matlab (linprog). The Scilab solver (fot_linprog) produces a completely different result in sign for yopt. Nothing about this was found in the documentation of fot_linprog (Scilab). Any help?
02-06-22, 8:30 p.m. grandpater


Log-in to answer to this question.