A representation of a drone It stores the drone's name, ID, version, position, direction, speed, and dynamic mode.
More...
|
| RechargeDrone (const picojson::object &val) |
|
| RechargeDrone (RechargeDrone &) |
| Copy Constructor. This creates a new instance of recharing drone that has the same content as the Package argument. More...
|
|
bool | IsCurrentlyCharging () |
| This function will charge the recharging drone at the station when there is no DeadCarrier. More...
|
|
void | ChargeFromStation (float dt) |
| This function will charge the recharging drone at the station when there is no DeadCarrier. More...
|
|
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. More...
|
|
bool | BatteryDead () |
| This checks if the recharging drone is out of battery. More...
|
|
float | GetBattery () |
| This returns the time in secs left in the carrier's battery.
|
|
float | GetBatteryMaxCharge () |
| This returns the max charge of the recharge drone's battery.
|
|
bool | Charging (float) |
| This function is used to charge the battery of the carrier for a certain amount of time in seconds. More...
|
|
void | SetSpeed (float) |
| This sets the speed of the carrier. Change the speed of the carrier if the argument is a non-negative float number. More...
|
|
float | GetSpeed () |
| return the current speed of the carrier
|
|
void | SetPosition (std::vector< float > v) |
| This function uses to set the new position of the carrier. However, carrier only moves in simulation if its dynamic attribute is set to true. More...
|
|
void | SetDynamic (bool dynamic_) |
| This changes the dynamic of the recharge drone. Note that for the recharge drone to move on the simulation, dynamic of the recharge drone must be set to true. More...
|
|
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 GetPath() function from IGraph class. More...
|
|
std::vector< float > | NextPosition () |
| This function returns the next position in std::vector<float> in the queue that the carrier needs to move to.
|
|
void | PopPosition () |
| This function pops the first element/position in the position queue of the carrier.
|
|
void | Update (float dt) |
| This is an inherited method from EntityBase to use for DeliverySimulation. This updates the position of the carrier on the simulation if the position changes and its dynamic is set to true. In addition, this function also checks if the carrier is in within distance with the package to pick it up, or within distance with the customer to drop off the package.
|
|
void | GetStatus () |
| Overwritten GetStatus from ASubject. This function creates the arguments required by Notify function and makes call to Notify function. This function should be called when path is added to the carrier and when the carrier becomes idle. More...
|
|
void | SetDeadCarrier (Carrier *carrier) |
| This function set the DeadCarrier Pointer to a new carrier. More...
|
|
Carrier * | GetDeadCarrier () |
| This function set the DeadCarrier Pointer to a new carrier. More...
|
|
void | SetPositionOfStation (vector< float > station) |
| This function set the position of the station(SetPositionOfStation) to a new position. More...
|
|
vector< float > | GetPositionOfStation () |
| This function Get the position of the station(SetPositionOfStation) More...
|
|
bool | IsChargingACarrier () |
| This function should check the DeadCarrier pointer if its null or not and check if the DeadCarrier is getting charged or not. This function should be called in the simulation that to check the status of the recharging_drone. If its charing a DeadCarrier then does not need to Update the recharging drone. More...
|
|
RouteStrategy * | GetRouteStrategy () |
| return the Route Strategy that the carrier uses, such as Smart Route, Beeline, or Parabolic Route More...
|
|
bool | BatteryFull () |
| This function checks the battery Capacity to see if it's full or not. This function should be called in IsChargingCarrierFull() to check if the DeadDrone need to be charged more. More...
|
|
const picojson::object & | GetDetails () |
|
int | GetId () const |
|
const std::string & | GetName () |
|
const std::vector< float > & | GetPosition () const |
|
const std::vector< float > & | GetDirection () const |
|
float | GetRadius () const |
|
int | GetVersion () const |
|
bool | IsDynamic () const |
|
float | DistanceBetween (IEntity *another) |
|
bool | IsWithin (IEntity *another) |
|
std::string | GetType () |
|
virtual | ~IEntity () |
| The destructor.
|
|
void | Attach (entity_project::IEntityObserver *observer) |
| Adds an observer to the list of observers for this subject. More...
|
|
void | Detach (entity_project::IEntityObserver *observer) |
| Deletes an observer from the list of observers for this subject. More...
|
|
std::vector< entity_project::IEntityObserver * > | GetList () |
| Getter function for the list of observers (mostly used in testing) More...
|
|
void | Notify (picojson::value &event, const entity_project::IEntity &entity) |
| Sends out Notification to the observer watching this subject. More...
|
|
A representation of a drone It stores the drone's name, ID, version, position, direction, speed, and dynamic mode.