Skip to content

Commit

Permalink
Merge pull request #2 from cnyahia/master
Browse files Browse the repository at this point in the history
Update utils.py
  • Loading branch information
cnyahia authored May 7, 2020
2 parents 30cbf48 + 0796726 commit 19273d9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ def m(vmax, rho):
v=np.full(vmax.shape,0.0)
for key, vmaxVal in enumerate(vmax):
rhoCritical = (80.0*100*300)/(vmaxVal*(300 - 80) + 80*100) # update rho critical given current vmax
if rho < rhoCritical:
if rho <= rhoCritical:
v[key] = vmaxVal
elif rho > rhoCritical:
v[key] = float(vmaxVal*(rhoCritical)*(300.0 - rho))/(rho*(300.0 - rhoCritical))
Expand Down Expand Up @@ -168,4 +168,4 @@ def lengthToCell(locKm):
cell_loc = list()
for loc in locKm:
cell_loc.append(int(loc*(18.0/5)-0.5))
return cell_loc
return cell_loc

0 comments on commit 19273d9

Please sign in to comment.