Browse Source

Mise à jour de l'age des molecules a chaque passage

Bastien Sevajol 9 years ago
parent
commit
78ec51fed7

+ 3 - 0
intelligine/simulation/molecule/Molecule.py View File

25
     def get_cycle_age(self):
25
     def get_cycle_age(self):
26
         return self._cycle_age
26
         return self._cycle_age
27
 
27
 
28
+    def set_cycle_age(self, cycle_age):
29
+        self._cycle_age = cycle_age
30
+
28
     def increment_intensity(self, increment_value):
31
     def increment_intensity(self, increment_value):
29
         self._intensity += increment_value
32
         self._intensity += increment_value

+ 1 - 0
intelligine/synergy/stigmergy/MoleculesManager.py View File

39
                                          cycle_age=cycle_age)
39
                                          cycle_age=cycle_age)
40
 
40
 
41
         position_molecule.increment_intensity(apposed_molecule.get_intensity())
41
         position_molecule.increment_intensity(apposed_molecule.get_intensity())
42
+        position_molecule.set_cycle_age(cycle_age)
42
 
43
 
43
         if apposed_molecule.get_distance() < position_molecule.get_distance():
44
         if apposed_molecule.get_distance() < position_molecule.get_distance():
44
             position_molecule.set_distance(apposed_molecule.get_distance())
45
             position_molecule.set_distance(apposed_molecule.get_distance())