UnconstrainedNonlinearModel.AddRowAsGoal Method

Solver Foundation 3.0

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

Adds a row as a goal. Unconstrained models can have just one row. By convention this row will always have 0 as an index.

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

public virtual IGoal AddRowAsGoal(
	Object key,
	int pri,
	bool minimize,
	out int vid


Type: System.Object
a key for the row
Type: System.Int32
the priority of a goal
Type: System.Boolean
whether to minimize the goal row
Type: System.Int32%
a row variable index of the goal row if successful, or -1 if not

Return Value

Type: Microsoft.SolverFoundation.Services.IGoal
the new goal if added successfully, otherwise null

If the model already includes a row referenced by the specified key, and the row is not a goal, invoking this method this will make the row a goal.