I am trying to use linprog to solve for my min but I am getting the error message below
% Code Define System
% Simple MSD
M=75; b=100; k=10000; deltar=0.2; MM=500; bb=10000; kk=50000; deltarr=.28; MMM=10; kkk=500000;
deltarrr=.03;
g=9.8;
qmax=[.03333; .2; .15; .0002; .3; 0];
qmin=[-.03333; .1;-.15; -.0002; .05; -4.5];
tauc=0.5;
Sw=2*tauc*(2*(75+500+10)*9.8)^2;
AA= [ 0 0 0 1 0 0 0;
0 0 0 0 1 0 0;
0 0 0 0 0 1 0;
-k/M k/M 0 -b/M b/M 0 0;
k/MM ((-k/MM)+(-kk/MM)) kk/MM b/MM ((-b/MM)-(bb/MM)) bb/MM 0;
0 kk/MMM ((-kk/MMM)+(-kkk/MMM)) 0 bb/MMM -bb/MMM 1/MMM;
0 0 0 0 0 0 -1/tauc];
BB = [0; 0; 0; 0; 1/MM; -1/MMM; 0];
GG= [0; 0; 0; 0; 0; 0;1/tauc];
DDx=[-k/M k/M 0 -b/M b/M 0 0;
0 1 0 0 0 0 0;
0 0 0 0 1 0 0;
k/MM ((-k/MM)+(-kk/MM)) kk/MM b/MM ((-b/MM)-(bb/MM)) bb/MM 0;
0 1 -1 0 0 0 0;
0 0 0 0 0 0 0];
DDu=[0; 0; 0; 1/MM; 0; 1];
DDw=[0; 0; 0; 0; 0; 0];
nx=7; nu=1; nw=1; nz=6;
p_ossop= -5733;
g_q=zeros(nx+nu+nz,1); g_q(2)=.1;
A=[];b=[];
Aeq=[zeros(nx,nz) AA BB;-eye(nz,nz) DDx DDu];
beq=[-GG*p_ossop;-DDw*p_ossop];
UB=[qmax; inf*ones(nx+nu,1)];
LB=[qmin; -inf*ones(nx+nu,1)];
[ossop,fval,exitflag] = linprog(g_q,A,b,Aeq,beq,LB,UB);
if exitflag == 1
q_ossop=ossop(1:nz)
s_ossop=ossop(nz+1:nz+nx)
m_ossop=ossop(nz+nx+1:nz+nx+nu)
else
error
I keep getting the error:
Exiting: One or more of the residuals, duality gap, or total relative error has stalled: the primal appears to be infeasible (and the dual unbounded). (The dual residual < TolFun=1.00e-08.) Error using error Not enough input arguments.
Error in ProjectMSDexample_ContTime (line 44) error
Any help would be greatly appreciated.
Thanks in Advance

 Réponse acceptée

Matt J
Matt J le 30 Avr 2014

0 votes

It means there appear to be no feasible solutions. Your constraints define an empty set.

Plus de réponses (0)

Catégories

En savoir plus sur Linear Programming and Mixed-Integer Linear Programming dans Centre d'aide et File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by