'Pyomo Optimization : Error retrieving component Cpi[1,1]: The component has not been constructed
I am receiving following error: Error retrieving component Cpi[1,1]: The component has not been constructed.
from pyomo.environ import *
#import numpy as np
import matplotlib.pyplot as plt
model = AbstractModel()
#Sets
model.P = RangeSet(1,11) # "P" are the possible processes of a product
model.S = RangeSet(1,10) # "S" are the possible states of a product
model.I = RangeSet(1,3) # "I" are the possible component suppliers
model.J = RangeSet(1,3) # "J" are the possible sub-assembly suppliers
model.K = RangeSet(1,3) # "K" are the possible final assembly supplier
# Parameters
model.Tsp = Param(model.S,model.P)
model.Cpi = Param(model.P,model.I)
model.Cpj = Param(model.P,model.J)
model.Cpk = Param(model.P,model.K)
model.Lpi = Param(model.P,model.I)
model.Lpj = Param(model.P,model.J)
model.Lpk = Param(model.P,model.K)
model.TranCXiXj = Param(model.I,model.J)
model.TranCXjXk = Param(model.J,model.K)
model.TranTXiXj = Param(model.I,model.J)
model.TranTXjXk = Param(model.J,model.K)
Anyone can help me on this ?
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
