You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Nov 19, 2020. It is now read-only.
When using the AugmentedLagrangian solver, with a NonlinearObjectiveFunction, and a number of NonlinearConstraints in a List, if one or more of the constraints is constructed using the NonlinearConstraint(IObjectiveFunction objective, Expression<Func<double[], bool>> constraint) constructor, a NullReferenceException is thrown.
This is because the Gradient function of the constraint is null upon construction.
I see why this happens, but why is there not a constructor that looks like NonlinearConstraint(IObjectiveFunction objective, Expression<Func<double[], bool>> function, Func<double[], double[]> gradient) that allows the gradient to be defined along with the objective function and constraint function, rather than having to use the less clear public NonlinearConstraint(IObjectiveFunction objective, Func<double[], double> function, Func<double[], double[]> gradient) signature which specifies only the left hand side of the equation?
The text was updated successfully, but these errors were encountered:
When using the AugmentedLagrangian solver, with a NonlinearObjectiveFunction, and a number of NonlinearConstraints in a List, if one or more of the constraints is constructed using the NonlinearConstraint(IObjectiveFunction objective, Expression<Func<double[], bool>> constraint) constructor, a NullReferenceException is thrown.
This is because the Gradient function of the constraint is null upon construction.
I see why this happens, but why is there not a constructor that looks like NonlinearConstraint(IObjectiveFunction objective, Expression<Func<double[], bool>> function, Func<double[], double[]> gradient) that allows the gradient to be defined along with the objective function and constraint function, rather than having to use the less clear public NonlinearConstraint(IObjectiveFunction objective, Func<double[], double> function, Func<double[], double[]> gradient) signature which specifies only the left hand side of the equation?
The text was updated successfully, but these errors were encountered: