Menu

Commit [r108]  Maximize  Restore  History

Optimization: Links can now be inactive if there are only parked vehicles, but they have to register themselves in QueueSimulation.setActivationLink() so they are activated again at the right time when a vehicle wants to depart. Using a LinkedList (Queue-Interface) instead of an ArrayList for QueueLink.vehQueue, this seems to speed up things a little bit. Removed synchronized-statements in QueueLink, as the QueueSim is still single-threaded. Got rid of QueueLink.buffercount in favor QueueLink.buffer.size(). Other smaller code cleanups.

The order of events changed in the OnePercentBerlin10sTest, because the links with only parked vehicles are now activated/deactivated and are thus in an other order in the internal QueueNetworkLayer.simLinksArray. But if the old and new events-files are sorted, they are equal.
The changes reduce the execution time of OnePercentBerlin10sTest to about 60% of the time before.

mrieser 2007-12-01

changed /matsim/trunk/src/org/matsim/mobsim/QueueLink.java
changed /matsim/trunk/src/org/matsim/mobsim/QueueNetStateWriter.java
changed /matsim/trunk/src/org/matsim/mobsim/QueueNetworkLayer.java
changed /matsim/trunk/src/org/matsim/mobsim/QueueSimulation.java
changed /matsim/trunk/src/playground/david/mobsim/distributed/PartialQueueSimulation.java
changed /matsim/trunk/src/playground/david/mobsim/distributed/QueueRemoteLink.java
changed /matsim/trunk/src/playground/david/vis/DisplayCachedNetState.java
changed /matsim/trunk/test/input/org/matsim/examples/OnePercentBerlin10sTest/testOnePercent10s/events.txt.gz
/matsim/trunk/src/org/matsim/mobsim/QueueLink.java Diff Switch to side-by-side view
Loading...
/matsim/trunk/src/org/matsim/mobsim/QueueNetStateWriter.java Diff Switch to side-by-side view
Loading...
/matsim/trunk/src/org/matsim/mobsim/QueueNetworkLayer.java Diff Switch to side-by-side view
Loading...
/matsim/trunk/src/org/matsim/mobsim/QueueSimulation.java Diff Switch to side-by-side view
Loading...
/matsim/trunk/src/playground/david/mobsim/distributed/PartialQueueSimulation.java Diff Switch to side-by-side view
Loading...
/matsim/trunk/src/playground/david/mobsim/distributed/QueueRemoteLink.java Diff Switch to side-by-side view
Loading...
/matsim/trunk/src/playground/david/vis/DisplayCachedNetState.java Diff Switch to side-by-side view
Loading...
Auth0 Logo