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
API
Commits
5b735208
Commit
5b735208
authored
Jun 26, 2018
by
Tobias Meuser
Browse files
Final version for Springer book
parent
90029522
Changes
5
Hide whitespace changes
Inline
Side-by-side
src/de/tudarmstadt/maki/simonstrator/api/component/pubsub/
Subscription
Listener.java
→
src/de/tudarmstadt/maki/simonstrator/api/component/pubsub/
BypassCloud
Listener.java
View file @
5b735208
/*
* Copyright (c) 2005-2010 KOM Multimedia Communications Lab
* Copyright (c) 2005-2010 KOM
�
Multimedia Communications Lab
*
* This file is part of Simonstrator.KOM.
*
...
...
@@ -22,6 +22,8 @@ package de.tudarmstadt.maki.simonstrator.api.component.pubsub;
import
de.tudarmstadt.maki.simonstrator.api.component.overlay.OverlayContact
;
public
interface
Subscription
Listener
{
public
interface
BypassCloud
Listener
{
void
onSubscribeAtBroker
(
OverlayContact
pSubscriber
,
Subscription
[]
subscriptions
);
void
onNotificationArrivedAtBroker
(
Notification
pNotification
);
}
src/de/tudarmstadt/maki/simonstrator/api/component/sensor/environment/data/jam/VectoralJamProperty.java
View file @
5b735208
...
...
@@ -120,7 +120,9 @@ public class VectoralJamProperty extends NumericVectoralProperty {
@Override
public
EnvironmentProperty
getDefaultProperty
()
{
return
new
VectoralJamProperty
(
getLocation
(),
getEdge
());
VectoralJamProperty
jamProperty
=
new
VectoralJamProperty
(
getLocation
(),
getEdge
());
jamProperty
.
setSpeed
(
getEdge
().
getOriginalMaxSpeedState
());
return
jamProperty
;
}
@Override
...
...
src/de/tudarmstadt/maki/simonstrator/api/component/vehicular/relevance/ImpactFunction.java
View file @
5b735208
/*
* Copyright (c) 2005-2010 KOM Multimedia Communications Lab
* Copyright (c) 2005-2010 KOM
�
Multimedia Communications Lab
*
* This file is part of Simonstrator.KOM.
*
...
...
@@ -23,5 +23,9 @@ package de.tudarmstadt.maki.simonstrator.api.component.vehicular.relevance;
import
de.tudarmstadt.maki.simonstrator.api.component.vehicular.information.PointInformation
;
public
interface
ImpactFunction
<
T
extends
PointInformation
>
{
double
calculateImpact
(
T
pInformation
);
default
double
calculateImpact
(
T
pInformation
)
{
return
calculateImpact
(
pInformation
.
getDetectionDate
());
}
double
calculateImpact
(
long
pDetectionDate
);
}
src/de/tudarmstadt/maki/simonstrator/api/component/vehicular/relevance/impl/AbstractQoIBasedImpactFunction.java
View file @
5b735208
...
...
@@ -117,7 +117,7 @@ public abstract class AbstractQoIBasedImpactFunction<T extends PointInformation>
}
ttl
=
getTTL
(
pInformation
.
get
(
0
));
numberOfMessages
=
amount
*
ttl
/
(
difference
+
Time
.
SECOND
);
numberOfMessages
=
amount
*
ttl
*
SCALING
/
(
difference
+
Time
.
SECOND
);
rate
=
ttl
/
(
double
)
numberOfMessages
;
...
...
@@ -149,11 +149,9 @@ public abstract class AbstractQoIBasedImpactFunction<T extends PointInformation>
double
pErrorProbability
,
double
pNumberOfMessages
,
double
pCostWrongKeep
,
double
pCostWrongChange
);
@Override
public
double
calculateImpact
(
T
pInformation
)
{
public
double
calculateImpact
(
long
pDetectionDate
)
{
double
impact
=
calculateImpact
(
1
-
accuracy
,
numberOfMessages
,
(((
pInformation
.
getDetectionDate
()
-
maxTimestamp
)
/
SCALING
+
ttl
)
/
(
double
)
ttl
)
*
numberOfMessages
,
b
)
/
(
accuracy
);
((
ttl
-
(
maxTimestamp
-
pDetectionDate
)
/
SCALING
)
/
(
double
)
ttl
)
*
numberOfMessages
,
b
)
/
(
accuracy
);
return
impact
;
}
...
...
src/de/tudarmstadt/maki/simonstrator/api/component/vehicular/roadnetwork/RoadNetworkEdge.java
View file @
5b735208
...
...
@@ -186,6 +186,10 @@ public class RoadNetworkEdge {
return
_originalMaxSpeed
;
}
public
double
getOriginalMaxSpeedState
()
{
return
RoadNetworkEdge
.
getCorrespondingState
(
_originalMaxSpeed
);
}
public
int
getLaneAmount
()
{
return
_lanes
.
size
();
}
...
...
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