CompactQuasiNewtonModel.AddRowAsGoal Method

Adds a new row as a goal row.

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

  • minimize
    Type: System.Boolean
    true to minimize the goal row; otherwise, false.
  • vid
    Type: System.Int32%
    The index of the goal row. If the method is unsuccessful, vid is set to -1.

Return Value

Type: Microsoft.SolverFoundation.Services.IGoal
The new goal if the row is added successfully; otherwise, nulla null reference (Nothing in Visual Basic).

Remarks

If the model already includes a row that is referenced by the key parameter, and the row is not a goal, this method makes the row a goal row.

.NET Framework Security

See Also

Reference

CompactQuasiNewtonModel Class

Microsoft.SolverFoundation.Solvers Namespace