eclipse-sumo / sumo

Eclipse SUMO is an open source, highly portable, microscopic and continuous traffic simulation package designed to handle large networks. It allows for intermodal simulation including pedestrians and comes with a large set of tools for scenario creation.
https://eclipse.dev/sumo
Eclipse Public License 2.0
2.54k stars 1.43k forks source link

SUMO electric Vehicle when used with charging station gets zero energy charged #13644

Closed Nitinyerra closed 1 year ago

Nitinyerra commented 1 year ago

Add your issue description here. The electric vehicle which loops for around 8 iterations through the road created with a charging station in between with 22000mW and 100m distance gets zero energy charged in the charging station.xml even with the vehicle charge in Transit mode

I have also tried using the result will be the same

If possible, upload an example that shows your problem. the code is added here

The rou.xml:

<routes>
    <!-- VTypes -->
    <vType id="DEFAULT_VEHTYPE" vClass="evehicle"/>
    <!-- Routes -->
    <route id="r_0" edges="E1 E2 E0" repeat="8"/>
    <!-- Vehicles, persons and containers (sorted by depart) -->
    <vehicle id="v_0" type="DEFAULT_VEHTYPE" depart="0.00" route="r_0" constantPowerIntake="2000">
        <param key="has.battery.device" value="true"/>
        <param key="maximumBatteryCapacity" value="200"/>
        <param key="maximumPower" value="100"/>
        <param key="vehicleMass" value="1000"/>
        <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="100"/> <!-- Adjusted constant power intake to 2000 mW -->
        <param key="propulsionEfficiency" value="0.9"/>
        <param key="recuperationEfficiency" value="0.9"/>
        <param key="stoppingThreshold" value="1"/>
        <param key="actualBatteryCapacity" value="500" />
    <stop chargingStation="cs_0" duration="60" charge="true" />
    </vehicle>
</routes>

the sumocfg file:

<configuration xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://sumo.dlr.de/xsd/sumoConfiguration.xsd">

    <input>
        <net-file value="configuration.net.xml"/>
        <route-files value="configuration.rou.xml"/>
        <additional-files value="configuration.add.xml"/>
    </input>
    <output>
        <battery-output value="battery.xml"/>
        <chargingstations-output value="chargingstations.xml"/>
    </output>

</configuration>

The add.xml:

<additional>
    <!-- StoppingPlaces -->
    <chargingStation id="cs_0" lane="E2_0" startPos="130.92" endPos="330.92" chargeInTransit="1" charge="true"/>
</additional>

Sumo_electric.zip

SUMO-version: 1.18.0

operating system: Windows

please help me get the issue with what I have configured, Thanks!

m-kro commented 1 year ago

Charging stations do not have a predefined power > 0 (see docs). You'll have to set the power attribute explicitly.