Actually I rejoiced too quickly. I've managed to write the equivalent code for extra_functionality for optimization without pyomo, and it runs fine for simulation with a low number of snapshots. But for a year of hourly snapshots, I cannot seem to get to the end of the simulation (takes forever) when using optimization without pyomo.
I'm using .csv files for the variable marginal costs of stores, which look like this:
snapshots,hydrogen,grid
0,50.74,51.52
1,50.74,51.95
2,50.74,65
3,50.74,51.97
4,50.74,41.92
5,50.74,38.97
6,50.74,37.69
7,50.74,37.38
...
Do I need to change the syntax so that I don't get the error message when using pyomo?