def addAdditionalParams(self, model): """ Add specific Params for MCKP problems @ In, model, pyomo model instance, pyomo abstract model @ Out, model, pyomo model instance, pyomo abstract model """ model = MCKP.addAdditionalParams(self, model) model._lambda = pyomo.Param(within=pyomo.UnitInterval, mutable=True) model.alpha = pyomo.Param(within=pyomo.UnitInterval, mutable=True) return model
def addAdditionalParams(self, model): """ Add specific Params for MCKP problems @ In, model, pyomo model instance, pyomo abstract model @ Out, model, pyomo model instance, pyomo abstract model """ model = MCKP.addAdditionalParams(self, model) model.epsilon = pyomo.Param(within=pyomo.NonNegativeReals, mutable=True) model.prob = pyomo.Param(model.sigma, within=pyomo.UnitInterval, mutable=True) # model.dist will be changed on the fly via scenario callback functions model.dist = pyomo.Param(model.sigma, mutable=True) return model