ITermModel.AddConstant Method

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

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

bool AddConstant(
	Rational value,
	out int vid
)

Parameters

value
Type: Microsoft.SolverFoundation.Common.Rational
The value of the constant.
vid
Type: System.Int32%
The row or variable index of the new constant, or the row or variable index of an existing constant that has the same value.

Return Value

Type: System.Boolean
true if a new constant is added; false if an existing constant is re-used.

Constants are considered rows.

Show: