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
016fedf3
Commit
016fedf3
authored
Jul 30, 2018
by
jimonreal
Committed by
Jose Ignacio Monreal Bailey
Aug 20, 2019
Browse files
Adding constraints names
parent
9d3857c1
Changes
3
Hide whitespace changes
Inline
Side-by-side
src/de/tud/kom/p2psim/impl/topology/movement/vehicular/sumo/simulation/controller/traci/TraciSimulationController.java
View file @
016fedf3
...
...
@@ -166,7 +166,15 @@ public class TraciSimulationController implements VehicleController, SimulationS
return
_positons
.
get
(
pVehicleID
).
getPosition
();
}
@Override
@Override
public
double
getVehicleMaxSpeed
(
String
vehicleId
)
{
SumoCommand
speedCommand
=
Vehicle
.
getMaxSpeed
(
vehicleId
);
Object
object
=
requestObject
(
speedCommand
);
return
(
Double
)
object
;
}
@Override
public
Location
getVehiclePosition
(
double
pStep
,
String
pVehicleID
)
{
if
(
pStep
==
_step
)
{
return
getVehiclePosition
(
pVehicleID
);
...
...
@@ -287,6 +295,15 @@ public class TraciSimulationController implements VehicleController, SimulationS
}
@Override
public
List
<
String
>
getLastStepVehicleIDs
(
String
laneId
)
{
SumoCommand
lastStepVehicleIDsCommand
=
Lane
.
getLastStepVehicleIDs
(
laneId
);
Object
lastStepVehicleIDsObject
=
requestObject
(
lastStepVehicleIDsCommand
);
List
<
String
>
lastStepVehicleIDs
=
(
List
<
String
>)
lastStepVehicleIDsObject
;
return
lastStepVehicleIDs
;
}
@Override
public
boolean
nextStep
()
{
if
(
Simulator
.
getEndTime
()
==
Simulator
.
getCurrentTime
())
{
...
...
src/de/tud/kom/p2psim/impl/topology/movement/vehicular/sumo/simulation/controller/xml/XMLSimulationController.java
View file @
016fedf3
...
...
@@ -98,7 +98,12 @@ public class XMLSimulationController implements VehicleController, SimulationSet
return
getVehiclePosition
(
_step
,
pVehicleID
);
}
public
VehicleInformationContainer
requestVehicleInformation
(
String
pVehicleID
)
{
@Override
public
double
getVehicleMaxSpeed
(
String
vehicleId
)
{
return
0
;
}
public
VehicleInformationContainer
requestVehicleInformation
(
String
pVehicleID
)
{
return
_vehicleDataInformationHandler
.
getVehiclePositions
().
get
(
pVehicleID
);
}
...
...
@@ -247,6 +252,11 @@ public class XMLSimulationController implements VehicleController, SimulationSet
}
@Override
public
List
<
String
>
getLastStepVehicleIDs
(
String
laneId
)
{
return
null
;
}
@Override
public
double
getScenarioWidth
()
{
return
-
1
;
...
...
src/de/tud/kom/p2psim/impl/vehicular/trafficlights/DefaultTrafficLightInformationComponent.java
View file @
016fedf3
...
...
@@ -117,6 +117,26 @@ public class DefaultTrafficLightInformationComponent implements TrafficLightInfo
controller
.
getCompleteDefinition
(
trafficLightId
);
}
@Override
public
List
<
String
>
getLastStepVehicleIDs
(
String
laneId
)
{
return
controller
.
getLastStepVehicleIDs
(
laneId
);
}
@Override
public
double
getVehicleSpeed
(
String
vehicleId
)
{
return
controller
.
getVehicleSpeed
(
vehicleId
);
}
@Override
public
Location
getVehiclePosition
(
String
vehicleId
)
{
return
controller
.
getVehiclePosition
(
vehicleId
);
}
@Override
public
double
getVehicleMaxSpeed
(
String
vehicleId
)
{
return
controller
.
getVehicleMaxSpeed
(
vehicleId
);
}
@Override
public
void
initialize
()
{
...
...
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