Initializing help system before first use

setVar Method

Adds a variable assignment in a solution. This method sets the value of a variable in a (partial) solution.

Namespace:   BCL
Assembly:  xprbdn (in xprbdn.dll) Version: 37.1.1.0
Syntax
C#
VB
public void setVar(
	XPRBvar var,
	double value
)

Parameters

var
Type:  BCLXPRBvar
Variable to set
value
Type:  SystemDouble
A double constant
Examples
XPRBprob expl1 = new XPRBprob("example1"); XPRBvar x1 = expl1.newVar("abc3", BCLconstant.XPRB_UI, 1, 100); XPRBvar x2 = expl1.newVar("abc1", BCLconstant.XPRB_PL, 0, XPRB.INFINITY); XPRBsol sol1 = expl1.newSol(); sol1.setVar(x1,1.0); sol2.setVar(x2,0.0);
See Also