Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Simonstrator
PeerfactSim.KOM
Commits
3e8abc02
Commit
3e8abc02
authored
Jul 17, 2017
by
Tobias Meuser
Browse files
Added funtionlity to stop vehicle
parent
834e9eca
Changes
4
Hide whitespace changes
Inline
Side-by-side
src/de/tud/kom/p2psim/impl/topology/movement/vehicular/sumo/simulation/controller/VehicleController.java
View file @
3e8abc02
...
...
@@ -35,4 +35,6 @@ public interface VehicleController {
double
getStart
();
void
init
();
void
stopVehicle
(
String
pVehicle
);
}
src/de/tud/kom/p2psim/impl/topology/movement/vehicular/sumo/simulation/controller/traci/TraciSimulationController.java
View file @
3e8abc02
...
...
@@ -518,6 +518,12 @@ public class TraciSimulationController implements VehicleController, SimulationS
execute
(
Vehicle
.
setRoute
(
pVehicle
,
routeEdges
));
}
@Override
public
void
stopVehicle
(
String
pVehicle
)
{
SumoCommand
stopCommand
=
Vehicle
.
setSpeed
(
pVehicle
,
0
);
execute
(
stopCommand
);
}
public
void
obtainRoadNetwork
()
{
if
(
_roadNetwork
==
null
)
{
SumoCommand
laneIDCommand
=
Lane
.
getIDList
();
...
...
src/de/tud/kom/p2psim/impl/topology/movement/vehicular/sumo/simulation/controller/xml/XMLSimulationController.java
View file @
3e8abc02
...
...
@@ -199,4 +199,9 @@ public class XMLSimulationController implements VehicleController, SimulationSet
throw
new
UnsupportedOperationException
(
"This method is not supported for "
+
getClass
().
getSimpleName
());
}
@Override
public
void
stopVehicle
(
String
pVehicle
)
{
throw
new
UnsupportedOperationException
(
"This method is not supported for "
+
getClass
().
getSimpleName
());
}
}
src/de/tud/kom/p2psim/impl/vehicular/DefaultVehicleInformationComponent.java
View file @
3e8abc02
...
...
@@ -105,4 +105,9 @@ public class DefaultVehicleInformationComponent implements VehicleInformationCom
}
}
@Override
public
void
stopVehicle
()
{
controller
.
stopVehicle
(
vehicleID
);
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment