switch-model / switch

A Modern Platform for Planning High-Renewable Power Systems
http://switch-model.org/
Other
129 stars 85 forks source link

Updating Pyomo version #132

Open pesap opened 4 years ago

pesap commented 4 years ago

Dear @mfripp and @josiahjohnston,

I was updating the WECC branch of switch to the most recent stable release from the upstream, but found some errors.

First, it looks like the way it the master branch of switch is coded right now only works for Pyomo==5.6.5 and PyUtilib==5.8.0. If we upgrade to Pyomo 5.7 we can not longer use PyUtilib==5.8.0 due to deprecation of the enum module. The setup.py does not specify this version so by default it install the most recent ones and is not working properly. An easy fix will be to specify this version on the setup.py. However, I think in the long run we want to update to the most recent version of Pyomo. Some people that have reported also this issue: #130

Here is the error when trying to run switch with the most recent version of Pyomo:

ValueError: Unexpected keyword options found while constructing 'AbstractOrderedSimpleSet': rule

Pyomo deprected the rule argument for Abstract set, I think we could simply replace that argument with initialize or validate depending on the set.

I am going to create a pull request for fixing this, but want to know if you are already working on this.

cc @PatyHidalgo