tum-ens / urbs

A linear optimisation model for distributed energy systems
GNU General Public License v3.0
177 stars 132 forks source link

single year example with CO2 objective #272

Open kayaraski opened 4 years ago

kayaraski commented 4 years ago

BUG: When you run urbs with CO2 objective with single year example, program gives an key error for 'Weight' at modelhelper.py line 86 (stf_dist function). This is because there is no distinction between intertemopral model and single year model inside co2_rule function. Both try to call stf_dist(stf,m) directly which expects m.global_prob[stf,'Weight'] to exist. That key does not exists for single year example. @sonercandas