Add cell-scale-factor to jsonschema 61/12061/1
authorMartin Skorupski <martin.skorupski@highstreet-technologies.com>
Sat, 18 Nov 2023 16:57:44 +0000 (17:57 +0100)
committerMartin Skorupski <martin.skorupski@highstreet-technologies.com>
Sat, 18 Nov 2023 16:58:13 +0000 (17:58 +0100)
- schema changed
- configs updated
- dummy implementation

Issue-ID: OAM-392
Change-Id: Id3664d066d21e6447c2590f21c8886db8a5b54cc
Signed-off-by: Martin Skorupski <martin.skorupski@highstreet-technologies.com>
code/network-generator/config.json
code/network-generator/network_generation/model/jsonSchema/configuration.schema.json
code/network-generator/network_generation/model/python/nr_cell_du.py
code/network-generator/network_generation/model/python/o_ran_network.py
code/network-generator/test_config.json

index 73c1e80..2863fe2 100644 (file)
@@ -32,6 +32,7 @@
       "nr-cell-du": {
         "sector-count": 1,
         "cell-angle": 120,
+        "cell-scale-factor-for-handover-area": 20,
         "max-reach": 400
       }
     }
index ee56992..8655d8b 100644 (file)
           "required": [
             "sector-count",
             "cell-angle",
+            "cell-scale-factor-for-handover-area",
             "max-reach"
           ],
           "properties": {
               "type": "integer",
               "minimum": 0,
               "maximum": 360,
-              "exclusiveMinimum": true
+              "exclusiveMinimum": 0
+            },
+            "cell-scale-factor-for-handover-area": {
+              "description": "A factor to increase the cell polygon for handover areas in procent [%]",
+              "type": "integer",
+              "minimum": 0,
+              "maximum": 50
             },
             "max-reach": {
               "description": "The maximal distance a UE can reach the cell in meters. The value also defines the radius around a tower where UEs may select a NRCellDU of an O-RAN-RU mounted at this tower.",
index 40fa66b..4854bb5 100644 (file)
@@ -1,4 +1,4 @@
-# Copyright 2023 highstreet technologies GmbH
+# Copyright 2023 highstreet technologies USA CORP.
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.
@@ -42,7 +42,11 @@ default_value: INrCellDu = cast(
     INrCellDu,
     {
         **ORanNode.default(),
-        **{"cellAngle": 120, "azimuth": 120},
+        **{
+            "cellAngle": 120,
+            "cellScaleFactorForHandoverArea": 0,
+            "azimuth": 120,
+        },
     },
 )
 
@@ -57,6 +61,9 @@ class NrCellDu(ORanNode):
         cell_data: INrCellDu = self._to_cell_data(data)
         super().__init__(cast(dict[str, Any], cell_data), **kwargs)
         self._cell_angle: int = int(str(cell_data["cellAngle"]))
+        self._cell_scale_factor: int = int(
+            str(cell_data["cellScaleFactorForHandoverArea"])
+        )
         self._azimuth: int = int(str(cell_data["azimuth"]))
 
     def _to_cell_data(self, data: dict[str, Any]) -> INrCellDu:
@@ -66,6 +73,30 @@ class NrCellDu(ORanNode):
                 result[key] = data[key]  # type: ignore
         return result
 
+    @property
+    def cell_angle(self) -> int:
+        return self._cell_angle
+
+    @cell_angle.setter
+    def cell_angle(self, value: int) -> None:
+        self._cell_angle = value
+
+    @property
+    def cell_scale_factor(self) -> int:
+        return self._cell_scale_factor
+
+    @cell_scale_factor.setter
+    def cell_scale_factor(self, value: int) -> None:
+        self._cell_scale_factor = value
+
+    @property
+    def azimuth(self) -> int:
+        return self._azimuth
+
+    @azimuth.setter
+    def azimuth(self, value: int) -> None:
+        self.azimuth = value
+
     def termination_points(self) -> list[ORanTerminationPoint]:
         result: list[ORanTerminationPoint] = super().termination_points()
         result.append(
@@ -152,6 +183,9 @@ class NrCellDu(ORanNode):
             text.append(",".join(strs))
         coordinates.text = " ".join(text)
 
+        if self.cell_scale_factor > 0:
+            print("hallo")
+
         return placemark
 
     def toSvg(self) -> ET.Element:
index 3f816b3..904245d 100644 (file)
@@ -62,7 +62,18 @@ class ORanNetwork(ORanObject):
             IGeoLocation, configuration["center"]
         )
 
-        size: int = int(configuration["pattern"]["nr-cell-du"]["max-reach"])
+        size: int = int(
+            int(configuration["pattern"]["nr-cell-du"]["max-reach"])
+            / (
+                1
+                + int(
+                    configuration["pattern"]["nr-cell-du"][
+                        "cell-scale-factor-for-handover-area"
+                    ]
+                )
+                / 100
+            )
+        )
         layout = Layout(
             Hexagon.layout_flat, Point(size, size), Point(0, 0)
         )  # 1 pixel = 1 meter
index b9fe710..d07cb30 100644 (file)
@@ -32,6 +32,7 @@
       "nr-cell-du": {
         "sector-count": 1,
         "cell-angle": 120,
+        "cell-scale-factor-for-handover-area": 20,
         "max-reach": 400
       }
     }