NonlinearProgram.Solve Method

Definition

Namespace: Numerics.NET.Optimization
Assembly: Numerics.NET (in Numerics.NET.dll) Version: 10.9.0

Overload List

Solve() Solves the model and returns the solution.
Solve(NonlinearProgramOptions)Solves the nonlinear program with the specified options and the solver's current parallel settings.
Solve(NonlinearProgramOptions, ParallelOptions)Solves the nonlinear program with the specified solver and parallel options.

Solve(NonlinearProgramOptions)

Solves the nonlinear program with the specified options and the solver's current parallel settings.
C#
public DenseVector<double> Solve(
	NonlinearProgramOptions options
)

Parameters

options  NonlinearProgramOptions
The options used for this solve and subsequent parameterless solves.

Return Value

DenseVector<Double>
The primal solution, indexed by the model's variables.

Remarks

Options are copied before any derivative or objective callback. Changing the supplied options does not affect the active solve. A subsequent solve takes a fresh copy of the most recently supplied options. Automatic selection replaces the supplied options' Method with the concrete choice unless the caller changes Method during initialization. Set Method to Automatic again to request new selection. Check the model and solver status before using the result.

Exceptions

ArgumentNullExceptionoptions is null.
InvalidOperationExceptionA calculation is already in progress.
OperationCanceledExceptionThe calculation is canceled.

Solve(NonlinearProgramOptions, ParallelOptions)

Solves the nonlinear program with the specified solver and parallel options.
C#
public DenseVector<double> Solve(
	NonlinearProgramOptions options,
	ParallelOptions? parallelOptions
)

Parameters

options  NonlinearProgramOptions
The options used for this solve and subsequent parameterless solves.
parallelOptions  ParallelOptions
The parallel and cancellation settings, or null to use default settings.

Return Value

DenseVector<Double>
The primal solution, indexed by the model's variables.

Remarks

Options are copied before any derivative or objective callback. Changing the supplied options does not affect the active solve. A subsequent solve takes a fresh copy of the most recently supplied options. Automatic selection replaces the supplied options' Method with the concrete choice unless the caller changes Method during initialization. Set Method to Automatic again to request new selection. Check the model and solver status before using the result.

Exceptions

ArgumentNullExceptionoptions is null.
InvalidOperationExceptionA calculation is already in progress.
OperationCanceledExceptionThe calculation is canceled.

See Also