RowVariableModel.SetValue 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.]

Sets the value for the specified variable index.

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

public virtual void SetValue(
	int vid,
	Rational value
)

Parameters

vid
Type: System.Int32
The variable index.
value
Type: Microsoft.SolverFoundation.Common.Rational
The new value.

Implements

IRowVariableModel.SetValue(Int32, Rational)

The default value of a variable index is Indeterminate.

An RowVariableModel can be used to represent not just a linear model, but also the current state for the user and the row variables of the model. For each variable index, the state associates a current value, represented as a Rational, and a basis status, represented as a Boolean. This state can be used as a starting point when you solve a model, and it can be updated by a solve attempt. For example, calling the Solve(ISolverParameters) method of the SimplexSolver class updates the values and basis status appropriately. Some other solvers might ignore this initial state for rows and, in some cases, for variables.

Show: