[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #64500] fmincon equality constraint handling -
From: |
Liang Tang |
Subject: |
[Octave-bug-tracker] [bug #64500] fmincon equality constraint handling - nz |
Date: |
Mon, 31 Jul 2023 18:23:32 -0400 (EDT) |
URL:
<https://savannah.gnu.org/bugs/?64500>
Summary: fmincon equality constraint handling - nz
Group: GNU Octave
Submitter: lt1234
Submitted: Mon 31 Jul 2023 10:23:31 PM UTC
Category: Octave Forge Package
Severity: 3 - Normal
Priority: 5 - Normal
Item Group: Feature Request
Status: None
Assigned to: None
Originator Name: lt1234
Originator Email:
Open/Closed: Open
Release: 8.2.0 8.X Series Bug Fix Release
Discussion Lock: Any
Operating System: Microsoft Windows
Fixed Release: None
Planned Release: None
_______________________________________________________
Follow-up Comments:
-------------------------------------------------------
Date: Mon 31 Jul 2023 10:23:31 PM UTC By: Liang Tang <lt1234>
This line below occurs six times in optim 1.6.2
nz = 200 * eps; # This is arbitrary. Accuracy of equality constraints.
I recommend that nz be controlled by the user through options.
To see the effect of nz, an example is provided.
fun=@(x) sum(x.^2); X0=[10 11]';
Aeq=[1 -1]; Beq=[0]; % X(1)-X(2)=0
Aieq=[]; Bieq=[];
lb=[1 1]'; ub=[12 12]';
[X, FVAL, CVG, outp]= fmincon (fun, X0, Aieq, Bieq, Aeq, Beq, lb, ub,
nonlcon=[]);
error: Initial parameters violate constraints.
error: called from
__lm_feasible__ at line 93 column 5
fmincon at line 456 column 24
% try to satisfy the constraint (it works this time but it is not always true)
fcn=@(x) Aeq*x-Beq;
[X0, FVAL, INFO, OUTPUT, FJAC] = fsolve(fcn, X0);
[X, FVAL, CVG, outp]= fmincon (fun, X0, Aieq, Bieq, Aeq, Beq, lb, ub,
nonlcon=[])
Depending on the complexity of fcn and options, fsolve may not result in a
solution that will meet 200*eps (4e-16) in fmincon. We can continue to reduce
TolX & TolFun for fdolve. But a possible approach seems to be to relax nz or
allow users to adjust nz as they wish (like TolX & TolFun). I recommend the
latter. Thanks.
_______________________________________________________
Reply to this item at:
<https://savannah.gnu.org/bugs/?64500>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Octave-bug-tracker] [bug #64500] fmincon equality constraint handling - nz,
Liang Tang <=