VarDictND#

class VarDictND#

This class is not meant to be instantiated; VarDictND is built through the docplex_extensions.add_variables function.

Methods

VarDictND.get(key[, default])

Get the variable for the specified key, or the default if not found.

VarDictND.lookup(*key)

Get the variable for the specified key, or zero if it is not found.

VarDictND.subset_keys(*pattern)

Get a subset of the N-dim tuple keys of the Dict with a wildcard pattern.

VarDictND.subset_values(*pattern)

Get Dict values for all keys that match the wildcard pattern.

VarDictND.sum(*pattern)

Sum all variables, or a subset based on wildcard pattern, in a linear expression.

Attributes

VarDictND.key_names

Names to refer to each dimension of N-dim tuple keys.

VarDictND.model

DOcplex model associated with the variables.

VarDictND.value_name

Name to refer to Dict values.

VarDictND.vartype

DOcplex VarType corresponding to the variables.