- Reference to path_requests_run.py added in README.rst file

- adding a program to convert json result file into a CSV file
- adding some more metrics in the results

Signed-off-by: EstherLerouzic <esther.lerouzic@orange.com>
This commit is contained in:
EstherLerouzic
2018-08-31 17:16:48 +01:00
parent 06399ca8af
commit 3d8ac83fcc
3 changed files with 193 additions and 2 deletions

View File

@@ -125,7 +125,21 @@ element. The amplifier is currently defined with gain range of 15 dB to 25 dB
and 21 dBm max output power. Ripple and NF models are defined in
`examples/std_medium_gain_advanced_config.json <examples/std_medium_gain_advanced_config.json>`_
It is possible to use an excell file input. this will generate the json topology entry. How to prepare the Excel input file is explained `here <Excel_userguide.rst>`_.
It is possible to use an Excel file input. This will generate the json topology entry. How to prepare the Excel input file is explained `here <Excel_userguide.rst>`_.
**Run multiple optimisation with path_requests_run.py**
**Usage**: path_requests_run.py [-h] [-v] [-o OUTPUT]
[network_filename xls or json] [service_filename xls or json] [eqpt_filename json]
.. code-block:: shell
$ cd examples
$ python path_requests_run.py meshTopologyExampleV2.xls meshTopologyExampleV2_services.json eqpt_file -o output_file.json
Additionally to the json or excel topology input, the program requires a list of connection to be estimated and the equipment library. The program computes performances for the list of services (accepts json or excel format) using the same spectrum propagation modules as transmission_main_example.py. Explanation on the Excel template is provided in the `Excel_userguide.rst <Excel_userguide.rst#service-sheet>`_ ; template for the json format can be found here: `service_template.json <https://github.com/Telecominfraproject/oopt-gnpy/blob/8f8fc13dedee83532ff5bf83defb5fcb15b46f9f/service-template.json#L1>`_.
Contributing
------------

View File

@@ -0,0 +1,165 @@
{
"path-request": [
{
"request-id": 0,
"source": "Lorient_KMA",
"destination": "Vannes_KBE",
"src-tp-id": "trx Lorient_KMA",
"dst-tp-id": "trx Vannes_KBE",
"path-constraints": {
"te-bandwidth": {
"technology": "flexi-grid",
"trx_type": "Voyager_16QAM",
"trx_mode": "16QAM",
"effective-freq-slot": [
{
"n": "null",
"m": "null"
}
],
"spacing": 50000000000.0,
"max-nb-of-channel": 80,
"output-power": 0.0012589254117941673
}
},
"optimizations": {
"explicit-route-include-objects": []
}
},
{
"request-id": 1,
"source": "Brest_KLA",
"destination": "Vannes_KBE",
"src-tp-id": "trx Brest_KLA",
"dst-tp-id": "trx Vannes_KBE",
"path-constraints": {
"te-bandwidth": {
"technology": "flexi-grid",
"trx_type": "Voyager_16QAM",
"trx_mode": "16QAM",
"effective-freq-slot": [
{
"n": "null",
"m": "null"
}
],
"spacing": 50000000000.0,
"max-nb-of-channel": 80,
"output-power": 0.0012589254117941673
}
},
"optimizations": {
"explicit-route-include-objects": [
{
"index": 0,
"unnumbered-hop": {
"node-id": "Lannion_CAS",
"link-tp-id": "link-tp-id is not used",
"hop-type": "loose",
"direction": "direction is not used"
},
"label-hop": {
"te-label": {
"generic": "generic is not used",
"direction": "direction is not used"
}
}
},
{
"index": 1,
"unnumbered-hop": {
"node-id": "Lorient_KMA",
"link-tp-id": "link-tp-id is not used",
"hop-type": "loose",
"direction": "direction is not used"
},
"label-hop": {
"te-label": {
"generic": "generic is not used",
"direction": "direction is not used"
}
}
}
]
}
},
{
"request-id": 3,
"source": "Lannion_CAS",
"destination": "Rennes_STA",
"src-tp-id": "trx Lannion_CAS",
"dst-tp-id": "trx Rennes_STA",
"path-constraints": {
"te-bandwidth": {
"technology": "flexi-grid",
"trx_type": "vendorA_trx-type1",
"trx_mode": "PS_SP64_1",
"effective-freq-slot": [
{
"n": "null",
"m": "null"
}
],
"spacing": 50000000000.0,
"max-nb-of-channel": 80,
"output-power": 0.0012589254117941673
}
},
"optimizations": {
"explicit-route-include-objects": []
}
},
{
"request-id": 4,
"source": "Rennes_STA",
"destination": "Lannion_CAS",
"src-tp-id": "trx Rennes_STA",
"dst-tp-id": "trx Lannion_CAS",
"path-constraints": {
"te-bandwidth": {
"technology": "flexi-grid",
"trx_type": "vendorA_trx-type1",
"trx_mode": "PS_SP64_2",
"effective-freq-slot": [
{
"n": "null",
"m": "null"
}
],
"spacing": 75000000000.0,
"max-nb-of-channel": 64,
"output-power": 0.0019952623149688794
}
},
"optimizations": {
"explicit-route-include-objects": []
}
}
],
"synchronisation": [
{
"synchonization-id": 0,
"svec": {
"relaxable": "False",
"link-diverse": "True",
"node-diverse": "True",
"request-id-number": [
0,
0
]
}
},
{
"synchonization-id": 3,
"svec": {
"relaxable": "False",
"link-diverse": "True",
"node-diverse": "True",
"request-id-number": [
3,
4
]
}
}
]
}

View File

@@ -37,7 +37,7 @@ class Path_request:
self.destination = params.destination
self.tsp = params.trx_type
self.tsp_mode = params.trx_mode
self.baud_rate = params.baud_rate
self.baud_rate = params.baud_rate
self.nodes_list = params.nodes_list
self.loose_list = params.loose_list
self.spacing = params.spacing
@@ -89,6 +89,18 @@ class Result_element(Element):
{
'metric-type': 'SNR@0.1nm',
'accumulative-value': round(mean(self.computed_path[-1].snr+lin2db(self.path_request.baud_rate/12.5e9)),2)
},
{
'metric-type': 'OSNR@bandwidth',
'accumulative-value': round(mean(self.computed_path[-1].osnr_ase),2)
},
{
'metric-type': 'OSNR@0.1nm',
'accumulative-value': round(mean(self.computed_path[-1].osnr_ase_01nm),2)
},
{
'metric-type': 'reference_power',
'accumulative-value': self.path_request.power
}
],
'path-srlgs': {