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
8b07b101
Commit
8b07b101
authored
Jun 27, 2017
by
Tobias Meuser
Committed by
Jose Ignacio Monreal Bailey
Aug 20, 2019
Browse files
Removed unnecessary System.out
parent
650de0ea
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/de/tud/kom/p2psim/impl/topology/movement/VehicleMovementModel.java
View file @
8b07b101
...
...
@@ -59,6 +59,8 @@ import de.tudarmstadt.maki.simonstrator.api.util.XMLConfigurableConstructor;
public
class
VehicleMovementModel
implements
MovementModel
,
EventHandler
,
FutureLocationSensor
{
private
static
VehicleMovementModel
MOVEMENT
;
public
static
final
double
SCALING_FACTOR
=
1.0
;
private
static
final
double
PAINT_OFFSET
=
25
;
...
...
@@ -108,6 +110,8 @@ public class VehicleMovementModel implements MovementModel, EventHandler, Future
*/
@XMLConfigurableConstructor
({
"timeBetweenMoveOperations"
,
"sumoExe"
,
"sumoConfigFile"
,
"offsetX"
,
"offsetY"
,
"width"
,
"height"
})
public
VehicleMovementModel
(
long
timeBetweenMoveOperations
,
String
sumoExe
,
String
sumoConfigFile
,
String
offsetX
,
String
offsetY
,
String
width
,
String
height
)
{
MOVEMENT
=
this
;
this
.
timeBetweenMoveOperations
=
timeBetweenMoveOperations
;
this
.
components
=
new
LinkedList
<>();
this
.
freeComponents
=
new
LinkedList
<>();
...
...
@@ -133,6 +137,8 @@ public class VehicleMovementModel implements MovementModel, EventHandler, Future
*/
@XMLConfigurableConstructor
({
"timeBetweenMoveOperations"
,
"sumoTrace"
,
"sumoIntersections"
,
"offsetX"
,
"offsetY"
,
"width"
,
"height"
})
public
VehicleMovementModel
(
long
timeBetweenMoveOperations
,
String
sumoTrace
,
String
sumoIntersections
,
int
offsetX
,
int
offsetY
,
int
width
,
int
height
)
{
MOVEMENT
=
this
;
this
.
timeBetweenMoveOperations
=
timeBetweenMoveOperations
;
this
.
components
=
new
LinkedList
<>();
this
.
freeComponents
=
new
LinkedList
<>();
...
...
@@ -302,13 +308,6 @@ public class VehicleMovementModel implements MovementModel, EventHandler, Future
component
.
setMovementSpeed
(
position
.
getSpeed
()
/
SCALING_FACTOR
);
try
{
VehicleInformationComponent
vehicularHostComponent
=
component
.
getHost
().
getComponent
(
VehicleInformationComponent
.
class
);
System
.
out
.
println
(
vehicularHostComponent
.
getCurrentRoute
());
}
catch
(
ComponentNotAvailableException
e
)
{
// Nothing to do here
}
try
{
RoutedNetLayer
routedNetLayer
=
component
.
getHost
().
getComponent
(
RoutedNetLayer
.
class
);
for
(
SimNetInterface
netInterface
:
routedNetLayer
.
getSimNetworkInterfaces
())
{
...
...
@@ -400,8 +399,8 @@ public class VehicleMovementModel implements MovementModel, EventHandler, Future
return
idComponentMatcher
.
get
(
vehicle
);
}
public
RoadNetwork
getRoadNetwork
()
{
return
_extractor
.
getRoadNetwork
();
public
static
RoadNetwork
getRoadNetwork
()
{
return
MOVEMENT
.
_extractor
.
getRoadNetwork
();
}
/**
...
...
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