Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
D
differentiable_throughput_model
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Lukas Eller
differentiable_throughput_model
Commits
5a9a26b3
Commit
5a9a26b3
authored
Nov 10, 2023
by
Lukas Eller
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Upload New File
parent
d717eeb7
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
70 additions
and
0 deletions
+70
-0
mappings.py
helpers/mappings.py
+70
-0
No files found.
helpers/mappings.py
0 → 100644
View file @
5a9a26b3
from
abc
import
ABC
import
tensorflow
as
tf
import
numpy
as
np
class
Mapping
(
ABC
):
@
tf
.
function
def
map
(
x
):
pass
class
Active_UEs_from_Connected
(
Mapping
):
def
__init__
(
self
,
demand
=
"medium"
):
#Linear mapping from monitoring data with different scaling factors depending on demand
if
demand
==
"high"
:
self
.
k
=
0.032709253358325543
elif
demand
==
"medium"
:
self
.
k
=
0.018575757575757582
elif
demand
==
"low"
:
self
.
k
=
0.007832927210246799
@
tf
.
function
def
map
(
self
,
x
):
return
tf
.
cast
(
self
.
k
*
x
,
tf
.
float32
)
class
Cell_Load_from_Active_UEs
(
Mapping
):
def
__init__
(
self
):
#Exponential fit from monitoring data
self
.
_w_0
=
0.92972595
self
.
_w_1
=
2.25275329
@
tf
.
function
def
map
(
self
,
x
):
return
tf
.
cast
(
self
.
_w_0
*
(
1
-
tf
.
exp
(
-
(
x
)
/
self
.
_w_1
)),
tf
.
float32
)
class
Spectral_Efficiency_from_CQI
(
Mapping
):
def
__init__
(
self
,
T
=
1
/
10
):
#Temperature for the sigmoid function to control smoothness
self
.
_T
=
T
@
tf
.
function
def
map
(
self
,
x
):
efficiency
=
np
.
array
(
[
0.1523
,
0.377
,
0.877
,
1.4766
,
1.9141
,
2.4063
,
2.7305
,
3.3223
,
3.9023
,
4.5234
,
5.1152
,
5.5547
,
6.2266
,
6.9141
,
7.4063
]
)
mapping_soft
=
0
current_sum
=
0
for
ankerpoint
in
range
(
1
,
16
):
spec_eff
=
efficiency
[
ankerpoint
-
1
]
delta
=
spec_eff
-
current_sum
mapping_soft
+=
delta
*
(
tf
.
math
.
sigmoid
((
x
-
((
ankerpoint
-
1
)
+
0.5
))
/
self
.
_T
))
current_sum
+=
delta
return
tf
.
cast
(
mapping_soft
,
tf
.
float32
)
class
CQI_from_SINR
(
Mapping
):
def
__init__
(
self
):
#Linear fit with softplus squasing from MDT data
self
.
_w_0
=
0.41238472
self
.
_w_1
=
7.73600132
lambda
x
:
15
-
tf
.
math
.
softplus
(
-
(
tf
.
math
.
softplus
(
0.41238472
*
x
+
7.73600132
)
-
15
)
)
@
tf
.
function
def
map
(
self
,
x
):
return
tf
.
cast
(
15
-
tf
.
math
.
softplus
(
-
(
tf
.
math
.
softplus
(
self
.
_w_0
*
x
+
self
.
_w_1
)
-
15
)
),
tf
.
float32
)
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