Esempio n. 1
0
 def addAdditionalParams(self, model):
     """
   Add specific Params for DROMKP problems
   @ In, model, pyomo model instance, pyomo abstract model
   @ Out, model, pyomo model instance, pyomo abstract model
 """
     model = MultipleKnapsack.addAdditionalParams(self, model)
     model._lambda = pyomo.Param(within=pyomo.UnitInterval, mutable=True)
     model.alpha = pyomo.Param(within=pyomo.UnitInterval, mutable=True)
     return model
Esempio n. 2
0
 def addAdditionalParams(self, model):
     """
   Add specific Params for DROMKP problems
   @ In, model, pyomo model instance, pyomo abstract model
   @ Out, model, pyomo model instance, pyomo abstract model
 """
     model = MultipleKnapsack.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