Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

aded max_dur to add_activity #24

Merged
merged 1 commit into from
Nov 15, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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