1 #ifndef SIMULATION_MODEL_H_
2 #define SIMULATION_MODEL_H_
8 #include "CompositeFactory.h"
10 #include "MultiDeliveryDecorator.h"
11 #include "IController.h"
13 #include "IObserver.h"
94 void notify(
const std::string& message)
const;
121 std::deque<Package*> scheduledDeliveries;
123 std::deque<Drone*> deadDrones;
125 std::deque<Drone*> functionalDrones;
127 std::deque<Drone*> chargingDrones;
131 std::vector<POI*> pois;
133 std::vector<MultiDeliveryDecorator*> drones;
137 std::map<int, IEntity*> entities;
138 std::set<int> removed;
146 std::vector<Vector3> rechargeStations;
Factory method for composite class. Inherits from IEntityFactory.
Definition: CompositeFactory.h:10
class for IController used for transit service. Uses the Model View
Definition: IController.h:15
Represents an entity in a physical system.
Definition: IEntity.h:22
Interface for Observer.
Definition: IObserver.h:10
Manages a picojson::object, works with JsonValue to provide implicit casting.
Decorator allowing for drones to make multiple deliveries, inherits from IObserver and DroneDecorator...
Definition: MultiDeliveryDecorator.h:15
Represents a point of interest in a physical system. Drones are able to make pitstops at these POIs i...
Definition: POI.h:15
Class SimulationModel handling the transit simulation. it can communicate with the controller.
Definition: SimulationModel.h:30
IEntity * createEntity(const JsonObject &entity)
Creates a new simulation entity.
void removeRechargeStation(Vector3 station)
remove a recharge station position from the list mainly used by recharge drones when they leave after...
void notify(const std::string &message) const
Notifies observer with specific message.
void stop()
Stops the simulation.
void removeFromSim(int id)
Removes the model from the simulation.
void scheduleTrip(const JsonObject &details)
Schedule a trip for an object in the scene.
std::vector< Vector3 > getRechargeStations() const
Get all the Recharge Station positions.
void update(double dt)
Update the simulation.
void addRechargeStation(Vector3 station)
add a recharge station position to the list mainly used by recharge drones when they arrive near the ...
void removeEntity(int id)
Removes entity with given ID from the simulation.
void setGraph(const routing::Graph *graph)
Set the Graph for the SimulationModel.
~SimulationModel()
Destructor.
SimulationModel(IController &controller)
Default constructor that create the SimulationModel object.
const routing::Graph * getGraph() const
Returns the graph of the map.
a simple class used for vector math, most function are self explanatory
Definition: vector3.h:12