Closed ThomasHeggarty closed 4 years ago
I've added a simple test which runs the model using the included UTOPIA model. I notice that these changes have caused the test to fail with the following error:
$ pyomo solve --solver=glpk osemosys.py UTOPIA_2015_08_27.dat
[ 0.00] Setting up Pyomo environment
[ 0.00] Applying Pyomo preprocessing actions
[ 0.34] Creating model
ERROR: Rule failed when generating expression for constraint
FuelProductionByTechnologyAnnual with index ('UTOPIA', 'E01', 'CSV',
1990): KeyError: "Index '('UTOPIA', 'E01', 'CSV', 1990, 'ID')' is not
valid for indexed component 'ProductionByTechnology'"
ERROR: Constructing component 'FuelProductionByTechnologyAnnual' from
data=None failed:
KeyError: "Index '('UTOPIA', 'E01', 'CSV', 1990, 'ID')' is not valid
for indexed component 'ProductionByTechnology'"
[ 9.55] Pyomo Finished
ERROR: Unexpected exception while running model:
Index '('UTOPIA', 'E01', 'CSV', 1990, 'ID')' is not valid for indexed
component 'ProductionByTechnology'
The command "pyomo solve --solver=glpk osemosys.py UTOPIA_2015_08_27.dat" exited with 1.
Sorry about this, it is due to an inconsistency in the order in which sets appear in constraint definitions. Here is the correction.
@ThomasHeggarty - if you just make another commit on this same branch, you're changes will update the pull request.
@willu47 - Sorry, still trying to get my head around github.
As agreed. Closes #8