Share via


UnconstrainedNonlinearModel.AddRow Method

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

Adds a row to the model.

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

Syntax

'Declaration
Public Function AddRow ( _
    key As Object, _
    <OutAttribute> ByRef vid As Integer _
) As Boolean
public bool AddRow(
    Object key,
    out int vid
)
public:
virtual bool AddRow(
    Object^ key, 
    [OutAttribute] int% vid
) sealed
abstract AddRow : 
        key:Object * 
        vid:int byref -> bool 
override AddRow : 
        key:Object * 
        vid:int byref -> bool 
public final function AddRow(
    key : Object, 
    vid : int
) : boolean

Parameters

Return Value

Type: System.Boolean
true if added successfully, otherwise false

Implements

IRowVariableModel.AddRow(Object, Int32%)

Remarks

If the model already includes a row referenced by the specified key, this sets the vid to the row index and returns false. If the model already includes a user variable referenced by the specified key, it sets the vid to -1 and returns false. Otherwise, it adds a new row associated with key to the model, assigns the next available index to the new row, sets vid to this index, and returns true. The CompactQuasiNewtonSolver can only have one row. By convention this row will always have 0 as an index.

.NET Framework Security

See Also

Reference

UnconstrainedNonlinearModel Class

Microsoft.SolverFoundation.Solvers Namespace