mjcortejo / csc931m-complex-systems

This repository contains the projects done for the CSC931M class
0 stars 0 forks source link

Implement Parking Capacity #33

Closed mjcortejo closed 1 year ago

mjcortejo commented 1 year ago
  1. Cars should also leave at the same amount it entered the parking capacity.
  2. Remove spawning in Parking lots,
  3. Cars can only spawn if cars_occupied in parking lot is > 0
  4. Implement random time that cars would stay in these lots and if 0, make them leave out of the parking
mjcortejo commented 1 year ago

Might have to implement weighted probability of choices [car will leave, car will stay], using these functions:

https://pynative.com/python-weighted-random-choices-with-probability/

https://stackoverflow.com/questions/4265988/generate-random-numbers-with-a-given-numerical-distribution/41852266#41852266

mjcortejo commented 1 year ago

Was thinking of implementing a timer based implementation instead, but still using normal distribution between a time range.

ex. [500, 1000] ticks

Need to brainstorm

mjcortejo commented 1 year ago

Ok it actually works.

The theoretical impact of a different lower mean value could mean higher priced tickets.

Issues: On the normal distribution when the array is clipped after performing normal distribution, a lot of them contain more values from the minimum clip value (e.g. 500) . We might just have to remove all values from the minimum instead

mjcortejo commented 1 year ago

Will remove min values in another branch, will close this one