Skip to content

Commit

Permalink
aded max_dur to add_activity
Browse files Browse the repository at this point in the history
  • Loading branch information
tnoud committed Nov 14, 2023
1 parent 917bf8a commit 595e6f2
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion matsim/writers.py
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ def end_plan(self):
self._write_line('</plan>')

def add_activity(self, type: str, x: float, y: float, facility_id: str = None,
start_time: int = None, end_time: int = None, attributes: dict = None):
start_time: int = None, end_time: int = None, max_dur: int = None, attributes: dict = None):
self._require_scope(self.PLAN_SCOPE)
self._write_indent()
self._write('<activity ')
Expand All @@ -162,6 +162,7 @@ def add_activity(self, type: str, x: float, y: float, facility_id: str = None,
if facility_id is not None: self._write(f'facility="{facility_id}" ')
if start_time is not None: self._write(f'start_time="{self.time(start_time)}" ')
if end_time is not None: self._write(f'end_time="{self.time(end_time)}" ')
if max_dur is not None: self._write(f'max_dur="{self.time(max_dur)}" ')
if attributes:
self._write('>\n')
self.indent += 1
Expand Down

0 comments on commit 595e6f2

Please sign in to comment.