bugs from the last refactor merge
- fix#1: update fiber length after split
- fix#2: add egress amp after fiber split
Signed-off-by: Jean-Luc Auge <jeanluc.auge@orange.com>
- Separating test python files for different purposes
convert_file and convert_service_sheet now tested in a dedicated
file testing parsers_test.py
- Correction of tests due to previous major refactor (especially introducing
load_network)
- adding test files and references (expected json files)
- adding a test on service json file
- adapting the compare module to generated files
Signed-off-by: EstherLerouzic <esther.lerouzic@orange.com>
Excel_userguide has been updated with a description of how to use the service sheet
documentation on convert_service_sheet has been added
bugfix on convert_service_sheet to avoid multiple file writing
bugfix on create_eqpt_sheet.py to avoid the creation of a line when site is FUSED type
Completing README and adding templates for json files
Signed-off-by: EstherLerouzic <esther.lerouzic@orange.com>
Path_requests_run and convert_service_sheet.py now use funtions from transmission main
ISSUE from develop refactor : the json generation of the topology is missing all amplifiers !
- ILA are not included
- some edfa appear in the json topo when Eqpt sheet is used, but not all of them (only for
the requested path when running transmission_main_example)
TODO : identify if this is a new behaviour or if this is a regression
Signed-off-by: EstherLerouzic <esther.lerouzic@orange.com>
convert_services_sheet. py reads all columns and creat adhoc attributes.
Route constraint is saved in the "optimisation" field of the json format.
it is used as strict constraint for path computation. automatic decision
on node type is made based on the name.
Spacing, nb of channel and input power have been set in the requests json,
however this may not be inline with the ietf way: they should instead be
link attributes. However the objective of the program currently diverges
from this control oriented description , since requests explore whatif
scenarios for each request with its specific transponder type.
Introduction of loose case for the route constraint , input power,
spacing, nb of channel, per service entry
If no path exist to a loose node it is skipped. else a critical error is raised
Minor corrections on convert and path request
- convert: remove source and destination from intermediate list of nodes if
they are listed
- correction on the header of the sheet (column names)
- path-request: removing debug printings for a nice demo :)
Signed-off-by: EstherLerouzic <esther.lerouzic@orange.com>
verify that the trx_type is in the eqpt library
+ correction on the convert_service_sheet (use a list instead of multiple classes initialization)
Parametrisation of networkfile and spectril information in path_requests_run.py
addition of a second input file so that input can be with 2 excel files,
or with 2 json files , or a mix
utilisation of SI attribute in Eqpt_config.json for the input of spectral
information.
Implementation of transceiver_variety and parametrisation of eqpt_config.json
each request now reads the tranceiver type and convert it into
baudrate (assuming a mode).
eqpt_config file is now an argument of the path_requests_run.py
Adding additionnal columns in service sheet for mode, system and route
Transponder selection now includes the tsp modin the eqpt sheet now
also relies on mode name.
additional columns have been defined to input system values such as
channel spacing, input power, nb of channels. TODO : This enables to compute
the spectral information vector according to the transponder features
for each service in the list...
2 optional columns to define the path as input (with a loose attribute):
if present the path must contain the ordered list of nodes to be crossed
TODO : use path input instead of the internal path computed
Signed-off-by: EstherLerouzic <esther.lerouzic@orange.com>
Modules converts the service sheet into json file:
initial definition of classes.
Completing the json template of path computation request
Adding sync vector : but not in the correct form
should avoid multiple sync entries with same info
Treating multiple requests:
path_request_run.py allows computing snr from a list of requests
TODO: integrate into transmission_main_example and enable
feasiblility computation without path computation
Using transceiver class structure to export path computation feasibility
the output of the function now exports a list of tranceiver element,
each containing the result from spectral information propagation.
Adding transceiver type in eqpt library + correct form of xls sevice sheet
eqt library includes information abour transceivers and their modes
(baudrate, bitrate, OSNR threshold, and short name)
service sheet must not have annotation or comments outside of the useful row/column
Signed-off-by: EstherLerouzic <esther.lerouzic@orange.com>
network design when no amplifiers are input in the json file
select_edfa chose the best amplifier in equipment list _from
eqpt_config.json_ wiht the following criteria in order:
1-amplifier wih sufficient gain
2-amplifier wiht sufficient power TODO
3-best NF amplifier staisfying 1 & 2
Signed-off-by: Jean-Luc Auge <jeanluc.auge@orange.com>
xls topology is parsed automatically to json
transmission_main reads from the json generated topology
transmission_main should not read from convert.py data output
This way there is consistency between json and xls inputs
Signed-off-by: Jean-Luc Auge <jeanluc.auge@orange.com>
replacing bare string reading with Path object and split nam based on
Path structure in convert.py and in transmission_main_example.py
Update of pytest tests
Signed-off-by: EstherLerouzic <esther.lerouzic@orange.com>
Typos correction
Explanations added on how to fill in the excel Eqpt sheet
Removing verbose printing for debug of create_eqpt_sheet.py
Bug correction : blank removed when copying city names with creat_eqpt_sheet.py
Typos correction on README and Excel_userguide
adding some line for the export PYTHONPATH in the readme
typos corrections
Signed-off-by: EstherLerouzic <esther.lerouzic@orange.com>
The program reads the xls Nodes and Links Sheet and create the
mandatory city column as a text file.
If not present in Nodes the Type column is implicitely derived
from node degree (degree 2 means ILA, other means ROADM)
Signed-off-by: EstherLerouzic <esther.lerouzic@orange.com>
Text file path and name copied from excel input file for create_eqpt_sheet.py
input file name is used for the txt file creation
file is saved at the same place as the input file
Signed-off-by: EstherLerouzic <esther.lerouzic@orange.com>
xls convert:
sanity check Nodes vs Links sheets
column parsing limitation so user can add non code related
fields/information
code fix and eqpt_exists to check if an equipment is defined in the eqpt_config.json library
Signed-off-by: Jean-Luc Auge <jeanluc.auge@orange.com>
fix bug in Fused span: adding ingress and egress directions
=> do not share the same NE between 2 directions
Signed-off-by: Jean-Luc Auge <jeanluc.auge@orange.com>
*new Fused spans class to support the connection between 2 fibers
without amplification
*add_egress_amplifier adjust the edfa gain to compensate the loss
of n fused spans
*eqpt not found in eqpt library is caught and stop the code
Signed-off-by: Jean-Luc Auge <jeanluc.auge@orange.com>
code fix for the eqpt sheet reading in xls parser
Signed-off-by: Jean-Luc Auge <jeanluc.auge@orange.com>
amplifier design and eqpt parser code fix
Signed-off-by: Jean-Luc Auge <jeanluc.auge@orange.com>
*eqpt sheet is optional: no error message if missing
*All nodes description is not needed
=> only read the node eqpt config when amp_type is input
=> if amp_type = '', the node ingress or egress eqpt is ignored
=> the network.py add_egress_amplifier will fill in missing edfa
Signed-off-by: Jean-Luc Auge <jeanluc.auge@orange.com>
improve code reading and clarity of topology parser:
*modify the connections binding
=>def fiber_dest_from_source to find all dest_city connected to a source_city
=>def fiber_link to return the fiber link from source_city to dest_city
*makes the parser algorithm more understandable
*prepare for the equipment parser
Signed-off-by: Jean-Luc Auge <jeanluc.auge@orange.com>
*namedtuple default values are only applied if the cell is not read
*if the cell is read but is empty '', there is a need to provide default
values: which is what this fix does
*sanity checks are reinforced :
-node_type is replaced by ROADM if degree <> 2: notify user
(print)
-check that node type is in ('ILA','ROADM','FUSED')
Signed-off-by: Jean-Luc Auge <jeanluc.auge@orange.com>
Parse advanced fiber parameters from xls into json format:
accept a .xls or a .json input parameter
creates the corresponding .json file
read east/west directions for fiber parameters (fber type, distance...)
read node type (ILA or ROADM)
provide default values if fields are missing
=> full backward compatibility to read the original CORONET xls
Signed-off-by: Jean-Luc Auge <jeanluc.auge@orange.com>
-read eqpt_config.json with various EDFA and fiber type definitions
-std low gain and medium gain EDFA available
-clearer differentiation between the 2 edfa models:
is the advanced_config_from_json field present or not?
Signed-off-by: Jean-Luc Auge <jeanluc.auge@orange.com>
* clean transmission_main_example.py
Signed-off-by: Jean-Luc Auge <jeanluc.auge@orange.com>
* Add Instructions in README.rst and pytest path for CI
Instructions to run transmission_main_example.py
change config files path in ampliier_test to enable
Travis CI build
Signed-off-by: Jean-Luc Auge <jeanluc.auge@orange.com>
* Add EDFA unitary pytests
check nf calculation, nf models comparison, ase noise profile
elements.py edfa _gain_profile: add div 0 checks when no ripple
Signed-off-by: Jean-Luc Auge <jeanluc.auge@orange.com>
* support of coronet.conus network and add class __repr__
adaptation of convert.py to new code json formating
add_egress_amplifier, split_fiber and calculate_new_length
subs in network.py
elements.py:
code cleaning
adding new attributes in Edfa class (pin_db, pout_db...)
adding or augmenting class __repr__
Signed-off-by: Jean-Luc Auge <jeanluc.auge@orange.com>
* augment amplifier unitary tests and code cleaning
add new tests in amplifier_test.py for pytest
Edfa class code cleaning in elements.py
recheck code coherence and results
Signed-off-by: Jean-Luc Auge <jeanluc.auge@orange.com>
* ROADM support in network.py, convert.py, coronet json, ROADM class
creation of a ROADM class with 20dB loss
convert.py json parser modification to include roadms
network.py modification to automate amplifier placing after roadm
elements.py inclusion of Roadm class
Signed-off-by: Jean-Luc Auge <jeanluc.auge@orange.com>