Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
SEAM
seamcat
Commits
57db748f
Commit
57db748f
authored
1 week ago
by
Stephan Korsholm
Browse files
Options
Download
Email Patches
Plain Diff
#254
: Drive-by abstraction
parent
91606211
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
core/src/main/java/org/seamcat/model/systems/imt2020/IMT2020BaseStation.java
+1
-1
...org/seamcat/model/systems/imt2020/IMT2020BaseStation.java
core/src/main/java/org/seamcat/model/systems/imt2020/IMT2020Link.java
+2
-2
...n/java/org/seamcat/model/systems/imt2020/IMT2020Link.java
core/src/main/java/org/seamcat/model/systems/imt2020/IMT2020UpOrDownLinkBaseStation.java
+10
-7
...model/systems/imt2020/IMT2020UpOrDownLinkBaseStation.java
core/src/main/java/org/seamcat/model/systems/imt2020/WrapAroundBaseStation.java
+1
-1
.../seamcat/model/systems/imt2020/WrapAroundBaseStation.java
core/src/main/java/org/seamcat/model/systems/imt2020downlink/simulation/IMT2020DownLinkBaseStation.java
+1
-11
...mt2020downlink/simulation/IMT2020DownLinkBaseStation.java
core/src/main/java/org/seamcat/model/systems/imt2020uplink/simulation/IMT2020UpLinkBaseStation.java
+1
-10
...ms/imt2020uplink/simulation/IMT2020UpLinkBaseStation.java
with
16 additions
and
32 deletions
+16
-32
core/src/main/java/org/seamcat/model/systems/imt2020/IMT2020BaseStation.java
+
1
-
1
View file @
57db748f
...
...
@@ -3,7 +3,7 @@ package org.seamcat.model.systems.imt2020;
import
org.seamcat.model.geometry.Point2D
;
public
interface
IMT2020BaseStation
{
void
initializeLink
(
IMT2020Link
link
);
void
initializeLink
(
IMT2020Link
<?
extends
IMT2020UpOrDownLinkBaseStation
>
link
);
boolean
initialConnect
();
...
...
This diff is collapsed.
Click to expand it.
core/src/main/java/org/seamcat/model/systems/imt2020/IMT2020Link.java
+
2
-
2
View file @
57db748f
...
...
@@ -90,7 +90,7 @@ public abstract class IMT2020Link<BaseStationType extends IMT2020UpOrDownLinkBas
return
basestation
;
}
public
void
setBaseStation
(
BaseStation
Type
basestation
)
{
this
.
basestation
=
basestation
;
public
void
setBaseStation
(
IMT2020UpOrDownLink
BaseStation
basestation
)
{
this
.
basestation
=
(
BaseStationType
)
basestation
;
}
}
This diff is collapsed.
Click to expand it.
core/src/main/java/org/seamcat/model/systems/imt2020/IMT2020UpOrDownLinkBaseStation.java
+
10
-
7
View file @
57db748f
...
...
@@ -18,7 +18,7 @@ public abstract class IMT2020UpOrDownLinkBaseStation implements IMT2020BaseStati
protected
boolean
referenceCell
;
protected
double
sectorOffset
;
protected
int
subCarriersInUse
;
private
SeamcatRandom
random
;
private
final
SeamcatRandom
random
;
// Constructor to initialize all fields
public
IMT2020UpOrDownLinkBaseStation
(
AntennaProperties
antennaProperties
,
double
antennaTilt
,
double
aziOffset
,
...
...
@@ -38,8 +38,6 @@ public abstract class IMT2020UpOrDownLinkBaseStation implements IMT2020BaseStati
random
=
RandomAccessor
.
getRandom
();
}
public
IMT2020UpOrDownLinkBaseStation
()
{}
protected
int
getRandomInt
(
int
size
)
{
return
random
.
nextInt
(
size
);
}
...
...
@@ -80,6 +78,7 @@ public abstract class IMT2020UpOrDownLinkBaseStation implements IMT2020BaseStati
return
elevOffset
;
}
@Override
public
Point2D
getPosition
()
{
return
position
;
}
...
...
@@ -92,9 +91,13 @@ public abstract class IMT2020UpOrDownLinkBaseStation implements IMT2020BaseStati
return
antennaProperties
;
}
public
abstract
void
initializeLink
(
IMT2020Link
link
);
public
abstract
boolean
initialConnect
();
@Override
public
void
initializeLink
(
IMT2020Link
<?
extends
IMT2020UpOrDownLinkBaseStation
>
link
)
{
link
.
setBaseStation
(
this
);
}
public
abstract
boolean
isWrapAround
();
@Override
public
boolean
isWrapAround
()
{
return
false
;
}
}
This diff is collapsed.
Click to expand it.
core/src/main/java/org/seamcat/model/systems/imt2020/WrapAroundBaseStation.java
+
1
-
1
View file @
57db748f
...
...
@@ -13,7 +13,7 @@ public class WrapAroundBaseStation implements IMT2020BaseStation {
}
@Override
public
void
initializeLink
(
IMT2020Link
link
)
{
public
void
initializeLink
(
IMT2020Link
<?
extends
IMT2020UpOrDownLinkBaseStation
>
link
)
{
link
.
setWrapAround
(
true
);
link
.
setBaseStation
(
corresponding
);
}
...
...
This diff is collapsed.
Click to expand it.
core/src/main/java/org/seamcat/model/systems/imt2020downlink/simulation/IMT2020DownLinkBaseStation.java
+
1
-
11
View file @
57db748f
...
...
@@ -5,7 +5,6 @@ import java.util.List;
import
org.seamcat.model.RadioSystem
;
import
org.seamcat.model.geometry.Point2D
;
import
org.seamcat.model.mathematics.Mathematics
;
import
org.seamcat.model.systems.imt2020.IMT2020Link
;
import
org.seamcat.model.systems.imt2020.IMT2020UpOrDownLinkBaseStation
;
public
class
IMT2020DownLinkBaseStation
extends
IMT2020UpOrDownLinkBaseStation
{
...
...
@@ -44,6 +43,7 @@ public class IMT2020DownLinkBaseStation extends IMT2020UpOrDownLinkBaseStation {
* load factor of the network to simulate
*
*/
@Override
public
boolean
initialConnect
()
{
int
sum
=
getSubCarriersInUse
();
...
...
@@ -118,17 +118,7 @@ public class IMT2020DownLinkBaseStation extends IMT2020UpOrDownLinkBaseStation {
+
(
numberOfSubCarrierPerMobile
*
resourceBlockBandwidth
)
/
2
*
(
linkIndex
*
2
+
1
);
}
@Override
public
void
initializeLink
(
IMT2020Link
link
)
{
link
.
setBaseStation
(
this
);
}
public
void
setActiveLinks
(
List
<
IMT2020DownLink
>
activeLinks
)
{
this
.
activeLinks
=
activeLinks
;
}
@Override
public
boolean
isWrapAround
()
{
return
false
;
}
}
This diff is collapsed.
Click to expand it.
core/src/main/java/org/seamcat/model/systems/imt2020uplink/simulation/IMT2020UpLinkBaseStation.java
+
1
-
10
View file @
57db748f
...
...
@@ -46,6 +46,7 @@ public class IMT2020UpLinkBaseStation extends IMT2020UpOrDownLinkBaseStation {
*
* @return if it is under loaded (no more in the candidate list) but still not loaded as wanted
*/
@Override
public
boolean
initialConnect
()
{
int
sum
=
getSubCarriersInUse
();
int
limit
=
settings
.
getNumberOfResourceBlocksPrBS
();
...
...
@@ -182,17 +183,7 @@ public class IMT2020UpLinkBaseStation extends IMT2020UpOrDownLinkBaseStation {
return
sum_Watt
;
}
@Override
public
void
initializeLink
(
IMT2020Link
link
)
{
link
.
setBaseStation
(
this
);
}
public
void
setActiveLinks
(
List
<
IMT2020UpLink
>
activeLinks
)
{
this
.
activeLinks
=
activeLinks
;
}
@Override
public
boolean
isWrapAround
()
{
return
false
;
}
}
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