LinearModel.AddRow Method (Object, Int32%)

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 to a linear model.

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

public override bool AddRow(
	Object key,
	out int vid
)

Parameters

key
Type: System.Object
A key for the row.
vid
Type: System.Int32%
A variable index.

Return Value

Type: System.Boolean
true if the row is added to the model successfully; false if the model already includes a row that is referenced by key or if the model already includes a user variable that is referenced by key.

Implements

ILinearModel.AddRow(Object, Int32)
IRowVariableModel.AddRow(Object, Int32)

The following table shows the value of vid, depending on the key.

key in the model

Value of vid

Model already includes a row that is referenced by key.

vid is set to the row's index.

Model already includes a user variable that is referenced by key.

vid is set to -1.

A new row associated with the key is added to the model.

vid is set to the new row index.

Show: