GUSSScenarioDict#

class gamspy.GUSSScenarioDict(container: Container, name: str, scenario_set: Set, description: str = '')[source]#

Bases: object

Helper for constructing a GUSS scenario dictionary set.

A GUSS scenario dictionary is represented as a normal three-dimensional GAMSPy set with rows of the form:

symbol_name, action, scenario_data_symbol_name

Attributes:
name
records

Methods

from_existing(container, name)

Rebuild a GUSSScenarioDict wrapper around an already-existing underlying Set in container.

add_fixed

add_level

add_lower

add_marginal

add_options

add_param

add_upper

gamsRepr

to_set

classmethod from_existing(container: Container, name: str) GUSSScenarioDict[source]#

Rebuild a GUSSScenarioDict wrapper around an already-existing underlying Set in container.

The Python wrapper is not a container-tracked symbol and is not serialized. This classmethod reconstructs the wrapper from the surviving Set so that callers can resume using gp_model.solve(scenario=dict) after a deserialize.

Parameters:
containerContainer

The container holding the underlying GUSS scenario Set.

namestr

Name of the underlying Set inside container.

Returns:
GUSSScenarioDict
Raises:
ValidationError

If name does not exist in container, is not a Set, has no records, or its records do not have the expected (scenario_set_name, "scenario", "") header row.

add_fixed(target: Variable, scenario_data: Parameter) None[source]#
add_level(target: Variable, scenario_data: Parameter) None[source]#
add_lower(target: Variable, scenario_data: Parameter) None[source]#
add_marginal(target: Variable | Equation, scenario_data: Parameter) None[source]#
add_options(options: Parameter) None[source]#
add_param(target: Parameter, scenario_data: Parameter) None[source]#
add_upper(target: Variable, scenario_data: Parameter) None[source]#
gamsRepr() str[source]#
to_set() Set[source]#
property name: str#

!! processed by numpydoc !!

property records: pd.DataFrame | None#

!! processed by numpydoc !!