- Ref to Camp in Bus.
- Override arrive() in bus to
notify camp.
- isAllArrived() changed to implement camp.isDone().
Should be a bit faster
Signed-off-by: HeshamTB <hishaminv@gmail.com>
- Added movment in vehicle.
- Now Campaign sets Routes for
it's Vehicles.
- Fixed Array size of stdRoutes
- Added getShortestRoute(Campaign)
and getRoutesToDistrict(District)
in MakkahCity
Signed-off-by: HeshamTB <hishaminv@gmail.com>
- Defined static lists and arrays holding
All object references.
- Generate campaigns with random number range
based on Area. This is based on estimate of
real values and density of the Districts in
Makkah.
- Main loop is made and limited by
PDate.isEnded() which is static variable
indicates the end of the timeline.
The incrementor is PDate.step(key,value)
Simulation begins...
- H.B.
Signed-off-by: HeshamTB <hishaminv@gmail.com>
- Buses now have fixed vehicle length
stored in STD_BUS_SIZE and are constructed
without parameters.
- Fixed generateBuses() in Campaign
to not be public and used one in practice
Signed-off-by: HeshamTB <hishaminv@gmail.com>
- Added getCombinedLength(). Returns
sum of the length of each lane on street
- Fixed addVehicle() condition to be relative
to the provided vehicle plus padding
Signed-off-by: HeshamTB <hishaminv@gmail.com>
vehicles is null, thus, can't use .add() in generateBusses()
First make an Object in generateBusses() then fill with add().
Or make generateBusses() only add to an instance member
(i.e. construct with ref with instance)
Signed-off-by: HeshamTB <hishaminv@gmail.com>
- Make PDate a static class or all
methods and members are static to
be used in the main implementation
(Makkah)
- isValidTime(Date) method to check
if date is within simulation timeline