Open SarahSie opened 4 years ago
Maybe like this:
<networkChangeEvent startTime="6:00:00">
<link refId="550924"/>
<link refId="550925"/>
<freespeed type="absolute" value="0.0"/>
</networkChangeEvent>
<networkChangeEvent startTime="6:00:00">
<link refId="550924"/>
<link refId="550925"/>
<flowCapacity type="absolute" value="0.0"/>
</networkChangeEvent>
...
(i.e. essentially repeat the entry for the flowCap change)???
yes, it works one attribute per event. Thank you.
Hi, Can the streets be blocked even if there are pt vehicles that are supposed to go through those links? I tried to set the flow capacity and free speed to 0, but I get the following error:
2022-01-31T14:50:20,571 ERROR ParallelPersonAlgorithmUtils$ExceptionHandler:164 Thread PersonPrepareForSim.1 died with exception while handling events. java.lang.RuntimeException: Expected number of change events (2) differs from the number of events found (0)! at org.matsim.core.network.VariableIntervalTimeVariantAttribute.recalc(VariableIntervalTimeVariantAttribute.java:93) ~[classes/:?] at org.matsim.core.network.TimeVariantLinkImpl.recalcFreespeed(TimeVariantLinkImpl.java:212) ~[classes/:?] at org.matsim.core.network.TimeVariantLinkImpl.getFreespeed(TimeVariantLinkImpl.java:127) ~[classes/:?] at org.matsim.core.trafficmonitoring.TravelTimeDataArray.getTravelTime(TravelTimeDataArray.java:115) ~[classes/:?] at org.matsim.core.trafficmonitoring.TravelTimeCalculator.consolidateData(TravelTimeCalculator.java:463) ~[classes/:?] at org.matsim.core.trafficmonitoring.TravelTimeCalculator.getLinkTravelTime(TravelTimeCalculator.java:373) ~[classes/:?] at org.matsim.core.trafficmonitoring.TravelTimeCalculator$1.getLinkTravelTime(TravelTimeCalculator.java:513) ~[classes/:?] at org.matsim.core.router.AStarEuclidean.addToPendingNodes(AStarEuclidean.java:152) ~[classes/:?] at org.matsim.core.router.Dijkstra.relaxNodeLogic(Dijkstra.java:438) ~[classes/:?] at org.matsim.core.router.Dijkstra.relaxNode(Dijkstra.java:409) ~[classes/:?] at org.matsim.core.router.AStarLandmarks.relaxNode(AStarLandmarks.java:137) ~[classes/:?] at org.matsim.core.router.Dijkstra.searchLogic(Dijkstra.java:317) ~[classes/:?] at org.matsim.core.router.Dijkstra.calcLeastCostPath(Dijkstra.java:234) ~[classes/:?] at org.matsim.core.router.AStarLandmarks.calcLeastCostPath(AStarLandmarks.java:124) ~[classes/:?] at org.matsim.core.router.NetworkRoutingModule.calcRoute(NetworkRoutingModule.java:108) ~[classes/:?] at org.matsim.core.router.TripRouter.calcRoute(TripRouter.java:182) ~[classes/:?] at org.matsim.core.router.PlanRouter.run(PlanRouter.java:101) ~[classes/:?] at org.matsim.core.population.algorithms.PersonPrepareForSim.run(PersonPrepareForSim.java:233) ~[classes/:?] at org.matsim.core.population.algorithms.ParallelPersonAlgorithmUtils$PersonAlgoThread.run(ParallelPersonAlgorithmUtils.java:145) ~[classes/:?] at java.lang.Thread.run(Thread.java:832) [?:?]
I want to block a road in my map starting from a certain time of the day and ending at a certain time (set back the original attributed). I have read in the MATSim that I should put the freeSpeed and flowCapacity attributes of the road to Zero. therefore I have changed the networkChangeEvents to the following:
but it gets an error when I write two freeSpeed and flowCapacity in the same event. what should I do?