Represents an AMPL decision variable. Note that, in case of a scalar variable, all the properties of the variable instance can be accessed through methods like Variable.value
. The methods have the same name of the corresponding AMPL suffixes. See http://www.ampl.com/NEW/suffbuiltin.html for a list of the available suffixes.
All these methods throw an UnsupportedOperationException
if called for an entity which is not scalar.
Otherwise, use the method Variable.get
to obtain the objects of type VariableInstance
, from which to access all properties (corresponding to AMPL suffixes). See section Access to instances and values for further information on how to access set instances.
To gain access to all the values in an entity (for all instances and all suffixes for that entities), see Entity.getValues
and the DataFrame
class.