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
9d3857c1
Commit
9d3857c1
authored
Jul 27, 2018
by
Jose Ignacio Monreal Bailey
Browse files
Setting structure for vehicles per second and vehicles moving on each lane.
I need to agregate lanes with same phase.
parent
7ce68180
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 @
9d3857c1
...
...
@@ -272,14 +272,21 @@ public class TraciSimulationController implements VehicleController, SimulationS
}
@Override
public
int
getLastStepVehicleNumber
(
String
edg
eIdFrom
)
{
SumoCommand
lastStepVehicleNumberCommand
=
Edg
e
.
getLastStepVehicleNumber
(
edg
eIdFrom
);
public
int
getLastStepVehicleNumber
(
String
lan
eIdFrom
)
{
SumoCommand
lastStepVehicleNumberCommand
=
Lan
e
.
getLastStepVehicleNumber
(
lan
eIdFrom
);
Object
lastStepVehicleNumberObject
=
requestObject
(
lastStepVehicleNumberCommand
);
int
lastStepVehicleNumber
=
((
Integer
)
lastStepVehicleNumberObject
).
intValue
();
return
lastStepVehicleNumber
;
}
@Override
public
void
getCompleteDefinition
(
String
trafficLightId
)
{
SumoCommand
completeTrafficLightDefinitionCommand
=
Trafficlight
.
getCompleteRedYellowGreenDefinition
(
trafficLightId
);
Object
completeTrafficLightDefinitionObject
=
requestObject
(
completeTrafficLightDefinitionCommand
);
}
@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 @
9d3857c1
...
...
@@ -242,6 +242,11 @@ public class XMLSimulationController implements VehicleController, SimulationSet
return
0
;
}
@Override
public
void
getCompleteDefinition
(
String
trafficLightId
)
{
}
@Override
public
double
getScenarioWidth
()
{
return
-
1
;
...
...
src/de/tud/kom/p2psim/impl/vehicular/trafficlights/DefaultTrafficLightInformationComponent.java
View file @
9d3857c1
...
...
@@ -112,6 +112,11 @@ public class DefaultTrafficLightInformationComponent implements TrafficLightInfo
return
controller
.
getLastStepVehicleNumber
(
edgeIdFrom
);
}
@Override
public
void
getCompleteDefinition
(
String
trafficLightId
)
{
controller
.
getCompleteDefinition
(
trafficLightId
);
}
@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