Skip to content
Snippets Groups Projects
Commit 6500d705 authored by fheinrich's avatar fheinrich
Browse files

Plates can be returned clean, Configurable.

parent 23ab623d
No related branches found
No related tags found
1 merge request!52Resolve "gym env"
...@@ -461,7 +461,8 @@ class PlateConfig: ...@@ -461,7 +461,8 @@ class PlateConfig:
"""dirty plates at the start.""" """dirty plates at the start."""
plate_delay: list[int, int] = dataclasses.field(default_factory=lambda: [5, 10]) plate_delay: list[int, int] = dataclasses.field(default_factory=lambda: [5, 10])
"""The uniform sampling range for the plate delay between serving and return in seconds.""" """The uniform sampling range for the plate delay between serving and return in seconds."""
return_dirty: bool = True
"""Specifies if plates are returned dirty or clean to the plate dispenser."""
class PlateDispenser(Counter): class PlateDispenser(Counter):
"""At the moment, one and only one plate dispenser must exist in an environment, because only at one place the dirty """At the moment, one and only one plate dispenser must exist in an environment, because only at one place the dirty
...@@ -522,7 +523,7 @@ class PlateDispenser(Counter): ...@@ -522,7 +523,7 @@ class PlateDispenser(Counter):
def add_dirty_plate(self): def add_dirty_plate(self):
"""Add a dirty plate after a timer is completed.""" """Add a dirty plate after a timer is completed."""
self.occupied_by.appendleft(self.create_item()) self.occupied_by.appendleft(self.create_item(clean=not self.plate_config.return_dirty))
def update_plate_out_of_kitchen(self, env_time: datetime): def update_plate_out_of_kitchen(self, env_time: datetime):
"""Is called from the serving window to add a plate out of kitchen.""" """Is called from the serving window to add a plate out of kitchen."""
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment