Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [sumo-user] Variable traffic flows, density and arrival times

Hi,
  • p.s: If you are providing a similar solution, could you please explain in a readme file what you did? I am not really great at this so a readme file would be much appreciated.
No - I am not providing any solution - I used SUMO to look at a specific problem some time ago, was very impressed with it and just maintain an interest in how it develops.

  • In the config file, I saw that the drone is charging vehicles after stopping at certain points. I am trying to simulate the charging action on the fly, meaning vehicles are not going to stop but rather continue driving towards their destinations without rerouting. Is that possible? 
ok - I generated those files in response to your request for a script etc - to try and illustrate what I meant in my initial response.


I had not understood your use case - from your description, given that you only want to calculate drone flying path, then it feels like you don't actually need to model a drone in sumo at all?
ie just use Traci to monitor vehicle charge and position then compute the distance between hub/drone and position, recalculating position once the charge is complete as the start point for the next flight leg.

The complication is surely that drones are slower than EV's so it is entirely possible that a drone will never be able to catch the vehicle unless the vehicle is travelling towards a charge hub? It then risks being carried too far from it's home by the time the charge is complete!    (The best energy densities currently available/predicted are less than 200 Wh/Kg. I might posit that a minimum usable charge would be 10KWh ie a nominal 50kg payload - the Ehang 184 can carry 100Kg with a maximum speed of 100km/h and a flight time of 23 minutes.)


Anyway - using Traci you might do something like:

get position of charge hub
for each simulation step
    monitor vehicle charge state until it reaches the level that you deem a drone topup is needed:   (        traci.vehicle.getParameter(vehID, "device.battery.actualBatteryCapacity")  )
        Obtain vehicle position and compute the vector (distance, angle) between charge hub and vehicle
        for each subsequent simulation step:
             Compute distance travelled by drone in the step interval - along the vector (add this to total drone path)
             Compute new drone position
             Obtain new vehicle position and compute a new vector between drone and vehicle
                  if this is less than a 'charging' distance then charge the vehicle  (ie decrement drone charge capacity and increase the actual battery capacity by your charge rate )
                  if the capacity reaches your threshold or a 'charge time' is reached then you have the current drone position and need to compute the vector to the next vehicle/return charge hub


If the thesis is that the drone does not fly while charging - ie is coupled to the vehicle - then don't increment the total drone path while charging.

cheers
div
        


Back to the top