jckantor/ND-Pyomo-Cookbook

error in 4.2.8 and 4.2.9 (caused by Var m.z ?)

mriepi opened this issue · 2 comments

I receive the error message when running 4.2.8:

Bildschirmfoto 2022-03-09 um 16 18 41

I found that the following solves the problem:
'machine': [mach for mach in MACHINES if value(m.z[j,mach])][0]
The value() is necessary.

Yes, the problem was accessing the pyomo object rather than retrieving the value. This is fixed (sorry for the delay). Thanks!