Hi, all.
I am trying to solve a single mp-LP problem by using solvemp in Matlab MPT toolboxes
My original problem is
------------------------------------------------------------------------------------
A = [0.80 0.44;0.05 0.10;0.10 0.36]; % the ineq constraints matrix
b = [24000;2000;6000]; % the ineq RHS
lb = [0;0]; % the lb of disturbance
ub = [6000;500]; % the ub of distrubance
c = [-8.1;-10.8]; % the cost vector
B = [1 0;0 1;0 0]; % the capacity changes
z = sdpvar(2,1); % define the variables
x = sdpvar(2,1); % define the parametric disturbance
obj = c'*z; % the objective function
F = [A*z<=b+B*x, z>=0, lb<=x<=ub]; % define the constraints
[sol,diagnostics,aux,Valuefunction,Optimizer] = solvemp(F,obj,[],x);% solve the parametric problem
plot(Valuefunction); % plot the value function
assign(x,[500;500]); % assgin a value for disturbance
value(Valuefunction) % get the optimal solution
value(Optimizer)
-----------------------------------------------------------------------------------------
The solution was wrong. For all possible combination of x, the optimal value is -189000
Then I figured out if I rescale the RHS b
------------------------------------------------------------------------------------
A = [0.80 0.44;0.05 0.10;0.10 0.36]; % the ineq constraints matrix
b = [24;2;6]; % the ineq RHS*10^3
lb = [0;0]; % the lb of disturbance*10^3
ub = [6;0.5]; % the ub of distrubance*10^3
c = [-8.1;-10.8]; % the cost vector
B = [1 0;0 1;0 0]; % the capacity changes
-----------------------------------------------------------------------------------------
Then the solutions and the optimal value surface are right.... I don't know why this problem happened
Could someone help me to solve this mystery? Thanks
Kai-Wen