Skip to content
Snippets Groups Projects
Commit b37e918c authored by shinedday's avatar shinedday
Browse files

Add todo

parent f4471def
No related branches found
No related tags found
No related merge requests found
...@@ -184,6 +184,7 @@ class Agent: ...@@ -184,6 +184,7 @@ class Agent:
A combination of decision and action as called by the framework A combination of decision and action as called by the framework
""" """
self._on_decide_and_act() self._on_decide_and_act()
#TODO : self._compute_criticality() do not return anything.
self._criticality = self._compute_criticality() self._criticality = self._compute_criticality()
def __one_phase_cycle(self): def __one_phase_cycle(self):
......
...@@ -140,7 +140,6 @@ class Amas(Schedulable): ...@@ -140,7 +140,6 @@ class Amas(Schedulable):
# self.remove_pending_agents() # self.remove_pending_agents()
# for current_agent in self._agents: # for current_agent in self._agents:
# self.remove_agent(current_agent) # self.remove_agent(current_agent)
# self.add_agents(agents=self._agents) # self.add_agents(agents=self._agents)
self.on_system_cycle_end() self.on_system_cycle_end()
......
...@@ -21,7 +21,7 @@ class Environment(Schedulable): ...@@ -21,7 +21,7 @@ class Environment(Schedulable):
_index = 0 _index = 0
def __init__(self, scheduling_env): def __init__(self, scheduling_env):
self._params = [] self._params = [] # a delete
self._rand = Random self._rand = Random
self._id = Environment._index self._id = Environment._index
Environment._index += 1 Environment._index += 1
...@@ -47,6 +47,7 @@ class Environment(Schedulable): ...@@ -47,6 +47,7 @@ class Environment(Schedulable):
""" """
return self._id return self._id
#TODO : a delete
def get_params(self) -> Any: def get_params(self) -> Any:
""" """
return Environment params return Environment params
......
...@@ -238,6 +238,7 @@ class Scheduler: ...@@ -238,6 +238,7 @@ class Scheduler:
for schedulable in self._schedulables: for schedulable in self._schedulables:
schedulable.cycle() schedulable.cycle()
if self.get_sleep() != 0: if self.get_sleep() != 0:
#TODO : pas de référence a sleep ??
sleep(self.get_sleep()) sleep(self.get_sleep())
for schedulable in self._schedulables: for schedulable in self._schedulables:
must_stop |= schedulable.stop_condition() must_stop |= schedulable.stop_condition()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment