Skip to content
Snippets Groups Projects
Unverified Commit f600c879 authored by Michiel Cottaar's avatar Michiel Cottaar
Browse files

Ignore any constant additions to the cost function

parent 72ba3bba
No related branches found
No related tags found
1 merge request!4Resolve "Add secondary objective function"
......@@ -465,10 +465,13 @@ which will generally only be optimised after any user-defined cost functions (wh
Any sequence will also have a `level=3` cost function, which minimises the total sequence duration.
"""
function add_cost_function!(func, level=2)
function add_cost_function!(func::AbstractJuMPScalar, level=2)
push!(GLOBAL_MODEL[][2], (Float64(level), func))
end
add_cost_function!(func::Number, level=2) = nothing
"""
set_simple_constraints!(block, kwargs)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment