INonlinearModel.GradientEvaluator Property

[This documentation is for preview only, and is subject to change in later releases. Blank topics are included as placeholders.]

Gets or sets the gradient callback function that the solver invokes periodically in order to obtain gradient information for different variable values.

Namespace:  Microsoft.SolverFoundation.Services
Assembly:  Microsoft.Solver.Foundation (in Microsoft.Solver.Foundation.dll)

Syntax

'Declaration
Property GradientEvaluator As Action
Action GradientEvaluator { get; set; }
property Action^ GradientEvaluator {
    Action^ get ();
    void set (Action^ value);
}
abstract GradientEvaluator : Action with get, set
function get GradientEvaluator () : Action
function set GradientEvaluator (value : Action)

Property Value

Type: System.Action<T1, T2, T3, T4, T5>
The gradient callback function.

Remarks

The gradient callback function should set the ValuesByIndex gradient values for all variables that were previously declared as active with the SetActiveVariables method.

The gradient callback function has the following arguments:

The first argument is the INonlinearModel that is being solved.

The second argument is an Int32 that represents the row variable index to be evaluated, which is a goal or a constraint.

The third argument is a ValuesByIndex that contains the current variable values that are accessible by index.

The fourth argument is a Boolean that indicates whether the current call is the first evaluator call with the current variable values.

The fifth argument is a ValuesByIndex object that contains the passed-in gradient values when the function returns.

.NET Framework Security

See Also

Reference

INonlinearModel Interface

Microsoft.SolverFoundation.Services Namespace