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
2fb53156
Commit
2fb53156
authored
9 months ago
by
Lionel GUEZ
Browse files
Options
Downloads
Patches
Plain Diff
Define intermediary variable `i_max`
parent
77ec1d5f
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
Trajectories/cost_function.py
+4
-3
4 additions, 3 deletions
Trajectories/cost_function.py
with
4 additions
and
3 deletions
Trajectories/cost_function.py
+
4
−
3
View file @
2fb53156
...
@@ -150,9 +150,10 @@ def search_end(inst_eddies, max_delta, avg_fix, e_overestim):
...
@@ -150,9 +150,10 @@ def search_end(inst_eddies, max_delta, avg_fix, e_overestim):
computation is not implemented that way.
computation is not implemented that way.
"""
"""
ip
=
max
(
len
(
inst_eddies
)
-
max_delta
-
1
,
0
)
i_max
=
len
(
inst_eddies
)
-
1
ip
=
max
(
i_max
-
max_delta
,
0
)
if
not
avg_fix
and
ip
<
=
len
(
inst_eddies
)
-
2
:
if
not
avg_fix
and
ip
<
i_max
:
d_min
=
(
d_min
=
(
util_eddies
.
node_to_date_eddy
(
util_eddies
.
node_to_date_eddy
(
inst_eddies
[
-
1
],
e_overestim
,
only_date
=
True
inst_eddies
[
-
1
],
e_overestim
,
only_date
=
True
...
@@ -162,7 +163,7 @@ def search_end(inst_eddies, max_delta, avg_fix, e_overestim):
...
@@ -162,7 +163,7 @@ def search_end(inst_eddies, max_delta, avg_fix, e_overestim):
# {date(elem) < d_min for elem in inst_eddies[:ip]}
# {date(elem) < d_min for elem in inst_eddies[:ip]}
while
(
while
(
ip
<
=
len
(
inst_eddies
)
-
2
ip
<
i_max
and
util_eddies
.
node_to_date_eddy
(
and
util_eddies
.
node_to_date_eddy
(
inst_eddies
[
ip
],
e_overestim
,
only_date
=
True
inst_eddies
[
ip
],
e_overestim
,
only_date
=
True
)
)
...
...
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