Hot answers tagged

2 votes

How to display results of 2-dimensional Pyomo variables in a pandas dataframe

In your specific instance you use only a single index for a two-dimensional variable matrix, causing the KeyError. You should loop over the index sets from your model to produce the results, so for ...
user avatar
2 votes
Accepted

How to display results of Pyomo variables in a pandas dataframe

I don't know your entire code or the errors you get, but the general way is ...
user avatar

Only top scored, non community-wiki answers of a minimum length are eligible