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
173e49b1
Commit
173e49b1
authored
Oct 09, 2019
by
Tobias Meuser
Browse files
Update for diss
parent
4c2d8f4c
Changes
2
Show whitespace changes
Inline
Side-by-side
src/de/tud/kom/p2psim/impl/topology/movement/vehicular/sumo/simulation/controller/traci/TraciSimulationController.java
View file @
173e49b1
...
...
@@ -540,7 +540,11 @@ public class TraciSimulationController implements VehicleController, SimulationS
try
{
SumoBoundingBox
netBoundary
=
(
SumoBoundingBox
)
_connection
.
do_job_get
(
netBoundaryCommand
);
if
(
_observedAreaSet
)
{
return
Math
.
max
(
Math
.
min
(
netBoundary
.
x_max
,
_endX
)
-
Math
.
max
(
netBoundary
.
x_min
,
_startX
),
10
);
}
else
{
return
Math
.
max
(
netBoundary
.
x_max
-
netBoundary
.
x_min
,
10
);
}
}
catch
(
Exception
e
)
{
//Nothing to do
}
...
...
@@ -553,7 +557,11 @@ public class TraciSimulationController implements VehicleController, SimulationS
try
{
SumoBoundingBox
netBoundary
=
(
SumoBoundingBox
)
_connection
.
do_job_get
(
netBoundaryCommand
);
if
(
_observedAreaSet
)
{
return
Math
.
max
(
Math
.
min
(
netBoundary
.
y_max
,
_endY
)
-
Math
.
max
(
netBoundary
.
y_min
,
_startY
),
10
);
}
else
{
return
Math
.
max
(
netBoundary
.
y_max
-
netBoundary
.
y_min
,
10
);
}
}
catch
(
Exception
e
)
{
//Nothing to do
}
...
...
@@ -814,6 +822,7 @@ public class TraciSimulationController implements VehicleController, SimulationS
for
(
SumoPosition2D
location
:
geometry
.
coords
)
{
if
(!
isObservedAreaSet
())
{
positions
.
add
(
new
PositionVector
(
location
.
x
,
location
.
y
));
set
=
true
;
}
else
{
if
(
_startX
<=
location
.
x
&&
location
.
x
<=
_endX
&&
_startY
<=
location
.
y
&&
location
.
y
<=
_endY
)
{
set
=
true
;
...
...
src/de/tud/kom/p2psim/impl/util/oracle/GlobalOracle.java
View file @
173e49b1
...
...
@@ -180,6 +180,11 @@ public class GlobalOracle implements OracleComponent {
return
new
ArrayList
<
Host
>(
hosts
);
}
@Override
public
Host
getHostByID
(
long
pValue
)
{
return
hostIDtoHosts
.
get
(
pValue
);
}
@Override
public
boolean
isSimulation
()
{
return
true
;
...
...
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