Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
MRIBuilder.jl
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
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
Michiel Cottaar
MRIBuilder.jl
Commits
e4f501dd
Verified
Commit
e4f501dd
authored
11 months ago
by
Michiel Cottaar
Browse files
Options
Downloads
Patches
Plain Diff
Allow scanner to be unset
parent
8a9bd7ff
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Pipeline
#23462
passed
11 months ago
Stage: test
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/build_sequences.jl
+4
-2
4 additions, 2 deletions
src/build_sequences.jl
with
4 additions
and
2 deletions
src/build_sequences.jl
+
4
−
2
View file @
e4f501dd
...
...
@@ -2,7 +2,7 @@ module BuildSequences
import
JuMP
:
Model
,
optimizer_with_attributes
,
optimize!
,
AbstractJuMPScalar
,
value
,
solution_summary
,
termination_status
,
LOCALLY_SOLVED
,
OPTIMAL
,
num_variables
,
all_variables
,
set_start_value
,
ALMOST_LOCALLY_SOLVED
import
Ipopt
import
Juniper
import
..
Scanners
:
Scanner
,
gradient_strength
import
..
Scanners
:
Scanner
,
gradient_strength
,
Default_Scanner
const
GLOBAL_MODEL
=
Ref
(
Model
())
const
IGNORE_MODEL
=
GLOBAL_MODEL
[]
...
...
@@ -93,10 +93,12 @@ function build_sequence(f::Function, scanner::Union{Nothing, Scanner}, optimiser
build_sequence
(
f
,
scanner
,
model
,
optimise
,
n_attempts
)
end
function
build_sequence
(
f
::
Function
,
scanner
::
Union
{
Nothing
,
Scanner
};
print_level
=
2
,
kwargs
...
)
function
build_sequence
(
f
::
Function
,
scanner
::
Union
{
Nothing
,
Scanner
}
=
Default_Scanner
;
print_level
=
2
,
kwargs
...
)
build_sequence
(
f
,
scanner
,
Ipopt
.
Optimizer
;
print_level
=
print_level
,
kwargs
...
)
end
build_sequence
(
f
::
Function
,
optimiser_constructor
;
kwargs
...
)
=
build_sequence
(
f
,
Default_Scanner
,
optimiser_constructor
;
kwargs
...
)
function
global_model
()
if
GLOBAL_MODEL
[]
==
IGNORE_MODEL
...
...
This diff is collapsed.
Click to expand it.
Michiel Cottaar
@ndcn0236
mentioned in commit
709d73a7
·
11 months ago
mentioned in commit
709d73a7
mentioned in commit 709d73a75c796242a00e325eb95d58dd1e25c963
Toggle commit list
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