From 01cd8b263d7e75cbb7ee3057d73300466ca005e4 Mon Sep 17 00:00:00 2001 From: Jdrezen <jeremie.drezen@gmail.com> Date: Mon, 10 May 2021 17:49:22 +0200 Subject: [PATCH] Modification pour tester les courbes --- .../controleurPhilosophersExample.py | 27 ++++++++++--------- 1 file changed, 14 insertions(+), 13 deletions(-) diff --git a/philosopher_example/controleurPhilosophersExample.py b/philosopher_example/controleurPhilosophersExample.py index 2b8fbe1..7e33269 100644 --- a/philosopher_example/controleurPhilosophersExample.py +++ b/philosopher_example/controleurPhilosophersExample.py @@ -11,8 +11,8 @@ class ControleurPhilosophersExample(Controleur): self.__numberPhilosopher = 10 self.__barChart = [] self.__barChart.append(self.addBarChart('Eaten Pastas')) - self.__barChart.append(self.addBarChart('Hours of tkinking')) - self.__barChart.append(self.addBarChart('Hours of hunger')) + #self.__barChart.append(self.addBarChart('Hours of tkinking')) + #self.__barChart.append(self.addBarChart('Hours of hunger')) def initialisation(self): @@ -22,16 +22,16 @@ class ControleurPhilosophersExample(Controleur): # Init self.setTitle(self.__barChart[0],'Eaten Pastas') - self.setXLabel(self.__barChart[0],'Philosophers') - self.setYLabel(self.__barChart[0],'Number of eaten pastas') + #self.setXLabel(self.__barChart[0],'Philosophers') + #self.setYLabel(self.__barChart[0],'Number of eaten pastas') - self.setTitle(self.__barChart[1],'Hours of thinking') - self.setXLabel(self.__barChart[1],'Philosophers') - self.setYLabel(self.__barChart[1],'Hours') + #self.setTitle(self.__barChart[1],'Hours of thinking') + #self.setXLabel(self.__barChart[1],'Philosophers') + #self.setYLabel(self.__barChart[1],'Hours') - self.setTitle(self.__barChart[2],'Hours of hunger') - self.setXLabel(self.__barChart[2],'Philosophers') - self.setYLabel(self.__barChart[2],'Hours') + #self.setTitle(self.__barChart[2],'Hours of hunger') + #self.setXLabel(self.__barChart[2],'Philosophers') + #self.setYLabel(self.__barChart[2],'Hours') self.draw_text(40,15, "EATING") self.draw_text(40,45, "THINKING") @@ -51,9 +51,10 @@ class ControleurPhilosophersExample(Controleur): self.__philosophers.append(carre) nom = 'Mr ' + str(i) - self.addColumn(self.__barChart[0],nom) - self.addColumn(self.__barChart[1],nom) - self.addColumn(self.__barChart[2],nom) + self.addPoint(self.__barChart[0],x,y) + #self.addColumn(self.__barChart[0],nom) + #self.addColumn(self.__barChart[1],nom) + #self.addColumn(self.__barChart[2],nom) def updateCycle(self, env, amas): agents = amas.get_Agents_Sorted() -- GitLab