Skip to content

Commit

Permalink
Merge pull request #99 from kjang96/inflow_name
Browse files Browse the repository at this point in the history
Resolves #97 This allows for customizable flow names. I add a new optional name parameter to the Inflow class' add function, which defaults to "flow" (what it was originally). Inflow experiments run as expected with this change.
  • Loading branch information
AboudyKreidieh committed Sep 7, 2018
2 parents b48ad14 + 9e7d1fc commit 36f9e34
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion flow/core/params.py
Original file line number Diff line number Diff line change
Expand Up @@ -532,6 +532,7 @@ def __init__(self):
def add(self,
veh_type,
edge,
name="flow",
begin=1,
end=2e6,
vehs_per_hour=None,
Expand Down Expand Up @@ -579,7 +580,7 @@ def add(self,
del kwargs["vehsPerHour"]

new_inflow = {
"name": "flow_%d" % self.num_flows,
"name": "%s_%d" % (name, self.num_flows),
"vtype": veh_type,
"route": "route" + edge,
"end": end
Expand Down

0 comments on commit 36f9e34

Please sign in to comment.