7 #ifndef INC_RCGDRONE_H_ 8 #define INC_RCGDRONE_H_ 25 #include "beeline_route.h" 26 #include "parabolic_route.h" 27 #include "smart_route.h" 138 void SetRoute(std::vector<vector<float>>);
214 bool alreadyNotified =
false;
215 bool isCurrentlyCharging =
false;
216 std::vector<std::vector<float>> route;
218 std::vector<float> PositionOfStation;
RechargeDrone(const picojson::object &val)
Definition: recharge_drone.cc:10
float GetBatteryMaxCharge()
This returns the max charge of the recharge drone's battery.
Definition: recharge_drone.cc:105
void GetStatus()
Overwritten GetStatus from ASubject. This function creates the arguments required by Notify function ...
Definition: recharge_drone.cc:162
vector< float > GetPositionOfStation()
This function Get the position of the station(SetPositionOfStation)
Definition: recharge_drone.cc:195
bool IsCurrentlyCharging()
This function will charge the recharging drone at the station when there is no DeadCarrier.
Definition: recharge_drone.cc:60
void SetRoute(std::vector< vector< float >>)
This function adds a full route to route attribute of the carrier This is useful when use for the Get...
Definition: recharge_drone.cc:132
bool BatteryFull()
This function checks the battery Capacity to see if it's full or not. This function should be called ...
Definition: recharge_drone.cc:97
bool IsChargingACarrier()
This function should check the DeadCarrier pointer if its null or not and check if the DeadCarrier is...
Definition: recharge_drone.cc:178
void SetDeadCarrier(Carrier *carrier)
This function set the DeadCarrier Pointer to a new carrier.
Definition: recharge_drone.cc:182
std::vector< float > NextPosition()
This function returns the next position in std::vector<float> in the queue that the carrier needs to ...
Definition: recharge_drone.cc:137
Definition: asubject.cc:3
void PopPosition()
This function pops the first element/position in the position queue of the carrier.
Definition: recharge_drone.cc:148
float GetSpeed()
return the current speed of the carrier
Definition: recharge_drone.cc:128
void ChargeFromStation(float dt)
This function will charge the recharging drone at the station when there is no DeadCarrier.
Definition: recharge_drone.cc:64
Carrier * GetDeadCarrier()
This function set the DeadCarrier Pointer to a new carrier.
Definition: recharge_drone.cc:187
bool BatteryDead()
This checks if the recharging drone is out of battery.
Definition: recharge_drone.cc:93
A representation of a drone It stores the drone's name, ID, version, position, direction, speed, and dynamic mode.
Definition: recharge_drone.h:38
void Update(float dt)
This is an inherited method from EntityBase to use for DeliverySimulation. This updates the position ...
Definition: recharge_drone.cc:199
bool Charging(float)
This function is used to charge the battery of the carrier for a certain amount of time in seconds...
Definition: recharge_drone.cc:109
bool IsChargingCarrierFull(float dt)
This function will charge the DeadCarrier if the DeadCarrier is not charged to full. After the DeadCarrier get charged to full it will set the DeadCarrier Charging Status to false so the simulation will know the DeadCarrier is ready to be schduled.
Definition: recharge_drone.cc:77
void SetPositionOfStation(vector< float > station)
This function set the position of the station(SetPositionOfStation) to a new position.
Definition: recharge_drone.cc:191
RouteStrategy * GetRouteStrategy()
return the Route Strategy that the carrier uses, such as Smart Route, Beeline, or Parabolic Route ...
Definition: recharge_drone.cc:174
float GetBattery()
This returns the time in secs left in the carrier's battery.
Definition: recharge_drone.cc:101
The base class for creating entities.
Definition: entity_base.h:27
void SetSpeed(float)
This sets the speed of the carrier. Change the speed of the carrier if the argument is a non-negative...
Definition: recharge_drone.cc:122
A representation of a carrier An abstract base class for delivery transportation clases like Drone or...
Definition: carrier.h:31
void SetPosition(std::vector< float > v)
This function uses to set the new position of the carrier. However, carrier only moves in simulation ...
Definition: recharge_drone.cc:113
This is the Route Strategy class where we can use the interface to decide which type of route behavio...
Definition: route_strategy.h:24
This is the Abstract Subject class from which our subjects will inherit Implements the Observer/subje...
Definition: asubject.h:22
void SetDynamic(bool dynamic_)
This changes the dynamic of the recharge drone. Note that for the recharge drone to move on the simul...
Definition: recharge_drone.cc:118