MATLAB: LINPROG stopped because some objective or constraint matrix coefficients are too large in magnitude

linprogMATLAB

The error in the title is displayed for an LP my code has built and was trying to solve. I do not understand the source of the problem. Here are the details. Note that the Inf and -Inf are not the source of the problem since problems with the same structure but different numbers are correctly solved.
K>> prob
prob =
struct with fields:
solver: 'linprog'
options: [1×1 optim.options.Linprog]
lb: [16×1 double]
ub: [16×1 double]
Aeq: [2×16 double]
beq: [2×1 double]
Aineq: [16×16 double]
bineq: [16×1 double]
f: [16×1 double]
K>> mat2str(prob.lb')
ans =
'[-Inf -Inf -0.0570963261683033 -0.429493309322774 -Inf -Inf -Inf -Inf -Inf -Inf -Inf -Inf -Inf -Inf -Inf -Inf]'
K>> mat2str(prob.ub')
ans =
'[Inf Inf 0.0656765572443473 0.381622988133296 Inf Inf Inf Inf Inf Inf Inf Inf Inf Inf Inf Inf]'
K>> mat2str(prob.Aeq)
ans =
'[1 0 1 0 1 1 1 1 0 0 0 0 0 0 0 0;0 1 0 1 0 0 0 0 1 1 1 1 0 0 0 0]'
K>> mat2str(prob.beq)
ans =
'[0.0327258138688182;0.0333850052624616]'
K>> mat2str(prob.Aineq)
ans =
'[0 0 0 0 -1 0 0 0 0 0 0 0 1 0 0 0;0 0 0 0 0 -1 0 0 0 0 0 0 0 1 0 0;0 0 0 0 0 0 -1 0 0 0 0 0 0 0 1 0;0 0 0 0 0 0 0 -1 0 0 0 0 0 0 0 1;0 0 0 0 0 0 0 0 1 0 0 0 -1 0 0 0;0 0 0 0 0 0 0 0 0 1 0 0 0 -1 0 0;0 0 0 0 0 0 0 0 0 0 1 0 0 0 -1 0;0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 -1;0 0 0 0 0 0 0 0 -1 0 0 0 -1 0 0 0;0 0 0 0 0 0 0 0 0 -1 0 0 0 -1 0 0;0 0 0 0 0 0 0 0 0 0 -1 0 0 0 -1 0;0 0 0 0 0 0 0 0 0 0 0 -1 0 0 0 -1;0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0;0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0;0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0;0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0]'
K>> mat2str(prob.bineq)
ans =
'[0.00457334489762358;Inf;0.00545850842619589;0.00678422307954823;0;0;0;0;0;0;0;0;0;0;0;0]'
K>> mat2str(prob.f)
ans =
'[-1;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0]'

Best Answer

What about using row vectors for lb, ub, f, beq and bineq ?
And bineq(2) = Inf is not allowed.
Best wishes
Torsten.