Skip to content
Snippets Groups Projects
Verified Commit 9c7c6e20 authored by Michiel Cottaar's avatar Michiel Cottaar
Browse files

update message

parent 8e773891
No related branches found
No related tags found
No related merge requests found
...@@ -58,11 +58,11 @@ function build_sequence(f::Function, scanner::Union{Nothing, Scanner}, model::Mo ...@@ -58,11 +58,11 @@ function build_sequence(f::Function, scanner::Union{Nothing, Scanner}, model::Mo
for attempt in 1:100 for attempt in 1:100
optimize!(model) optimize!(model)
if termination_status(model) in (LOCALLY_SOLVED, OPTIMAL) if termination_status(model) in (LOCALLY_SOLVED, OPTIMAL)
println("Success after $(attempt-1) restarts.") println("Optimisation succeeded after $(attempt-1) restarts.")
break break
else else
old_values = value.(all_variables(model)) old_values = value.(all_variables(model))
size_kick = 0.2 / attempt size_kick = 0.5 / attempt
new_values = old_values .* (2 .* size_kick .* rand(length(old_values)) .+ 1. .- size_kick) new_values = old_values .* (2 .* size_kick .* rand(length(old_values)) .+ 1. .- size_kick)
for (var, v) in zip(all_variables(model), new_values) for (var, v) in zip(all_variables(model), new_values)
set_start_value(var, v) set_start_value(var, v)
......
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