VarDictND#

class VarDictND[source]#

This class is not meant to be instantiated; VarDictND is built through the opti_extensions.gurobipy.addVars function.

Methods

VarDictND.dot(paramdict)

Sum the products of variables with corresponding coef from ParamDictND, in an expression.

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 an expression.

VarDictND.sum_squares(*pattern)

Sum squares of variables, or a subset based on wildcard pattern, in an expression.

Attributes

VarDictND.Model

The gurobipy model associated with the variables.

VarDictND.VType

The variable type corresponding to the gurobipy variables.

VarDictND.key_names

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

VarDictND.value_name

Name to refer to Dict values.