Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
controller
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
TFS
controller
Commits
37a465bf
Commit
37a465bf
authored
5 months ago
by
Lluis Gifre Renom
Browse files
Options
Downloads
Patches
Plain Diff
Debug OFC24 and Optical Controller
parent
41b2089a
No related branches found
Branches containing commit
No related tags found
Tags containing commit
2 merge requests
!294
Release TeraFlowSDN 4.0
,
!285
Resolve: "(CNIT) New SBI Driver based on OpenROADM for ROADMs"
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/opticalcontroller/RSA.py
+4
-4
4 additions, 4 deletions
src/opticalcontroller/RSA.py
src/opticalcontroller/dijkstra.py
+0
-0
0 additions, 0 deletions
src/opticalcontroller/dijkstra.py
with
4 additions
and
4 deletions
src/opticalcontroller/RSA.py
+
4
−
4
View file @
37a465bf
...
...
@@ -12,7 +12,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
import
opticalcontroller.dij
s
ktra
from
opticalcontroller.dijk
s
tra
import
Graph
,
shortest_path
from
opticalcontroller.tools
import
*
from
opticalcontroller.variables
import
*
...
...
@@ -83,7 +83,7 @@ class RSA():
return
"
{},{},{}
"
.
format
(
self
.
c_slot_number
,
self
.
l_slot_number
,
self
.
s_slot_number
)
def
initGraph
(
self
):
self
.
g
=
dijsktra
.
Graph
()
self
.
g
=
Graph
()
for
n
in
self
.
nodes_dict
:
self
.
g
.
add_vertex
(
n
)
for
l
in
self
.
links_dict
[
"
optical_links
"
]:
...
...
@@ -100,7 +100,7 @@ class RSA():
def
initGraph2
(
self
):
self
.
g
=
dijsktra
.
Graph
()
self
.
g
=
Graph
()
for
n
in
self
.
nodes_dict
:
self
.
g
.
add_vertex
(
n
)
...
...
@@ -117,7 +117,7 @@ class RSA():
self
.
g
.
printGraph
()
def
compute_path
(
self
,
src
,
dst
):
path
=
dijsktra
.
shortest_path
(
self
.
g
,
self
.
g
.
get_vertex
(
src
),
self
.
g
.
get_vertex
(
dst
))
path
=
shortest_path
(
self
.
g
,
self
.
g
.
get_vertex
(
src
),
self
.
g
.
get_vertex
(
dst
))
print
(
"
INFO: Path from {} to {} with distance: {}
"
.
format
(
src
,
dst
,
self
.
g
.
get_vertex
(
dst
).
get_distance
()))
if
debug
:
print
(
path
)
...
...
This diff is collapsed.
Click to expand it.
src/opticalcontroller/dij
s
ktra.py
→
src/opticalcontroller/dijk
s
tra.py
+
0
−
0
View file @
37a465bf
File moved
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment