[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #56582] [octave forge] (optim) lsqlin produces
From: |
Nicholas Jankowski |
Subject: |
[Octave-bug-tracker] [bug #56582] [octave forge] (optim) lsqlin produces unexpected error on linearly dependent inputs |
Date: |
Fri, 5 Jul 2019 21:53:39 -0400 (EDT) |
User-agent: |
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.36 Edge/16.16299 |
Follow-up Comment #1, bug #56582 (project octave):
checking full Matlab output for compatibility. #2 is odd:
1. Matlab:
>> C = [1,2,3;2,4,6;2,4,5];
>> D = [4 8 5]';
>> [X, RESNORM, RESIDUAL, EXITFLAG, OUTPUT, LAMBDA]=lsqlin(C,D,[],[])
X =
NaN
NaN
3
RESNORM =
NaN
RESIDUAL =
NaN
NaN
NaN
EXITFLAG =
1
OUTPUT =
struct with fields:
iterations: 0
algorithm: 'mldivide'
firstorderopt: []
constrviolation: []
cgiterations: []
linearsolver: []
message: ''
LAMBDA =
struct with fields:
lower: []
upper: []
ineqlin: []
eqlin: []
Octave error:
error: __qp__: operator *: nonconformant arguments (op1 is 1x1, op2 is 3x1)
error: called from
quadprog at line 352 column 36
lsqlin at line 123 column 21
2. Matlab:
>> C=[1 2 3;4 5 6; 2 4 6];
>> D=[4 5 8]';
>> [X, RESNORM, RESIDUAL, EXITFLAG, OUTPUT, LAMBDA]=lsqlin(C,D,[],[])
X =
NaN
NaN
NaN
RESNORM =
NaN
RESIDUAL =
NaN
NaN
NaN
EXITFLAG =
1
OUTPUT =
struct with fields:
iterations: 0
algorithm: 'mldivide'
firstorderopt: []
constrviolation: []
cgiterations: []
linearsolver: []
message: ''
LAMBDA =
struct with fields:
lower: []
upper: []
ineqlin: []
eqlin: []
Octave output:
X =
-3.2660
6.5320
-3.2660
RESNORM = 105.00
RESIDUAL =
-4.0000
-8.0000
-5.0000
EXITFLAG = 0
OUTPUT =
scalar structure containing the fields:
iterations = 200
LAMBDA = [](0x0)
3. Matlab:
>> C = [1 2 3; 4 5 6];
>> D = [4 5]';
>> A = [1 1 1;2 2 2];
>> B = [1 2]';
>> [X, RESNORM, RESIDUAL, EXITFLAG, OUTPUT,
LAMBDA]=lsqlin(C,D,[],[],A,B,[],[])
Minimum found that satisfies the constraints.
Optimization completed because the objective function is non-decreasing in
feasible directions, to within the value of the optimality tolerance,
and constraints are satisfied to within the value of the constraint
tolerance.
<stopping criteria details>
X =
-0.1667
0.3333
0.8333
RESNORM =
2
RESIDUAL =
-1.0000
1.0000
EXITFLAG =
1
OUTPUT =
struct with fields:
message: '↵Minimum found that satisfies the
constraints.↵↵Optimization completed because the objective function is
non-decreasing in ↵feasible directions, to within the value of the
optimality tolerance,↵and constraints are satisfied to within the value of
the constraint tolerance.↵↵<stopping criteria details>↵↵Optimization
completed: The relative dual feasibility, 9.259951e-13,↵is less than
options.OptimalityTolerance = 1.000000e-08, the complementarity
measure,↵0.000000e+00, is less than options.OptimalityTolerance, and the
relative maximum constraint↵violation, 0.000000e+00, is less than
options.ConstraintTolerance = 1.000000e-08.↵↵'
algorithm: 'interior-point'
firstorderopt: 4.1670e-11
constrviolation: 0
iterations: 1
linearsolver: 'dense'
cgiterations: []
LAMBDA =
struct with fields:
ineqlin: [0×1 double]
eqlin: [2×1 double]
lower: [3×1 double]
upper: [3×1 double]
Octave error:
error: quadprog: equality constraint matrix must be full row rank
error: called from
quadprog at line 283 column 11
lsqlin at line 123 column 21
_______________________________________________________
Reply to this item at:
<https://savannah.gnu.org/bugs/?56582>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/