Skip to content
GitLab
Explore
Projects
Groups
Snippets
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
SEAM
seamcat
Commits
8aa75563
Commit
8aa75563
authored
1 year ago
by
Stephan Korsholm
Browse files
Options
Download
Email Patches
Plain Diff
Resolve "EPP 10 - EPP for Cellular results display"
parent
88b912be
master
#187_FDP
#253_IMT2020_Results_enh
#256_EPP_15_ClutterHeight
119-geo-satellite-down-link-plugin
119-geo-satellite-down-link-system-plugin-as-interferer
119-merge
174-load-relative-positioning-from-file
204-alternative-approaches
204-cpu-time-only-approx-40-is-used
215-compare-tool-improvements-2
221-opening-workspaces-with-embedded-jar
251-add-info-parameter-to-samples
254-extending-event-results-enhancements-to-other-cellular
254-extending-event-results-enhancements-to-other-cellular-ofdma
254_alt
Advanced_EPPTest
5.5.1-loctime-1
5.5.1-ALPHA-5
5.5.1-ALPHA-4
5.5.1-ALPHA-3
5.5.1-ALPHA-2
5.5.0-official
5.5.0-beta-2
No related merge requests found
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
core/src/main/java/org/seamcat/model/eventprocessing/DemoEPP_10_OFDMA_Internals.java
+42
-31
...cat/model/eventprocessing/DemoEPP_10_OFDMA_Internals.java
core/src/main/java/org/seamcat/model/systems/ofdmauplink/simulation/OFDMAUpLinkSimulation.java
+6
-5
...systems/ofdmauplink/simulation/OFDMAUpLinkSimulation.java
core/src/test/java/org/seamcat/model/eventprocessing/TestDemoEPP_10_OFDMA_Internals.java
+109
-0
...model/eventprocessing/TestDemoEPP_10_OFDMA_Internals.java
core/src/test/resources/integrationtests/WS_generic_allCellSystems_Test2.sws
+0
-0
...rces/integrationtests/WS_generic_allCellSystems_Test2.sws
model/src/main/java/org/seamcat/model/simulation/result/ValueName.java
+3
-3
...n/java/org/seamcat/model/simulation/result/ValueName.java
with
160 additions
and
39 deletions
+160
-39
core/src/main/java/org/seamcat/model/eventprocessing/DemoEPP_10_OFDMA_Internals.java
+
42
-
31
View file @
8aa75563
package
org.seamcat.model.eventprocessing
;
import
static
org
.
seamcat
.
model
.
plugin
.
system
.
BuiltInSystem
.*;
import
static
org
.
seamcat
.
model
.
plugin
.
system
.
StandardResults
.*;
import
java.util.ArrayList
;
import
java.util.List
;
import
org.apache.logging.log4j.LogManager
;
import
org.apache.logging.log4j.Logger
;
import
org.seamcat.model.Scenario
;
import
org.seamcat.model.factory.Factory
;
import
org.seamcat.model.plugin.Config
;
...
...
@@ -14,8 +16,10 @@ import org.seamcat.model.simulation.result.*;
import
org.seamcat.model.types.Description
;
import
org.seamcat.model.types.Unit
;
import
org.seamcat.model.types.result.DescriptionImpl
;
import
org.seamcat.model.workspace.result.CollectorImpl
;
public
class
DemoEPP_10_OFDMA_Internals
implements
EventProcessingPlugin
<
DemoEPP_10_OFDMA_Internals
.
Input
>
{
private
static
final
Logger
LOG
=
LogManager
.
getRootLogger
();
public
static
VectorDef
SINR_ACHIEVED_ALL
=
Factory
.
results
().
vector
(
ValueName
.
SINR_ACHIEVED_ALL
,
Unit
.
dB
);
public
static
VectorDef
BIT_RATE_ACHIEVED_ALL
=
Factory
.
results
().
vector
(
ValueName
.
BITRATE_ACHIEVED_ALL
,
Unit
.
kbps
);
public
static
VectorDef
RECEIVED_POWER_ALL
=
Factory
.
results
().
vector
(
ValueName
.
RECEIVED_POWER_ALL
,
Unit
.
dBm
);
...
...
@@ -29,9 +33,6 @@ public class DemoEPP_10_OFDMA_Internals implements EventProcessingPlugin<DemoEPP
String
name
=
scenario
.
getVictim
().
getName
();
for
(
int
i
=
0
;
i
<
vCollector
.
getVictims
().
size
();
i
++)
{
collector
.
add
(
Factory
.
results
().
vector
(
ValueName
.
DISTANCES
,
name
+
"_"
+
String
.
valueOf
(
i
),
Unit
.
km
,
false
),
vCollector
.
getVictims
().
get
(
i
).
getLinkResult
().
getTxRxDistance
());
if
(
input
.
externalInterferenceUnwanted
())
{
collector
.
add
(
Factory
.
results
().
vector
(
"External interference unwanted"
,
name
+
"_"
+
String
.
valueOf
(
i
),
Unit
.
dBm
,
false
),
...
...
@@ -44,30 +45,52 @@ public class DemoEPP_10_OFDMA_Internals implements EventProcessingPlugin<DemoEPP
}
}
handle
(
input
.
frequency
(),
FREQUENCY
_ALL
,
collector
,
vCollector
,
name
);
handle
(
input
.
bitRateAchieved
(),
BIT
_
RATE_ACHIEVED
_ALL
,
collector
,
vCollector
,
name
);
handle
(
input
.
receivedPower
(),
RECEIVED_POWER
_ALL
,
collector
,
vCollector
,
name
);
handle
(
input
.
SINRAchieved
(),
SINR_ACHIEVED
_ALL
,
collector
,
vCollector
,
name
);
handle
(
input
.
currentTransmitPower
(),
CURRENT_TRANSMIT_POWER
_ALL
,
collector
,
vCollector
,
name
);
handle
(
input
.
interferencePower
(),
INTERFERENCE_POWER
_ALL
,
collector
,
vCollector
,
name
);
handle
(
input
.
interSystemInterference
(),
INTER_SYSTEM_INTERFERENCE
_ALL
,
collector
,
vCollector
,
name
);
handle
(
input
.
pathLoss
(),
PATH_LOSS
_ALL
,
collector
,
vCollector
,
name
);
handle
(
input
.
effectivePathLoss
(),
EFFECTIVE_PATH_LOSS
_ALL
,
collector
,
vCollector
,
name
);
handle
(
input
.
frequency
(),
ValueName
.
FREQUENCY
,
collector
,
vCollector
,
name
);
handle
(
input
.
bitRateAchieved
(),
ValueName
.
BITRATE_ACHIEVED
,
collector
,
vCollector
,
name
);
handle
(
input
.
receivedPower
(),
ValueName
.
RECEIVED_POWER
,
collector
,
vCollector
,
name
);
handle
(
input
.
SINRAchieved
(),
ValueName
.
SINR_ACHIEVED
,
collector
,
vCollector
,
name
);
handle
(
input
.
currentTransmitPower
(),
ValueName
.
CURRENT_TRANSMIT_POWER
,
collector
,
vCollector
,
name
);
handle
(
input
.
interferencePower
(),
ValueName
.
INTERFERENCE_POWER
,
collector
,
vCollector
,
name
);
handle
(
input
.
interSystemInterference
(),
ValueName
.
INTER_SYSTEM_INTERFERENCE
,
collector
,
vCollector
,
name
);
handle
(
input
.
pathLoss
(),
ValueName
.
PATH_LOSS
,
collector
,
vCollector
,
name
);
handle
(
input
.
effectivePathLoss
(),
ValueName
.
EFFECTIVE_PATH_LOSS
,
collector
,
vCollector
,
name
);
}
private
void
handle
(
boolean
relevant
,
VectorDef
def
,
Collector
col
,
VictimResultCollector
vCol
,
String
name
)
{
private
void
handle
(
boolean
relevant
,
String
def
,
Collector
col
,
VictimResultCollector
vCol
,
String
name
)
{
if
(
relevant
)
{
List
<
Double
>
vector
=
vCol
.
getSamples
(
def
);
VectorDef
rDef
;
VectorDef
vector
=
findVector
(((
CollectorImpl
)
vCol
).
samples
().
keySet
(),
def
);
if
(
vector
!=
null
)
{
List
<
Double
>
vectorSamples
=
vCol
.
getSamples
(
vector
);
VectorDef
rDef
;
int
count
=
0
;
for
(
double
v
:
vector
)
{
rDef
=
Factory
.
results
().
vector
(
def
.
name
().
replace
(
"(all)"
,
""
),
name
+
"_"
+
String
.
valueOf
(
count
++),
def
.
unit
(),
false
);
for
(
double
v
:
vector
Samples
)
{
rDef
=
Factory
.
results
().
vector
(
vector
.
name
().
replace
(
"(ref. cell)"
,
""
),
name
+
"_"
+
String
.
valueOf
(
count
++),
vector
.
unit
(),
false
);
col
.
add
(
rDef
,
v
);
}
}
else
{
String
message
=
"Vector '"
+
def
+
"' not found for system '"
+
name
+
"'"
;
LOG
.
warn
(
message
);
}
}
}
private
VectorDef
findVector
(
Iterable
<
VectorDef
>
vectorDefinitions
,
String
def
)
{
List
<
VectorDef
>
candidates
=
new
ArrayList
<>();
for
(
VectorDef
vector
:
vectorDefinitions
)
{
if
(
vector
.
name
().
contains
(
def
))
{
candidates
.
add
(
vector
);
}
}
if
(
candidates
.
size
()
==
1
)
{
return
candidates
.
get
(
0
);
}
for
(
VectorDef
vector
:
candidates
)
{
if
(
vector
.
name
().
toLowerCase
().
contains
(
"all"
))
{
return
vector
;
}
}
return
null
;
}
@Override
...
...
@@ -111,24 +134,12 @@ public class DemoEPP_10_OFDMA_Internals implements EventProcessingPlugin<DemoEPP
@Config
(
order
=
10
,
name
=
"Inter system interference"
)
boolean
interSystemInterference
();
/* @Config(order = 11, name="External interference")
boolean externalInterference();*/
@Config
(
order
=
12
,
name
=
"External interference blocking"
)
boolean
externalInterferenceBlocking
();
@Config
(
order
=
13
,
name
=
"External interference unwanted"
)
boolean
externalInterferenceUnwanted
();
@Config
(
order
=
14
,
name
=
"Base station bit rate achieved"
)
boolean
baseStationBitRate
();
/* @Config(order = 15, name = "Power control PL")
boolean powerControlPL();*/
/* @Config(order = 16, name = "Power control PLilx")
boolean powerControlPLilx();*/
@Config
(
order
=
17
,
name
=
"Path loss"
)
boolean
pathLoss
();
...
...
This diff is collapsed.
Click to expand it.
core/src/main/java/org/seamcat/model/systems/ofdmauplink/simulation/OFDMAUpLinkSimulation.java
+
6
-
5
View file @
8aa75563
...
...
@@ -106,9 +106,7 @@ public class OFDMAUpLinkSimulation implements SimulationInstance {
for
(
Victim
victim
:
collector
.
getVictims
())
{
VictimImpl
v
=
(
VictimImpl
)
victim
;
collector
.
sample
(
FREQUENCY_ALL
,
v
.
getUEFrequency
());
collector
.
sample
(
BIT_RATE_ACHIEVED_ALL
,
v
.
getAchievedBitrate
());
collector
.
sample
(
RECEIVED_POWER_ALL
,
v
.
getReceivePower
());
collector
.
sample
(
SINR_ACHIEVED_ALL
,
v
.
getAchievedSINR
());
collector
.
sample
(
PATH_LOSS_ALL
,
v
.
getLinkResult
().
getTxRxPathLoss
());
collector
.
sample
(
EFFECTIVE_PATH_LOSS_ALL
,
v
.
getLinkResult
().
getEffectiveTxRxPathLoss
());
...
...
@@ -116,9 +114,7 @@ public class OFDMAUpLinkSimulation implements SimulationInstance {
if
(
v
.
isConnectedToReferenceCell
())
{
collector
.
sample
(
plugin
.
FREQUENCY
,
v
.
getUEFrequency
());
collector
.
sample
(
plugin
.
BIT_RATE_ACHIEVED
,
v
.
getAchievedBitrate
());
collector
.
sample
(
plugin
.
RECEIVED_POWER
,
v
.
getReceivePower
());
collector
.
sample
(
plugin
.
SINR_ACHIEVED
,
v
.
getAchievedSINR
());
collector
.
sample
(
plugin
.
PATH_LOSS
,
v
.
getLinkResult
().
getTxRxPathLoss
());
collector
.
sample
(
plugin
.
EFFECTIVE_PATH_LOSS
,
v
.
getLinkResult
().
getEffectiveTxRxPathLoss
());
...
...
@@ -197,9 +193,12 @@ public class OFDMAUpLinkSimulation implements SimulationInstance {
for
(
Victim
victim
:
vCollector
.
getVictims
())
{
VictimImpl
vi
=
(
VictimImpl
)
victim
;
vi
.
calculateAchievedSINRWatt
();
double
sinr
=
Mathematics
.
dB2Linear
(
vi
.
getAchievedSINR
());
double
sinr
=
vi
.
getAchievedSINR
();
vCollector
.
sample
(
SINR_ACHIEVED_ALL
,
sinr
);
sinr
=
Mathematics
.
dB2Linear
(
vi
.
getAchievedSINR
());
vi
.
calculateAchievedBitrate
();
double
ach
=
vi
.
getAchievedBitrate
();
vCollector
.
sample
(
BIT_RATE_ACHIEVED_ALL
,
ach
);
totalBitrate
+=
ach
;
if
(
vi
.
isConnectedToReferenceCell
())
{
sinrRefCellSum
+=
sinr
;
...
...
@@ -207,6 +206,8 @@ public class OFDMAUpLinkSimulation implements SimulationInstance {
refCellBitrate
+=
ach
;
dRSS
+=
Mathematics
.
dB2Linear
(
vi
.
getReceivePower
());
ISI
+=
vi
.
getTotalInterferenceWatt
();
vCollector
.
sample
(
plugin
.
BIT_RATE_ACHIEVED
,
ach
);
vCollector
.
sample
(
plugin
.
SINR_ACHIEVED
,
Mathematics
.
linear2dB
(
sinr
));
}
sinrSum
+=
sinr
;
}
...
...
This diff is collapsed.
Click to expand it.
core/src/test/java/org/seamcat/model/eventprocessing/TestDemoEPP_10_OFDMA_Internals.java
0 → 100644
+
109
-
0
View file @
8aa75563
package
org.seamcat.model.eventprocessing
;
import
static
org
.
junit
.
Assert
.*;
import
java.lang.reflect.Method
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.stream.StreamSupport
;
import
org.junit.Test
;
import
org.seamcat.integrationtests.DeterministicWorkspaceLoader
;
import
org.seamcat.model.factory.ProxyHelper
;
import
org.seamcat.model.plugin.system.SystemPlugin
;
import
org.seamcat.model.simulation.result.Collector
;
import
org.seamcat.model.simulation.result.EventResult
;
import
org.seamcat.model.simulation.result.ValueName
;
import
org.seamcat.model.simulation.result.VectorDef
;
import
org.seamcat.model.types.Configuration
;
import
org.seamcat.model.workspace.WorkspaceModel
;
public
class
TestDemoEPP_10_OFDMA_Internals
extends
DeterministicWorkspaceLoader
{
@Test
public
void
testDistance
()
throws
Exception
{
loadWorkspace
(
"/WS_generic_allCellSystems_Test2.sws"
);
EventResult
result
=
runSimulation
(
1L
);
List
<
EventProcessingConfiguration
>
epps
=
workspace
.
getEventProcessingList
();
assertEquals
(
1
,
epps
.
size
());
EventProcessingConfiguration
epp10
=
epps
.
get
(
0
);
Iterable
<
VectorDef
>
vectors
=
getVectorDefs
(
result
);
for
(
VectorDef
vector
:
vectors
)
{
// Distances should not be part of what is reported by this EPP
assertFalse
(
vector
.
group
().
contains
(
ValueName
.
DISTANCES
));
}
}
private
static
Iterable
<
VectorDef
>
getVectorDefs
(
EventResult
result
)
{
List
<
Collector
>
eventProcessingResults
=
result
.
getEventProcessingResults
();
Collector
collector
=
eventProcessingResults
.
get
(
0
);
Iterable
<
VectorDef
>
vectors
=
collector
.
getVectorDefinitions
();
return
vectors
;
}
@Test
public
void
testInput
()
throws
Exception
{
loadWorkspace
(
"/WS_generic_allCellSystems_Test2.sws"
);
WorkspaceModel
model
=
workspace
.
getModel
();
List
<
Configuration
>
configs
=
model
.
pluginConfigurations
();
assertEquals
(
1
,
configs
.
size
());
Configuration
conf
=
configs
.
get
(
0
);
if
(
conf
instanceof
EventProcessingConfiguration
)
{
EventProcessingConfiguration
eppConf
=
(
EventProcessingConfiguration
)
conf
;
Object
inputModel
=
eppConf
.
getModel
();
if
(
inputModel
instanceof
DemoEPP_10_OFDMA_Internals
.
Input
)
{
DemoEPP_10_OFDMA_Internals
.
Input
epp10model
=
(
DemoEPP_10_OFDMA_Internals
.
Input
)
inputModel
;
Map
<
Method
,
Object
>
values
=
ProxyHelper
.
getProxyValues
(
epp10model
);
List
<
SystemPlugin
>
systems
=
workspace
.
getSystemPlugins
();
for
(
SystemPlugin
system
:
systems
)
{
String
name
=
system
.
getUI
().
description
().
name
();
if
(!
name
.
contains
(
"Generic"
))
{
// Disable all values
for
(
Method
method
:
values
.
keySet
())
{
values
.
put
(
method
,
Boolean
.
valueOf
(
false
));
}
workspace
.
setVictimSystemId
(
system
.
getUI
().
id
());
EventResult
result
=
runSimulation
(
1L
);
Iterable
<
VectorDef
>
vectors
=
getVectorDefs
(
result
);
for
(
VectorDef
vector
:
vectors
)
{
// There should be no results
fail
();
}
int
factor
=
result
.
getAllInterferenceLinkResults
().
size
();
testInputValue
(
values
,
"frequency"
,
factor
);
setInputValue
(
values
,
"bitRateAchieved"
,
true
);
setInputValue
(
values
,
"receivedPower"
,
true
);
setInputValue
(
values
,
"SINRAchieved"
,
true
);
setInputValue
(
values
,
"currentTransmitPower"
,
true
);
setInputValue
(
values
,
"interferencePower"
,
false
);
setInputValue
(
values
,
"interSystemInterference"
,
false
);
setInputValue
(
values
,
"externalInterferenceBlocking"
,
true
);
setInputValue
(
values
,
"externalInterferenceUnwanted"
,
true
);
setInputValue
(
values
,
"pathLoss"
,
true
);
testInputValue
(
values
,
"effectivePathLoss"
,
factor
*
9
);
}
}
}
else
{
fail
();
}
}
else
{
fail
();
}
}
private
void
testInputValue
(
Map
<
Method
,
Object
>
values
,
String
valueName
,
int
expectedCount
)
{
setInputValue
(
values
,
valueName
,
true
);
EventResult
result
=
runSimulation
(
1L
);
Iterable
<
VectorDef
>
vectors
=
getVectorDefs
(
result
);
int
count
=
(
int
)
StreamSupport
.
stream
(
vectors
.
spliterator
(),
false
).
count
();
if
(
expectedCount
!=
count
)
{
assertEquals
(
expectedCount
,
count
);
}
}
private
void
setInputValue
(
Map
<
Method
,
Object
>
values
,
String
valueName
,
boolean
b
)
{
for
(
Method
method
:
values
.
keySet
())
{
if
(
method
.
getName
().
contains
(
valueName
))
{
values
.
put
(
method
,
Boolean
.
valueOf
(
b
));
return
;
}
}
}
}
This diff is collapsed.
Click to expand it.
core/src/test/resources/integrationtests/WS_generic_allCellSystems_Test2.sws
0 → 100644
+
0
-
0
View file @
8aa75563
File added
This diff is collapsed.
Click to expand it.
model/src/main/java/org/seamcat/model/simulation/result/ValueName.java
+
3
-
3
View file @
8aa75563
...
...
@@ -78,9 +78,9 @@ public class ValueName {
public
static
final
String
DRSS
=
"dRSS"
;
public
static
final
String
SUM_DRSS
=
"Sum dRSS"
;
public
static
final
String
EFFECTIVE_ANTENNA_HEIGHT
=
"Effective Antenna Height"
;
public
static
final
String
EFFECTIVE_PATH_LOSS
=
"Effective
P
ath loss"
;
public
static
final
String
EFFECTIVE_PATH_LOSS_ALL
=
"Effective path loss
(all)"
;
public
static
final
String
EFFECTIVE_PATH_LOSS_REF
=
"Effective path loss
(ref. "
;
public
static
final
String
EFFECTIVE_PATH_LOSS
=
"Effective
p
ath loss"
;
public
static
final
String
EFFECTIVE_PATH_LOSS_ALL
=
EFFECTIVE_PATH_LOSS
+
"
(all)"
;
public
static
final
String
EFFECTIVE_PATH_LOSS_REF
=
EFFECTIVE_PATH_LOSS
+
"
(ref. "
;
public
static
final
String
ELECTRICAL_ELEVATION_OFFSET
=
"Electrical elevation offset"
;
public
static
final
String
ELEMENT_GAIN
=
"Element gain"
;
public
static
final
String
ELEVATION
=
"Elevation "
;
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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
Menu
Explore
Projects
Groups
Snippets