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

[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)


Function AddVariable ( _
    key As Object, _
    <OutAttribute> ByRef vid As Integer, _
    lower As Rational, _
    upper As Rational, _
    isInteger As Boolean _
) As Boolean
bool AddVariable(
    Object key,
    out int vid,
    Rational lower,
    Rational upper,
    bool isInteger
bool AddVariable(
    Object^ key, 
    [OutAttribute] int% vid, 
    Rational lower, 
    Rational upper, 
    bool isInteger
abstract AddVariable : 
        key:Object * 
        vid:int byref * 
        lower:Rational * 
        upper:Rational * 
        isInteger:bool -> bool 
function AddVariable(
    key : Object, 
    vid : int, 
    lower : Rational, 
    upper : Rational, 
    isInteger : boolean
) : boolean


  • key
    Type: System.Object
    The optional key for the row, or nulla null reference (Nothing in Visual Basic).
  • vid
    Type: System.Int32%
    The index of the new variable or of an existing variable that has the same key.
  • isInteger
    Type: System.Boolean
    true to restrict the new variable to integer values; otherwise, false.

Return Value

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

.NET Framework Security

See Also


ITermModel Interface

AddVariable Overload

Microsoft.SolverFoundation.Services Namespace