Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
D
Detection eddies
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
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
IPSL
LMD
DPAO
Detection eddies
Commits
c193e231
Commit
c193e231
authored
2 years ago
by
Lionel GUEZ
Browse files
Options
Downloads
Patches
Plain Diff
Polish
parent
b3f809f4
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
Overlap/report_graph.py
+0
-1
0 additions, 1 deletion
Overlap/report_graph.py
cost_function.py
+6
-10
6 additions, 10 deletions
cost_function.py
segments.py
+2
-0
2 additions, 0 deletions
segments.py
with
8 additions
and
11 deletions
Overlap/report_graph.py
+
0
−
1
View file @
c193e231
...
...
@@ -5,7 +5,6 @@
"""
import
networkx
as
nx
import
csv
import
shapefile
from
os
import
path
from
networkx
import
nx_agraph
...
...
This diff is collapsed.
Click to expand it.
cost_function.py
+
6
−
10
View file @
c193e231
...
...
@@ -4,10 +4,9 @@
# non-local cost function calculation where each edge will have a cost
# function assigned to it.
# Inputs (to be changed within the script):
# Orientation
# node_id_param_file location and name
# gt graph name and location
# shapefiles names and location
# node_id_param_file
# gt graph
# shapefiles
# Output: a gt graph with cost functions and an xml graph with cost functions
import
graph_tool
...
...
@@ -71,10 +70,10 @@ def get_SHPC(array_d_ini, date_index):
assert
i_SHPC
>=
1
return
i_SHPC
-
1
###############################
# grab e_overestim
###############################
if
len
(
sys
.
argv
)
==
1
:
sys
.
exit
(
"
Required arguments: SHPC-directory [SHPC-directory] ...
"
)
# Grab e_overestim:
with
open
(
"
node_id_param.json
"
)
as
f
:
node_id_param
=
json
.
load
(
f
)
# assign attributes to the whole graphs
e_overestim
=
node_id_param
[
"
e_overestim
"
]
...
...
@@ -119,9 +118,6 @@ g.ep['nl_cost_function'] = g.new_ep('float')
# Set up the list of SHPC:
if
len
(
sys
.
argv
)
==
1
:
sys
.
exit
(
"
Required arguments: SHPC-directory [SHPC-directory] ...
"
)
handlers
=
[
util_eddies
.
open_shpc
(
shp_dir
)
for
shp_dir
in
sys
.
argv
[
1
:]]
array_d_init
=
[
handler
[
"
d_init
"
]
for
handler
in
handlers
]
...
...
This diff is collapsed.
Click to expand it.
segments.py
+
2
−
0
View file @
c193e231
...
...
@@ -32,6 +32,8 @@ g = graph_tool.load_graph_from_csv(sys.argv[1],
print
(
"
Input graph:
"
)
print
(
"
Number of vertices:
"
,
g
.
num_vertices
())
print
(
"
Number of edges:
"
,
g
.
num_edges
())
print
(
"
Internal properties:
"
)
g
.
list_properties
()
t1
=
time
.
perf_counter
()
print
(
f
'
Loading done in
{
t1
-
t0
:
.
0
f
}
s
'
)
t0
=
t1
...
...
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