SUMO - Simulation of Urban MObility
MSChargingStation.h
Go to the documentation of this file.
1 /****************************************************************************/
2 // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo
3 // Copyright (C) 2001-2017 German Aerospace Center (DLR) and others.
4 /****************************************************************************/
5 //
6 // This program and the accompanying materials
7 // are made available under the terms of the Eclipse Public License v2.0
8 // which accompanies this distribution, and is available at
9 // http://www.eclipse.org/legal/epl-v20.html
10 //
11 /****************************************************************************/
19 // Chargin Station for Electric vehicles
20 /****************************************************************************/
21 #ifndef MSChargingStation_h
22 #define MSChargingStation_h
23 
24 // ===========================================================================
25 // included modules
26 // ===========================================================================
27 #ifdef _MSC_VER
28 #include <windows_config.h>
29 #else
30 #include <config.h>
31 #endif
32 
33 #include <list>
34 #include <string>
35 #include <iostream>
36 #include <fstream>
37 #include <sstream>
39 
40 
41 // ===========================================================================
42 // class declarations
43 // ===========================================================================
44 class MSLane;
45 class MSBusStop;
46 class OptionsCont;
48 
49 
50 // ===========================================================================
51 // class definitions
52 // ===========================================================================
58 public:
59 
61  MSChargingStation(const std::string& chargingStationID, MSLane& lane, double startPos, double endPos,
62  double chargingPower, double efficency, bool chargeInTransit, double chargeDelay);
63 
66 
68  double getChargingPower() const;
69 
71  double getEfficency() const;
72 
74  bool getChargeInTransit() const;
75 
77  double getChargeDelay() const;
78 
80  void setChargingPower(double chargingPower);
81 
83  void setEfficency(double efficency);
84 
86  void setChargeInTransit(bool chargeInTransit);
87 
89  void setChargeDelay(double chargeDelay);
90 
92  void setChargingVehicle(bool value);
93 
98  bool vehicleIsInside(const double position) const;
99 
101  bool isCharging() const;
102 
103  double getTotalCharged() const {
104  return myTotalCharge;
105  }
106 
108  void addChargeValueForOutput(double WCharged, MSDevice_Battery* battery);
109 
112 
113 protected:
114 
116  struct charge {
118  charge(SUMOTime _timeStep, std::string _vehicleID, std::string _vehicleType, std::string _status,
119  double _WCharged, double _actualBatteryCapacity, double _maxBatteryCapacity, double _chargingPower,
120  double _chargingEfficiency, double _totalEnergyCharged) :
121  timeStep(_timeStep),
122  vehicleID(_vehicleID),
123  vehicleType(_vehicleType),
124  status(_status),
125  WCharged(_WCharged),
126  actualBatteryCapacity(_actualBatteryCapacity),
127  maxBatteryCapacity(_maxBatteryCapacity),
128  chargingPower(_chargingPower),
129  chargingEfficiency(_chargingEfficiency),
130  totalEnergyCharged(_totalEnergyCharged) {}
131 
132  // @brief vehicle TimeStep
134  // @brief vehicle ID
135  std::string vehicleID;
136  // @brief vehicle Type
137  std::string vehicleType;
139  std::string status;
140  // @brief W charged
141  double WCharged;
142  // @brief actual battery capacity AFTER charging
144  // @brief battery max capacity
146  // @brief current charging power of charging station
148  // @brief current efficiency of charging station
150  // @brief current energy charged by charging stations AFTER charging
152  };
153 
156 
158  double myEfficiency;
159 
162 
165 
168 
171 
173  std::vector<charge> myChargeValues;
174 
175 private:
178 
181 };
182 
183 #endif
void addChargeValueForOutput(double WCharged, MSDevice_Battery *battery)
add charge value for output
double myTotalCharge
total energy charged by this charging station
MSChargingStation & operator=(const MSChargingStation &)
Invalidated assignment operator.
A lane area vehicles can halt at.
~MSChargingStation()
destructor
charge(SUMOTime _timeStep, std::string _vehicleID, std::string _vehicleType, std::string _status, double _WCharged, double _actualBatteryCapacity, double _maxBatteryCapacity, double _chargingPower, double _chargingEfficiency, double _totalEnergyCharged)
constructor
bool isCharging() const
Return true if in the current time step charging station is charging a vehicle.
void setEfficency(double efficency)
Set efficiency of the charging station.
bool getChargeInTransit() const
Get chargeInTransit.
bool myChargingVehicle
Check if in the current TimeStep chargingStation is charging a vehicle.
void setChargeDelay(double chargeDelay)
Set charge delay of the charging station.
MSChargingStation(const std::string &chargingStationID, MSLane &lane, double startPos, double endPos, double chargingPower, double efficency, bool chargeInTransit, double chargeDelay)
constructor
void setChargingVehicle(bool value)
enable or disable charging vehicle
double getChargeDelay() const
Get Charge Delay.
bool vehicleIsInside(const double position) const
Check if a vehicle is inside in the Charge Station.
void setChargeInTransit(bool chargeInTransit)
Set charge in transit of the charging station.
void writeChargingStationOutput(OutputDevice &output)
write charging station values
double myChargeDelay
Charge Delay.
void setChargingPower(double chargingPower)
Set charging station&#39;s charging power.
struct to save information for the cahrgingStation output
double getEfficency() const
Get efficiency of the charging station.
Battery device for electric vehicles.
bool myChargeInTransit
Allow charge in transit.
double getChargingPower() const
Get charging station&#39;s charging power.
A storage for options typed value containers)
Definition: OptionsCont.h:98
double myEfficiency
Efficiency of the charging station.
std::vector< charge > myChargeValues
vector with the charges of this charging station
Static storage of an output device and its base (abstract) implementation.
Definition: OutputDevice.h:70
long long int SUMOTime
Definition: TraCIDefs.h:51
Representation of a lane in the micro simulation.
Definition: MSLane.h:77
double myChargingPower
Charging station&#39;s charging power.
double getTotalCharged() const