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
8e773891
Verified
Commit
8e773891
authored
1 year ago
by
Michiel Cottaar
Browse files
Options
Downloads
Patches
Plain Diff
Fix initial values again
parent
0883ba40
No related branches found
No related tags found
No related merge requests found
Pipeline
#23098
failed
1 year ago
Stage: test
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/variables.jl
+1
-1
1 addition, 1 deletion
src/variables.jl
with
1 addition
and
1 deletion
src/variables.jl
+
1
−
1
View file @
8e773891
...
...
@@ -135,7 +135,7 @@ The result is guaranteed to be a [`VariableType`](@ref).
"""
get_free_variable
(
value
::
Number
;
integer
=
false
,
kwargs
...
)
=
integer
?
Int
(
value
)
:
Float64
(
value
)
get_free_variable
(
value
::
VariableType
;
kwargs
...
)
=
value
get_free_variable
(
::
Nothing
;
integer
=
false
,
start
=
nothing
)
=
@variable
(
global_model
(),
start
=
isnothing
(
start
)
?
rand
()
:
start
,
integer
=
integer
)
get_free_variable
(
::
Nothing
;
integer
=
false
,
start
=
0.01
)
=
@variable
(
global_model
(),
start
=
start
,
integer
=
integer
)
get_free_variable
(
value
::
Symbol
;
kwargs
...
)
=
integer
?
error
(
"Cannot maximise or minimise an integer variable"
)
:
get_free_variable
(
Val
(
value
);
kwargs
...
)
function
get_free_variable
(
::
Val
{
:
min
};
kwargs
...
)
var
=
get_free_variable
(
nothing
;
kwargs
...
)
...
...
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