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
a1b864da
Commit
a1b864da
authored
Nov 25, 2020
by
Julian Zobel
Browse files
Monitoring for Group Forming
parent
aad65d61
Changes
2
Show whitespace changes
Inline
Side-by-side
src/de/tud/kom/p2psim/impl/topology/movement/modularosm/ModularMovementModelViz.java
View file @
a1b864da
...
@@ -186,8 +186,6 @@ public class ModularMovementModelViz extends JComponent
...
@@ -186,8 +186,6 @@ public class ModularMovementModelViz extends JComponent
}
}
}
}
//<Variable name="GRAPHHOPPER_BLOCKED_AREAS" value="51.813680,8.783510,51.806795,8.804239;51.821036,8.771151,51.814987, 8.779090;" />
if
(
this
.
movementModel
.
getLocalMovementStrategy
()
instanceof
RealWorldStreetsMovement
)
{
if
(
this
.
movementModel
.
getLocalMovementStrategy
()
instanceof
RealWorldStreetsMovement
)
{
RealWorldStreetsMovement
mov
=
(
RealWorldStreetsMovement
)
this
.
movementModel
.
getLocalMovementStrategy
();
RealWorldStreetsMovement
mov
=
(
RealWorldStreetsMovement
)
this
.
movementModel
.
getLocalMovementStrategy
();
...
@@ -210,40 +208,6 @@ public class ModularMovementModelViz extends JComponent
...
@@ -210,40 +208,6 @@ public class ModularMovementModelViz extends JComponent
}
}
}
}
// g2.setColor(Color.black);
// g2.setColor(new Color(1f, 0f, 0f, 0.5f));
// PositionVector p1 = GPSCalculation.transformGPSWindowToOwnWorld(51.813680, 8.783510);
// PositionVector p2 = GPSCalculation.transformGPSWindowToOwnWorld(51.806795, 8.804239);
//
// g2.fillRect(VisualizationInjector.scaleValue(p1.getX()), VisualizationInjector.scaleValue(p1.getY()),
// VisualizationInjector.scaleValue(p2.getX()) - VisualizationInjector.scaleValue(p1.getX()),
// VisualizationInjector.scaleValue(p2.getY())- VisualizationInjector.scaleValue(p1.getY()));
//
// p1 = GPSCalculation.transformGPSWindowToOwnWorld(51.821036, 8.771151);
// p2 = GPSCalculation.transformGPSWindowToOwnWorld(51.814987, 8.779090);
//
// g2.fillRect(VisualizationInjector.scaleValue(p1.getX()), VisualizationInjector.scaleValue(p1.getY()),
// VisualizationInjector.scaleValue(p2.getX() - p1.getX()),
// VisualizationInjector.scaleValue(p2.getY() - p1.getY()));
//
//
// p1 = GPSCalculation.transformGPSWindowToOwnWorld(51.792919, 8.785700);
// p2 = GPSCalculation.transformGPSWindowToOwnWorld(51.789575, 8.799222);
//
// g2.fillRect(VisualizationInjector.scaleValue(p1.getX()), VisualizationInjector.scaleValue(p1.getY()),
// VisualizationInjector.scaleValue(p2.getX()) - VisualizationInjector.scaleValue(p1.getX()),
// VisualizationInjector.scaleValue(p2.getY())- VisualizationInjector.scaleValue(p1.getY()));
//
// for (PointList pointList : paths) {
// for (GHPoint3D temp : pointList) {
// PositionVector p = RealWorldStreetsMovement.transformGPSWindowToOwnWorld(temp.getLat(), temp.getLon());
//
// g2.fillOval(VisualizationInjector.scaleValue(p.getX()) - 2, VisualizationInjector.scaleValue(p.getY()) - 2, 4,4 );
// }
// }
}
}
@Override
@Override
...
...
src/de/tud/kom/p2psim/impl/topology/movement/modularosm/groups/groupforming/AbstractGroupForming.java
View file @
a1b864da
...
@@ -145,8 +145,8 @@ public abstract class AbstractGroupForming implements IGroupFormingBehavior {
...
@@ -145,8 +145,8 @@ public abstract class AbstractGroupForming implements IGroupFormingBehavior {
}
}
for
(
int
g
=
0
;
g
<
maxNumberOfGroups
;
g
++)
{
for
(
int
g
=
0
;
g
<
maxNumberOfGroups
;
g
++)
{
long
delay
=
Math
.
max
(
Time
.
MINUTE
,
(
long
)
((
rand
.
nextDouble
()
*
(
Time
.
MINUTE
*
30
)
+
Time
.
MINUTE
)));
long
delay
=
Math
.
max
(
Time
.
MINUTE
,
(
long
)
((
groupFormationSetupDelay
+
rand
.
nextGaussian
()
*
groupFormationSetupDelay
)));
//System.out.println("(
"+g+"
)
Init Group Formation Time
" +
Time.getFormattedTime(delay)
);
Monitor
.
log
(
this
.
getClass
(),
Monitor
.
Level
.
INFO
,
"Group:
"
+
g
+
" Init
ial
Group Formation Time
"
,
Time
.
getFormattedTime
(
delay
));
Event
.
scheduleWithDelay
(
delay
,
new
EventHandler
()
{
Event
.
scheduleWithDelay
(
delay
,
new
EventHandler
()
{
@Override
@Override
...
...
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