pywr.core.ScenarioCollection¶
- 
class 
pywr.core.ScenarioCollection(model)¶ Represents a collection of Scenario objects.
This class is used by a Model instance to hold the defined scenarios and control which combinations of ensembles are used during model execution. By default the product of all scenario ensembles (i.e. all possible combinations of ensembles) is executed. However user defined slices can be set on individual Scenario instances to restrict the number of ensembles executed from that scenario. Alternatively the user may provide an array of the specific ensemble combinations (indices) that should be run. The latter approach takes precedent over the former per Scenario slices.
See also
- 
__init__(*args, **kwargs)¶ Initialize self. See help(type(self)) for accurate signature.
Methods
__init__(*args, **kwargs)Initialize self.
add_scenario(self, Scenario sc)get_combinations(self)Returns a list of ScenarioIndices for every combination of Scenarios
get_scenario_index(self, Scenario sc)Return the index of Scenario in this controller.
ravel_indices(self, int[)setup(self)Attributes
combination_namescombinationsmodelmodel: object
multiindexscenariosshapeuser_combinations-