UnconstrainedNonlinearModel.AddRowAsGoal Method
[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)
Syntax
'Declaration
Public Overridable Function AddRowAsGoal ( _
key As Object, _
pri As Integer, _
minimize As Boolean, _
<OutAttribute> ByRef vid As Integer _
) As IGoal
public virtual IGoal AddRowAsGoal(
Object key,
int pri,
bool minimize,
out int vid
)
public:
virtual IGoal^ AddRowAsGoal(
Object^ key,
int pri,
bool minimize,
[OutAttribute] int% vid
)
abstract AddRowAsGoal :
key:Object *
pri:int *
minimize:bool *
vid:int byref -> IGoal
override AddRowAsGoal :
key:Object *
pri:int *
minimize:bool *
vid:int byref -> IGoal
public function AddRowAsGoal(
key : Object,
pri : int,
minimize : boolean,
vid : int
) : IGoal
Parameters
- key
Type: System.Object
a key for the row
- pri
Type: System.Int32
the priority of a goal
- minimize
Type: System.Boolean
whether to minimize the goal row
- vid
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
Remarks
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.
.NET Framework Security
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.