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
3b871511
Commit
3b871511
authored
Jan 31, 2020
by
Julian Zobel
Browse files
Adaptions for social group movements
parent
91c0dfe2
Changes
5
Hide whitespace changes
Inline
Side-by-side
src/de/tud/kom/p2psim/impl/topology/movement/RSUMovementModel.java
View file @
3b871511
...
...
@@ -39,6 +39,7 @@ import de.tudarmstadt.maki.simonstrator.api.component.sensor.location.Location;
import
de.tudarmstadt.maki.simonstrator.api.component.vehicular.api.SimulationSetupExtractor
;
import
de.tudarmstadt.maki.simonstrator.api.util.XMLConfigurableConstructor
;
// FIXME javaDoc
public
class
RSUMovementModel
implements
MovementModel
{
private
final
List
<
SimLocationActuator
>
components
;
...
...
src/de/tud/kom/p2psim/impl/topology/movement/StreetMovement.java
View file @
3b871511
...
...
@@ -72,26 +72,13 @@ public class StreetMovement implements MovementModel, EventHandler {
private
long
timeBetweenMoveOperation
=
Simulator
.
SECOND_UNIT
;
private
Random
rand
;
private
Random
rand
=
Randoms
.
getRandom
(
StreetMovement
.
class
);
private
double
latLeft
;
//Values from -90 to 90; always smaller than latRight
private
double
latRight
;
//Values from -90 to 90
private
double
lonLeft
;
//Values from -180 to 180; Always smaller than lonRight
private
double
lonRight
;
//Values from -180 to 180
public
StreetMovement
()
{
this
.
worldDimensions
=
Binder
.
getComponentOrNull
(
Topology
.
class
)
.
getWorldDimensions
();
this
.
rand
=
Randoms
.
getRandom
(
StreetMovement
.
class
);
latLeft
=
GPSCalculation
.
getLatLower
();
latRight
=
GPSCalculation
.
getLatUpper
();
lonLeft
=
GPSCalculation
.
getLonLeft
();
lonRight
=
GPSCalculation
.
getLonRight
();
System
.
out
.
println
(
"Scheduling first event for Init"
);
// scheduling initalization!
Event
.
scheduleImmediately
(
this
,
null
,
EVENT_INIT
);
}
...
...
src/de/tud/kom/p2psim/impl/topology/movement/modularosm/groups/groupencounter/AbstractGroupEncounter.java
View file @
3b871511
...
...
@@ -29,7 +29,6 @@ import de.tud.kom.p2psim.api.topology.movement.SimLocationActuator;
import
de.tud.kom.p2psim.impl.topology.movement.modularosm.SocialGroupMovementModel
;
import
de.tud.kom.p2psim.impl.topology.movement.modularosm.groups.MovementGroupContainer
;
import
de.tud.kom.p2psim.impl.topology.movement.modularosm.groups.SocialMovementGroup
;
import
de.tud.kom.p2psim.impl.topology.movement.modularosm.groups.groupforming.AbstractGroupForming
;
import
de.tud.kom.p2psim.impl.topology.util.PositionVector
;
import
de.tudarmstadt.maki.simonstrator.api.Randoms
;
import
de.tudarmstadt.maki.simonstrator.api.Time
;
...
...
src/de/tud/kom/p2psim/impl/topology/movement/modularosm/groups/groupforming/AbstractGroupForming.java
View file @
3b871511
...
...
@@ -171,7 +171,10 @@ public abstract class AbstractGroupForming implements IGroupFormingBehavior {
* @return
*/
protected
int
rndGroupSize
()
{
return
rand
.
nextInt
(
maxGroupSize
-
minGroupSize
)
+
minGroupSize
;
if
(
maxGroupSize
==
minGroupSize
)
return
minGroupSize
;
else
return
rand
.
nextInt
(
maxGroupSize
-
minGroupSize
)
+
minGroupSize
;
}
protected
abstract
void
triggerGroupFormation
();
...
...
src/de/tud/kom/p2psim/impl/topology/movement/modularosm/transition/AbstractAttractionBasedAssignmentStrategy.java
View file @
3b871511
...
...
@@ -122,7 +122,7 @@ public abstract class AbstractAttractionBasedAssignmentStrategy implements IAttr
}
// fast skip forward if the attraction point would not be considered due to its score
if
(
ap
.
getWeight
()
>
score
)
{
if
(
score
>=
ap
.
getWeight
())
{
continue
;
}
...
...
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