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
ea3ae6e4
Commit
ea3ae6e4
authored
May 23, 2017
by
Tobias Meuser
Browse files
Merge branch 'sumo-integration' into working
parents
af75e2a2
7fdc7902
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/de/tud/kom/p2psim/impl/topology/movement/VehicleMovementModel.java
View file @
ea3ae6e4
...
...
@@ -27,6 +27,7 @@ import java.util.List;
import
java.util.Map
;
import
java.util.Queue
;
import
java.util.Set
;
import
de.tud.kom.p2psim.api.network.SimNetInterface
;
import
de.tud.kom.p2psim.api.topology.movement.MovementModel
;
import
de.tud.kom.p2psim.api.topology.movement.SimLocationActuator
;
...
...
@@ -137,17 +138,6 @@ public class VehicleMovementModel implements MovementModel, EventHandler, Future
this
.
height
=
height
;
}
/**
* Constructor for the movement model using the sumo TraCI API
* @param timeBetweenMoveOperations The time between two movement operations.
* @param sumoExe The path to the executable of sumo
* @param sumoConfigFile The path to the configuration file of the scenario
*/
@XMLConfigurableConstructor
({
"timeBetweenMoveOperations"
,
"sumoExe"
,
"sumoConfigFile"
})
public
VehicleMovementModel
(
long
timeBetweenMoveOperations
,
String
sumoExe
,
String
sumoConfigFile
)
{
this
(
timeBetweenMoveOperations
,
sumoExe
,
sumoConfigFile
,
"10000"
,
"10000"
,
"15000"
,
"15000"
);
}
/**
* Adding an additional component to be moved by this movement model
* @param comp The component to be added.
...
...
@@ -290,10 +280,6 @@ public class VehicleMovementModel implements MovementModel, EventHandler, Future
}
SimLocationActuator
component
=
requestSimActuator
(
vehicle
);
if
(
component
==
null
)
{
System
.
err
.
println
(
"Unable to assign new components. Please increase node amount."
);
System
.
exit
(
1
);
}
component
.
updateCurrentLocation
(
new
PositionVector
(
position
.
getX
()
/
SCALING_FACTOR
,
position
.
getY
()
/
SCALING_FACTOR
));
component
.
setMovementSpeed
(
position
.
getSpeed
()
/
SCALING_FACTOR
);
...
...
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