Hi team Pyomo,
I shall kindly be glad for your help in understanding how to fix the above-stated error I am experiencing with my model. This error seems to be coming from the constraint formulation below in my model:
def constrELEVEN_rule(model, i):
if model.x[i,1] == 1:
return (model.K <= model.u[i] <= model.L)
model.consExBoundingB = pyo.Constraint(model.U, rule=constrELEVEN_rule)
In my model, I have defined the variable " u[i] " as ==>> model.u = pyo.Var(model.J, within=pyo.PositiveIntegers),
And "model.J" is also defined in my model as ====>> model.I = pyo.Set(initialize=[1,2,3,...], within=pyo.PositiveIntegers)
I have attached a snapshot of the data (.data file) for my model for your perusal. From the attached data, there's indeed a value for the arc x[2,1], but I am still getting this error message below:
"File "C:\Users\myUsername\Anaconda2\lib\site-packages\pyomo\core\kernel\numvalue.py", line 170, in value
ValueError: No value for uninitialized NumericValue object x[2,1]; No value for uninitialized NumericValue object x[2,1] "
I have done all I could, but can't seem to figure it out.
Thanks in advance for your help.