44std::vector<std::string>
45ChargingStation::getIDList() {
46 std::vector<std::string> ids;
48 ids.push_back(item.first);
50 std::sort(ids.begin(), ids.end());
56ChargingStation::getIDCount() {
57 return (
int)getIDList().size();
90std::vector<std::string>
92 std::vector<std::string> result;
94 result.push_back(veh->getID());
149ChargingStation::getParameter(
const std::string& stopID,
const std::string& param) {
150 return getChargingStation(stopID)->getParameter(param,
"");
157ChargingStation::setParameter(
const std::string& stopID,
const std::string& key,
const std::string&
value) {
158 getChargingStation(stopID)->setParameter(key,
value);
171std::shared_ptr<VariableWrapper>
181 return wrapper->wrapStringList(objID, variable, getIDList());
183 return wrapper->wrapInt(objID, variable, getIDCount());
185 return wrapper->wrapString(objID, variable,
getLaneID(objID));
187 return wrapper->wrapDouble(objID, variable,
getStartPos(objID));
189 return wrapper->wrapDouble(objID, variable,
getEndPos(objID));
191 return wrapper->wrapString(objID, variable,
getName(objID));
195 return wrapper->wrapStringList(objID, variable,
getVehicleIDs(objID));
199 return wrapper->wrapDouble(objID, variable,
getEfficiency(objID));
206 return wrapper->wrapString(objID, variable, getParameter(objID, paramData->
readString()));
209 return wrapper->wrapStringPair(objID, variable, getParameterWithKey(objID, paramData->
readString()));
const std::string invalid_return< std::string >::value
@ SUMO_TAG_CHARGING_STATION
A Charging Station.
#define LIBSUMO_SUBSCRIPTION_IMPLEMENTATION(CLASS, DOM)
#define LIBSUMO_GET_PARAMETER_WITH_KEY_IMPLEMENTATION(CLASS)
C++ TraCI client API implementation.
static int getChargeInTransit(const std::string &stopID)
static double getEndPos(const std::string &stopID)
static MSStoppingPlace * getChargingStation(const std::string &id)
LIBSUMO_ID_PARAMETER_API static LIBSUMO_SUBSCRIPTION_API void setChargingPower(const std::string &stopID, double power)
static std::string getLaneID(const std::string &stopID)
static std::vector< std::string > getVehicleIDs(const std::string &stopID)
static void setChargeDelay(const std::string &stopID, double delay)
static double getChargingPower(const std::string &stopID)
static std::shared_ptr< VariableWrapper > makeWrapper()
static double getChargeDelay(const std::string &stopID)
static std::string getName(const std::string &stopID)
static int getVehicleCount(const std::string &stopID)
static void setChargeInTransit(const std::string &stopID, bool inTransit)
static double getStartPos(const std::string &stopID)
static bool handleVariable(const std::string &objID, const int variable, VariableWrapper *wrapper, tcpip::Storage *paramData)
static double getEfficiency(const std::string &stopID)
static void setEfficiency(const std::string &stopID, double efficiency)
static ContextSubscriptionResults myContextSubscriptionResults
static SubscriptionResults mySubscriptionResults
static MSNet * getInstance()
Returns the pointer to the unique instance of MSNet (singleton).
Representation of a vehicle.
static MSStoppingPlace * getStoppingPlace(const std::string &id, const SumoXMLTag type)
virtual std::string readString()
virtual int readUnsignedByte()
TRACI_CONST int VAR_STOP_STARTING_VEHICLES_NUMBER
TRACI_CONST int VAR_CS_POWER
TRACI_CONST int TRACI_ID_LIST
std::map< std::string, libsumo::SubscriptionResults > ContextSubscriptionResults
TRACI_CONST int VAR_CS_CHARGE_DELAY
TRACI_CONST int VAR_CS_EFFICIENCY
TRACI_CONST int VAR_CS_CHARGE_IN_TRANSIT
TRACI_CONST int VAR_POSITION
std::map< std::string, libsumo::TraCIResults > SubscriptionResults
{object->{variable->value}}
TRACI_CONST int VAR_PARAMETER
TRACI_CONST int VAR_LANEPOSITION
TRACI_CONST int VAR_LANE_ID
TRACI_CONST int VAR_PARAMETER_WITH_KEY
TRACI_CONST int VAR_STOP_STARTING_VEHICLES_IDS