GAMSSymbolMap

(class from pyomo.repn.plugins.gams_writer)

class pyomo.repn.plugins.gams_writer.GAMSSymbolMap(var_labeler, var_list)[source]

Bases: SymbolMap

__init__(var_labeler, var_list)[source]

Methods

__init__(var_labeler, var_list)

addSymbol(obj, symb)

Add a symbol for a given object

addSymbols(obj_symbol_tuples)

Add (object, symbol) tuples from an iterable object.

alias(obj, name)

Create an alias for an object.

createSymbol(obj[, labeler])

Create a symbol for an object with a given labeler.

createSymbols(objs[, labeler])

Create a symbol for iterable objects with a given labeler.

getObject(symbol)

Return the object corresponding to a symbol

getSymbol(obj[, labeler])

Return the symbol for an object.

removeSymbol(obj)

var_label(obj)

var_recorder(obj)

Member Documentation

addSymbol(obj, symb)

Add a symbol for a given object

This method assumes that objects and symbol names will not conflict.

addSymbols(obj_symbol_tuples)

Add (object, symbol) tuples from an iterable object.

This method assumes that objects and symbol names will not conflict.

alias(obj, name)

Create an alias for an object. An aliases are symbols that do not have a one-to-one correspondence with objects.

createSymbol(obj, labeler=None, *args)

Create a symbol for an object with a given labeler. No error checking is done to ensure that the generated symbol name is unique.

createSymbols(objs, labeler=None, *args)

Create a symbol for iterable objects with a given labeler. No error checking is done to ensure that the generated symbol names are unique.

getObject(symbol)

Return the object corresponding to a symbol

getSymbol(obj, labeler=None, *args)

Return the symbol for an object. If it has not already been cached in the symbol map, then create it.