Skip to content

Commit

Permalink
added vehicle capacity
Browse files Browse the repository at this point in the history
  • Loading branch information
Paytonco committed Jan 30, 2022
1 parent aac62cc commit 6464e05
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 5 deletions.
4 changes: 2 additions & 2 deletions cityFireFig.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
import matplotlib.pyplot as plt

grid = np.zeros((100,200))
grid[49,57] = 0.9
grid[46:54,125:142] = 0.1
grid[49,57] = 0.8
grid[46:54,125:142] = 0.2


plt.imshow(grid,cmap=plt.get_cmap('gnuplot2'))
4 changes: 2 additions & 2 deletions evacsim.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
timestep = 5

class path:
capacityperkm = 1000

#len is in km, speedlim is in km/hr, out is an object that can accept people (has acceptperson() method, yay for python ambiguity)
def __init__(self, len, speedlim, out):
Expand All @@ -12,7 +11,8 @@ def __init__(self, len, speedlim, out):
self._peoplearr = [0] * round(timestepsonroad+ 0.5)

self._out = out
self._capacityperelement = int(path.capacityperkm * (len / self._peoplearr.__len__()) )
capacityperkm = (speedlim*(3.0/3600.0)+4.5e-3)**-1
self._capacityperelement = int(capacityperkm * (len / self._peoplearr.__len__()) )

def timestep(self):
i = len(self._peoplearr) - 1
Expand Down
Binary file modified figures/setupMatrix.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 0 additions & 1 deletion topModel.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,4 +69,3 @@
evaccomplete += not neighborhoods[n].isempty()
for p in paths:
evaccomplete += not paths[p].isempty()
>>>>>>> a21cf560d4138428872e8becea63fc2ba23c431e

0 comments on commit 6464e05

Please sign in to comment.