Skip to content

Commit

Permalink
Fix animated log in branching model page
Browse files Browse the repository at this point in the history
  • Loading branch information
Bergam0t committed Nov 17, 2023
1 parent 4db0d96 commit 6930444
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 9 deletions.
6 changes: 3 additions & 3 deletions model_classes.py
Original file line number Diff line number Diff line change
Expand Up @@ -2283,7 +2283,7 @@ def execute(self):
self.full_event_log.append(
{'patient': self.identifier,
'pathway': 'simple_with_branch',
'event': 'treatment_wait_begins',
'event': 'examination_wait_begins',
'event_type': 'queue',
'time': self.env.now}
)
Expand All @@ -2299,7 +2299,7 @@ def execute(self):
self.full_event_log.append(
{'patient': self.identifier,
'pathway': 'simple_with_branch',
'event': 'treatment_begins',
'event': 'examination_begins',
'event_type': 'resource_use',
'time': self.env.now,
'resource_id': examination_resource.id_attribute
Expand All @@ -2316,7 +2316,7 @@ def execute(self):
self.full_event_log.append(
{'patient': self.identifier,
'pathway': 'simple_with_branch',
'event': 'treatment_complete',
'event': 'examination_complete',
'event_type': 'resource_use_end',
'time': self.env.now,
'resource_id': examination_resource.id_attribute}
Expand Down
13 changes: 7 additions & 6 deletions pages/3_🩹_Adding_an_Optional_Step.py
Original file line number Diff line number Diff line change
Expand Up @@ -237,12 +237,12 @@
event_position_df = pd.DataFrame([
{'event': 'arrival', 'x': 50, 'y': 300, 'label': "Arrival" },
# Examination
{'event': 'examination_wait_begins', 'x': 150, 'y': 200, 'label': "Waiting for Examination" },
{'event': 'examination_begins', 'x': 250, 'y': 100, 'resource':'n_exam', 'label': "Being Examined" },
{'event': 'examination_wait_begins', 'x': 270, 'y': 360, 'label': "Waiting for Examination" },
{'event': 'examination_begins', 'x': 270, 'y': 310, 'resource':'n_exam', 'label': "Being Examined" },

# Treatment (optional step)
{'event': 'treatment_wait_begins', 'x': 450, 'y': 200, 'label': "Waiting for Treatment" },
{'event': 'treatment_begins', 'x': 550, 'y': 100, 'resource':'n_cubicles_1', 'label': "Being Treated" },
{'event': 'treatment_wait_begins', 'x': 420, 'y': 110, 'label': "Waiting for Treatment" },
{'event': 'treatment_begins', 'x': 420, 'y': 70, 'resource':'n_cubicles_1', 'label': "Being Treated" },

])

Expand All @@ -264,11 +264,12 @@
include_play_button=True,
display_stage_labels=False,
return_df_only=False,
plotly_height=600,
plotly_height=700,
plotly_width=1000,
override_x_max=500,
override_y_max=400,
wrap_queues_at=10,
wrap_queues_at=20,
icon_and_text_size=18,
time_display_units="dhm",
add_background_image="https://raw.githubusercontent.com/Bergam0t/Teaching_DES_Concepts_Streamlit/main/resources/Branched%20Model%20Background%20Image%20-%20Horizontal%20Layout.drawio.png",
), use_container_width=False)
Expand Down

0 comments on commit 6930444

Please sign in to comment.