vicelab / cen-sierra-pywr

Code base for modeling the central Sierra Nevada hydropower systems
4 stars 7 forks source link

Revise all code to use scenario-safe class attributes #86

Closed drheinheimer closed 4 years ago

drheinheimer commented 4 years ago

As a result of #80, we need to thoroughly revise the entire codebase to account for the fact that parameters are not scenario-safe. From #80, for reference:

    def setup(self):
        super().setup()
        num_scenarios = len(self.model.scenarios.combinations)
        self.can_pump = np.empty([num_scenarios], np.bool)

self.can_pump is now an array, and can be assigned/accessed with self.can_pump[scenario_index.global_id]

drheinheimer commented 4 years ago

This has now been done.