I'm trying to work with Pyomo and an external framework that allows for asNMPC optimization (from this paper).
I installed the version of Pyomo they tested with (v 4.1.10519) and made the changes to the core Pyomo files they requested but I get the following error when I try to run one of the test files (Penicillin_asNMPC.py):
File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib /python2.7/site-packages/pyomo/dae/plugins/colloc.py", line 482, in reduce_collocation_points
if diffset.type() is not DifferentialSet:
NameError: global name 'DifferentialSet' is not defined
Comparing this version of Pyomo to some comments online seems to indicated that there used to be a file called differential.py but it may have been renamed to contset.py. Meaning that 'DifferentialSet' was changed to the variable 'ContinuousSet'. However, since I followed all the requested changes and I'm using the recommend version of Pyomo, I figured that I should not be having this problem.
Just wondering if anyone has had any issues with using this framework/has any helpful advice.
Thanks!
Based on the error you're seeing my guess is that the old version of Pyomo was not uninstalled completely. You should uninstall Pyomo using the script mentioned in this blog post and then reinstall the new version.