getmiddle
getmiddle |
Purpose
This function returns the value nearest to the middle of the domain of the variable passed in the argument. It can be useful for specific search strategies.
Synopsis
function getmiddle(x:cpvar) : integer
function getmiddle(x:cpfloatvar) : real
Argument
x
|
the decision variable
|
Return value
The middle value of a variable
Example
The following example shows how to get the middle value of a cpvar
x'
val:=getmiddle(x)
Related topics