From: Martin Skorupski Date: Sat, 18 Nov 2023 16:57:44 +0000 (+0100) Subject: Add cell-scale-factor to jsonschema X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=commitdiff_plain;h=8d6fca09fdc1bae46b4dc5b7e029cf5a1c8997cc;p=oam.git Add cell-scale-factor to jsonschema - schema changed - configs updated - dummy implementation Issue-ID: OAM-392 Change-Id: Id3664d066d21e6447c2590f21c8886db8a5b54cc Signed-off-by: Martin Skorupski --- diff --git a/code/network-generator/config.json b/code/network-generator/config.json index 73c1e80..2863fe2 100644 --- a/code/network-generator/config.json +++ b/code/network-generator/config.json @@ -32,6 +32,7 @@ "nr-cell-du": { "sector-count": 1, "cell-angle": 120, + "cell-scale-factor-for-handover-area": 20, "max-reach": 400 } } diff --git a/code/network-generator/network_generation/model/jsonSchema/configuration.schema.json b/code/network-generator/network_generation/model/jsonSchema/configuration.schema.json index ee56992..8655d8b 100644 --- a/code/network-generator/network_generation/model/jsonSchema/configuration.schema.json +++ b/code/network-generator/network_generation/model/jsonSchema/configuration.schema.json @@ -238,6 +238,7 @@ "required": [ "sector-count", "cell-angle", + "cell-scale-factor-for-handover-area", "max-reach" ], "properties": { @@ -254,7 +255,13 @@ "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.", diff --git a/code/network-generator/network_generation/model/python/nr_cell_du.py b/code/network-generator/network_generation/model/python/nr_cell_du.py index 40fa66b..4854bb5 100644 --- a/code/network-generator/network_generation/model/python/nr_cell_du.py +++ b/code/network-generator/network_generation/model/python/nr_cell_du.py @@ -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: diff --git a/code/network-generator/network_generation/model/python/o_ran_network.py b/code/network-generator/network_generation/model/python/o_ran_network.py index 3f816b3..904245d 100644 --- a/code/network-generator/network_generation/model/python/o_ran_network.py +++ b/code/network-generator/network_generation/model/python/o_ran_network.py @@ -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 diff --git a/code/network-generator/test_config.json b/code/network-generator/test_config.json index b9fe710..d07cb30 100644 --- a/code/network-generator/test_config.json +++ b/code/network-generator/test_config.json @@ -32,6 +32,7 @@ "nr-cell-du": { "sector-count": 1, "cell-angle": 120, + "cell-scale-factor-for-handover-area": 20, "max-reach": 400 } }