- 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
Since every occurrence of collide should set
currentAccident and broken for all cars, use
setCurrentAccident() for both cars in collide()
which sets both values.
Signed-off-by: HeshamTB <hishaminv@gmail.com>
isDone() checks all invovlved CivilVehicles
in Accident instance. If any car has reference
to 'this' then it is still not done.
Done would be true if fix() of each car is invoked.
Signed-off-by: HeshamTB <hishaminv@gmail.com>
General improved constructors with regard to
agreed upon final UML.
generateUID() method to set UID for camp
in constructors based on the new static int
'numberOfCampaigns'. 0001, 0002, ...
The type os UID is now String to accommodate
the leading zeros.
Signed-off-by: HeshamTB <hishaminv@gmail.com>
Add Street Object for Accident as location
for Instances of Accident.
Removed 'isInAccident()' from 'Breakable' interface
The idea is from Previous suggested UML that replaces
Broken and Accident with getStatus() that gives info about
Breakable object. isBroken() now returns 1 if its eaither in
Accident or Broken. Can check getCurrentAccident() for null.
Signed-off-by: HeshamTB <hishaminv@gmail.com>
Signed-off-by: HeshamTB <hishaminv@gmail.com>
Update according to UML
Set vehicles for camp
new Constructor for camp
Enum for District and Mashier. This will be set as endpoints
for Streets, Routes or Campaigns.
Signed-off-by: HeshamTB <hishaminv@gmail.com>
Removed the check on date of accidnet due
to incomplete information. The start date of
the simulation will be a static object in the
future. Implement checks when added. TODO is
there to reminde.
Signed-off-by: HeshamTB <hishaminv@gmail.com>