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
b52aae20
Commit
b52aae20
authored
May 31, 2017
by
Tobias Meuser
Browse files
Added support for negative coordinates
parent
22105902
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/de/tud/kom/p2psim/impl/topology/movement/VehicleMovementModel.java
View file @
b52aae20
...
...
@@ -228,8 +228,8 @@ public class VehicleMovementModel implements MovementModel, EventHandler, Future
if
(
sumoExe
!=
null
)
{
TraciSimulationController
simulationController
=
TraciSimulationController
.
createSimulationController
(
sumoExe
,
sumoConfigFile
);
_controller
=
simulationController
;
_controller
.
init
();
_controller
.
setObservedArea
(
offsetX
,
offsetY
,
offsetX
+
width
,
offsetY
+
height
);
_controller
.
init
();
_controller
.
nextStep
();
extractor
=
simulationController
;
...
...
src/de/tud/kom/p2psim/impl/topology/movement/vehicular/sumo/simulation/controller/traci/TraciSimulationController.java
View file @
b52aae20
...
...
@@ -335,7 +335,7 @@ public class TraciSimulationController implements VehicleController, SimulationS
try
{
SumoBoundingBox
netBoundary
=
(
SumoBoundingBox
)
_connection
.
do_job_get
(
netBoundaryCommand
);
return
netBoundary
.
x_max
+
netBoundary
.
x_min
;
return
Math
.
max
(
netBoundary
.
x_max
-
netBoundary
.
x_min
,
10
)
;
}
catch
(
Exception
e
)
{
//Nothing to do
}
...
...
@@ -348,9 +348,7 @@ public class TraciSimulationController implements VehicleController, SimulationS
try
{
SumoBoundingBox
netBoundary
=
(
SumoBoundingBox
)
_connection
.
do_job_get
(
netBoundaryCommand
);
System
.
out
.
println
(
netBoundary
.
y_max
);
System
.
out
.
println
(
netBoundary
.
y_min
);
return
netBoundary
.
y_max
+
netBoundary
.
y_min
;
return
Math
.
max
(
netBoundary
.
y_max
-
netBoundary
.
y_min
,
10
);
}
catch
(
Exception
e
)
{
//Nothing to do
}
...
...
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