Commit c4720d84 authored by Tobias Meuser's avatar Tobias Meuser
Browse files

Set fixed seed to sumo to ensure reproducability

parent 3cebb9d0
......@@ -12,7 +12,9 @@ import java.util.HashMap;
import java.util.LinkedList;
import java.util.List;
import java.util.Map;
import java.util.Random;
import de.tudarmstadt.maki.simonstrator.api.Randoms;
import de.tudarmstadt.maki.simonstrator.api.component.vehicular.api.EdgeController;
import de.tudarmstadt.maki.simonstrator.api.component.vehicular.api.SimulationSetupExtractor;
import de.tudarmstadt.maki.simonstrator.api.component.vehicular.api.VehicleController;
......@@ -95,7 +97,11 @@ public class TraciSimulationController implements VehicleController, SimulationS
@Override
public synchronized void init() {
if (!_initalized) {
_connection = new SumoTraciConnection(_sumoExe, _configFile);
Random random = Randoms.getRandom("SUMO");
// This will only work with the updated version of the TraaS API for sumo
// It is available for download at https://dev.kom.e-technik.tu-darmstadt.de/gitlab/tobiasm/TraaS.git
_connection = new SumoTraciConnection(_sumoExe, _configFile, random.nextInt());
try {
_connection.runServer();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment