AddVariable Method (Object, Int32, Rational, Rational, Boolean)
Collapse the table of content
Expand the table of content

TermModel.AddVariable Method (Object, Int32%, Rational, Rational, Boolean)

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

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

public bool AddVariable(
	Object key,
	out int vid,
	Rational lower,
	Rational upper,
	bool isInteger
)

Parameters

key
Type: System.Object
Optional. The key for the variable, or null.
vid
Type: System.Int32%
The index of the new variable or of an existing variable that has the same key.
lower
Type: Microsoft.SolverFoundation.Common.Rational
The lower bound.
upper
Type: Microsoft.SolverFoundation.Common.Rational
The upper bound.
isInteger
Type: System.Boolean
true to restrict the new variable to integer values.

Return Value

Type: System.Boolean
true if a new variable is added; false if an existing variable has the specified key.

Implements

ITermModel.AddVariable(Object, Int32, Rational, Rational, Boolean)

Show:
© 2016 Microsoft