Hello, the latest development version (23666) supports battery device state retrieval via TraCI ( http://sumo.dlr.de/wiki/TraCI/Vehicle_Value_Retrieval#Device_Parameter_Retrieval_0x7e ). To retrieve the consumption via traci.vehicle.getElectricityConsumption() is currently not working but will be fixed in the near future. regards, Jakob
2017-03-24 14:32 GMT+01:00 Pablo Báez González <[email protected]>: > Hi everybody, > > I am simulating an EV, declared as in Models/Electric Sumo wiki: > > http://www.sumo.dlr.de/userdoc/Models/Electric.html > > <vType id="EV" accel="1.0" decel="1.0" maxSpeed="100.0" sigma="0.0" > minGap="2.5" color="1,1,1"> > <param key="maximumBatteryCapacity" value="40000"/> > <param key="vehicleMass" value="10000"/> > <param key="frontSurfaceArea" value="5"/> > <param key="airDragCoefficient" value="0.6"/> > <param key="internalMomentOfInertia" value="0.01"/> > <param key="radialDragCoefficient" value="0.5"/> > <param key="rollDragCoefficient" value="0.01"/> > <param key="constantPowerIntake" value="500"/> > <param key="propulsionEfficiency" value="0.9"/> > <param key="recuperationEfficiency" value="0.9"/> > </vType> > > <vehicle id="0" type="EV" depart="0.00"> > <param key = "actualBatteryCapacity" value="20000"/> > <route edges="134238 ... 059927"/> > </vehicle> > > As the actualBatteryCapacity attribute is not yet accesible via traci > (perhaps it might be soon <http://sumo.dlr.de/trac.wsgi/ticket/2344>) I'm > using getElectricityConsumption('0') to obtain the electric consumption > during the last timestep, in order to manually update the battery content > outside Sumo. However, this command always return 0.0 kWh, no matter the > distance covered. > > Am I missing something? > > Thank you in advance for your kind help. > > Best regards, > > Pablo > ------------------------------------------------------------ > ------------------ > Check out the vibrant tech community on one of the world's most > engaging tech sites, Slashdot.org! http://sdm.link/slashdot > _______________________________________________ > sumo-user mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/sumo-user > ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot _______________________________________________ sumo-user mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/sumo-user
