CompactQuasiNewtonModel.FunctionEvaluator Property

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

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


Public Property FunctionEvaluator As Func
public Func FunctionEvaluator { get; set; }
virtual property Func^ FunctionEvaluator {
    Func^ get () sealed;
    void set (Func^ value) sealed;
abstract FunctionEvaluator : Func with get, set
override FunctionEvaluator : Func with get, set
final function get FunctionEvaluator () : Func
final function set FunctionEvaluator (value : Func)

Property Value

Type: System.Func<T1, T2, T3, T4, TResult>
The value callback function.




You must set the value callback function before trying to solve the model.

The value 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 index to be evaluated, which is a goal or 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 this method call is the first evaluator call that has the current variable values.

The return value is a Double that should be the value of the row for the current variable values.

.NET Framework Security

See Also


CompactQuasiNewtonModel Class

Microsoft.SolverFoundation.Solvers Namespace