Share via


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

  • 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

See Also

Reference

UnconstrainedNonlinearModel Class

Microsoft.SolverFoundation.Solvers Namespace