-
Notifications
You must be signed in to change notification settings - Fork 181
faq 108654942
by Marco Bohmbach on 2017-03-29 12:51:34
Hi, i'm still trying to combine drt with ev like the example (taxi and ev) from michalm playground but i'm stuck implementing "bestchargerfinder" to like "bestchargerinsertion".
I don't fully understand how the drt thing works and where to put the charging information into schedule. In words it is just like:
If Battery is low, finish trip and go to charger. If charged, go back to work.
thanks
Marco
by Michal Maciejewski on 2017-03-30 07:50:48
Hi,
Let's assume that for a non-EV the schedule would look like:
Serve A → go to B → serve B → go to C → serve C
If we use EV we need to: monitor the SOC and predict its level when planning new tasks. In the simplest approach the charging strategy is purely reactive: once SOC gets below (for instance) 30%, send the vehicle to the charger. (Not really optimal, but should work as a good starting point for writing something more complex).
Let's assume, SOC gets down while serving B. So we need first to recharge the vehicle and then to serve C.
Serve A → go to B → serve B → go to Charger → charge → go to C → serve C
The decision about inserting a trip to a charger and recharging can be done at one place in the optimizer, e.g.
public void notifyMobsimBeforeSimStep(MobsimBeforeSimStepEvent e) {
sendUnderchargedVehiclesToChargers();
//...standard non-EV code
}
The method notifyMobsimBeforeSimStep is called every second. But it is usually enough to handle undercharged vehicles every minute or so.
Please have a look here https://github.com/matsim-org/matsim/blob/0056453c98536d4c1f726b2d9aa52b0c88e8c1b7/playgrounds/michalm/src/main/java/playground/michalm/taxi/optimizer/rules/RuleBasedETaxiOptimizer.java (a rather simple rule-based strategy).
If you need more specific answers then I would need to have a look at your code.
Hope that helps,
Michal
You are viewing an archive of the previous MATSim Q&A site. The real site is now at https://matsim.org/faq