Esempio n. 1
0
 def optimize(self):
     simulator = Simulator(self.plant)
     evaluator = Evaluator.fromXmlFile(self.configFilename, self.plant)
     optimizer = Optimizer.fromXmlFile(self.configFilename, self.plant,
                                       self.orderList, simulator, evaluator)
     result = optimizer.run()
     best = bestSolution(result)
     best.unNormalize(self.normValue)
     print best
Esempio n. 2
0
 def optimize(self):
     simulator = Simulator(self.plant)
     evaluator = Evaluator.fromXmlFile(self.configFilename, self.plant,
                                       self.normValue)
     optimizer = Optimizer.fromXmlFile(self.configFilename, self.plant,
                                       self.orderList, simulator, evaluator)
     result = optimizer.run()
     best = bestSolution(result)
     best.unNormalize(self.normValue)
     #		for item in best:
     #			if "kettle" in item[1]:
     #				print item[0], item[2]
     print best
Esempio n. 3
0
    def schedule(self):
        """
		Runs the Scheduler with the OrderList from orderListName on the Plant
		with plantName.
		"""
        scheduler = Scheduler(self.plant, self.orderList)
        evaluator = Evaluator.fromXmlFile(self.configFilename, self.plant)
        result = scheduler.start()
        if result != None:
            solutions = parseSolutions(result, self.plant, self.orderList)
            evaluator.evaluate(solutions)
            best = bestSolution(solutions)
            best.unNormalize(self.normValue)
            print best
Esempio n. 4
0
    def run(self):
        simulator = Simulator(self.plant)
        evaluator = Evaluator.fromXmlFile(self.configFilename, self.plant)
        optimizer = Optimizer.fromXmlFile(self.configFilename, self.plant,
                                          self.orderList, simulator, evaluator)
        scheduler = Scheduler(self.plant, self.orderList)

        result = scheduler.start()
        if result != None:
            solutions = parseSolutions(result, self.plant, self.orderList)
            for s in solutions:
                s.loadStartTimes(self.plant)
            result = optimizer.run(solutions)
            best = bestSolution(result)
            best.unNormalize(self.normValue)
            print best