- builds correspondance dicts between input name from excel
and names created with convert.py and autodesign in network.py
- correct the corresp_name dicts according to the effective
network autodesign. This supports the case of fiber splitting
and of fused elements
- include the case of parrallel links with only one hop
- interpret the node list constraint given by the user with the dict
- filter the constraints that are not applicable
- add tests for constraints
- correct equipment sheet of mesh_example_topologyv2.xls: morlaix and
loudeac should not appear in node A column since they are fused
ILA and FUSED constraints must be filled with the next node
information in order to avoid confusion on the direction.
for example
eg a----b-----c
| | |
i j k
| | |
e----f-----g
a constraint 'j' given for service i to k leads to 2 possible direction:
i-a-b-j-f-g-k
i-e-f-j-b-c-k
the user must indicate the chossen direction. This ambiguity does not
exist with network input in json format (names are unique).
Signed-off-by: EstherLerouzic <esther.lerouzic@orange.com>
Change-Id: Ia7cf2026e569c8b566459791fc89546b91fb117c
removing unused import
change short variable names to conform to [a-z_][a-z0-9_]{2,30}$
change main variable names to conform to [A-Z_][A-Z0-9_]{2,30}$
add or remove spaces
add docstrings
correct comments and indents of cut lines
Signed-off-by: EstherLerouzic <esther.lerouzic@orange.com>
remove unused imports
add docstrings
conform to '[A-Z_][A-Z0-9_]{2,30}$' pattern in main
remove trailing spaces
add/remove extra spaces
Signed-off-by: EstherLerouzic <esther.lerouzic@orange.com>
- Instead applying bidir option independantly from service demands (json or xls)
the "bidirectional" attribute is introduced per request in the json.
This enables bidirectional option per requests.
if --bidir option is used on the main program, the field is set
to true for all demands in case demands are expressed in an excel
sheet. --bidir option does not change bidir field if the service
file is in json format.
Default value of "bidirectional" attribute is False.
- As a result the reversed path is propagated only if the birectional
field of the request is True. (remember that the reversed path must
be computed whatever the option because it is needed to compute
spectral occupation on both directions).
Signed-off-by: EstherLerouzic <esther.lerouzic@orange.com>
add a no path case (request 6) in requests and expected responses.
response is also generated if path is not feasible: checks
that it is correctly handled in csv and json responses
Signed-off-by: EstherLerouzic <esther.lerouzic@orange.com>
previously contained the user-given source name in excel file,
but could differ from effective transponder source/destination
now both source and src-tp-id contain the same info (gnpy does
not make difference between node and ports)
Signed-off-by: EstherLerouzic <esther.lerouzic@orange.com>
+ removing (currently) unused direction attribute.
This will be added again in a later PR when it will be used
Signed-off-by: EstherLerouzic <esther.lerouzic@orange.com>
- removing empty objects (if no content , removes the object),
especially
- removing empty synchronization vector if no disjunction
constraint exists
- removing optional power and nb of channel fields, if user
did not specify any
when reading, first try if the object exists : try:/except to catch
this case
Signed-off-by: EstherLerouzic <esther.lerouzic@orange.com>
- changes concerning names due to ietf path-computation draft changes:
- 'unnumbered-hop' changed to 'num-unnum-hop'
- suppression of 'label-hop'
- 'link-diverse' and 'node-diverse' changed to 'disjointness'
- correction because of previously wrong interpretation of the model:
- detailed succession on include nodes moved from
'optimisation /explicit-route-include-objects'
to 'route-object-include-exclude'
in 'explicit-route-objects' attribute
- correction of keywords
- n and m replaced by N and M
- strict and loose replaces by STRICT and LOOSE strings
- change the name of respponse from 'path' to 'response'
example service file corrected accordingly
Signed-off-by: EstherLerouzic <esther.lerouzic@orange.com>
exception KeyError type in service sheet not correctly catched
print Request.mode instead of Requestmode (not defined at this point)
selection of modes did not respect min spacing criterium:
constraint added
transmission_main did not give SNR in 0.1 nm: added in std out
Signed-off-by: EstherLerouzic <esther.lerouzic@orange.com>
- indicate which request has incorrect tsp type or mode
- correct wrong reading from excel : if string values contain only a number
xlrd interprets as a float eg 1 -> 1.0 . A function is used to correct this
when filling the Request class
Signed-off-by: EstherLerouzic <esther.lerouzic@orange.com>
- adding cost in every config files including tests files,
- correcting wrong usage reactions (if value is not correct)
- correction of orthograph
Signed-off-by: EstherLerouzic <esther.lerouzic@orange.com>
- correction of json to csv function
- small correction on disjunction format to avoid double (double crash the program)
- adding time stamp to measure perf
- demands with all the same disjunction can be aggregated
- a new set of disjunction list is created to avoid inconsistancy
with the aggregated request-ids
Signed-off-by: EstherLerouzic <esther.lerouzic@orange.com>
adding the counting feature on standard output
adding tsp nb in csv + small bug fixes
small fixes to improve stdout and csv printing
small bug fixes on service aggregation and automatic correction of names
Signed-off-by: EstherLerouzic <esther.lerouzic@orange.com>
if mode is not given, the program automatically choses the first mode of the tsp
that has the highest bitrate and baudrate
- propagation for each loop on baudrate, no proppag in the loop on the mode
(same propoagation applies for identical baudrate)
- starts with the highest baudrate
- Make power and nb-channel optional fields
- power uses defaulf power in SI
- nb channel computed based on min max frequency and spacing
Signed-off-by: EstherLerouzic <esther.lerouzic@orange.com>
- add bitrate in the json service file and enable to support both with and without bitrate
- change mode to optional
- add an aggregation function that groups identical demands (except for id and bitrate)
TODO : check which mode can satisfy the request or how many transponders -> going towards
dimensionning
- Correcting some bug on loose parameter: hop-type attribute was forced to be always 'loose'
-> now reads the excel entry
- service sheets checks on header if field names are corrects, but any order is
now feasible.
Signed-off-by: EstherLerouzic <esther.lerouzic@orange.com>
- re-changing to to \u2192 in convert.py to comply with test files
- changing route constraint in data file : the constraint had a too ambiguous
naming in the service file
- test on None was incorrect in convert_sheet
Signed-off-by: EstherLerouzic <esther.lerouzic@orange.com>
correct loose or strict constraint in the new function correct_route_list
correct test to find the name with existing uids
remove the \u2192 char that was not well supported with excel reading
Signed-off-by: EstherLerouzic <esther.lerouzic@orange.com>
- normal way is usually to apply the design optical power for all channels.
This change uses the default power (same power as used for design) but enables to
force an arbitrary power if needed. TODO : introduce spectral power density
to apply power depending on baudrate.
- definition of min max frequency and spacing define the nb of channels:
uses min max frequencies and spacing to determine nb-channels. It is possible
to force a different spacing for the request. TODO: check that the value is
consistant with baudrate and min max values.
Signed-off-by: EstherLerouzic <esther.lerouzic@orange.com>
- Implementing a conflict table for path disjoint choices
- adding disjunction in the parser and json (read and write)
Signed-off-by: EstherLerouzic <esther.lerouzic@orange.com>