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

Merge branch 'sumo-integration' into working

parents af75e2a2 7fdc7902
......@@ -27,6 +27,7 @@ import java.util.List;
import java.util.Map;
import java.util.Queue;
import java.util.Set;
import de.tud.kom.p2psim.api.network.SimNetInterface;
import de.tud.kom.p2psim.api.topology.movement.MovementModel;
import de.tud.kom.p2psim.api.topology.movement.SimLocationActuator;
......@@ -137,17 +138,6 @@ public class VehicleMovementModel implements MovementModel, EventHandler, Future
this.height = height;
}
/**
* Constructor for the movement model using the sumo TraCI API
* @param timeBetweenMoveOperations The time between two movement operations.
* @param sumoExe The path to the executable of sumo
* @param sumoConfigFile The path to the configuration file of the scenario
*/
@XMLConfigurableConstructor({ "timeBetweenMoveOperations", "sumoExe", "sumoConfigFile" })
public VehicleMovementModel(long timeBetweenMoveOperations, String sumoExe, String sumoConfigFile) {
this(timeBetweenMoveOperations, sumoExe, sumoConfigFile, "10000", "10000", "15000", "15000");
}
/**
* Adding an additional component to be moved by this movement model
* @param comp The component to be added.
......@@ -290,10 +280,6 @@ public class VehicleMovementModel implements MovementModel, EventHandler, Future
}
SimLocationActuator component = requestSimActuator(vehicle);
if (component == null) {
System.err.println("Unable to assign new components. Please increase node amount.");
System.exit(1);
}
component.updateCurrentLocation(new PositionVector(position.getX() / SCALING_FACTOR, position.getY() / SCALING_FACTOR));
component.setMovementSpeed(position.getSpeed() / SCALING_FACTOR);
......
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