From ad30f4edc32f5666dcf5a53e3f1a2ab6352e8b3b Mon Sep 17 00:00:00 2001 From: dhendryc <92737336+dhendryc@users.noreply.github.com> Date: Tue, 10 Sep 2024 13:56:54 +0200 Subject: [PATCH] Adapt to FrankWolfe 0.4.0 (#197) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Use new FrankWolfe step type convention. * Allow FW version 0.4. * Update Project.toml Co-authored-by: Mathieu Besançon --------- Co-authored-by: Deborah Hendrych Co-authored-by: Mathieu Besançon --- Project.toml | 4 ++-- src/callbacks.jl | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Project.toml b/Project.toml index 436ad8370..710426c03 100644 --- a/Project.toml +++ b/Project.toml @@ -1,7 +1,7 @@ name = "Boscia" uuid = "36b166db-dac5-4d05-b36a-e6c4cef071c9" authors = ["ZIB IOL"] -version = "0.1.26" +version = "0.1.27" [deps] Bonobo = "f7b14807-3d4d-461a-888a-05dd4bca8bc3" @@ -28,7 +28,7 @@ Bonobo = "0.1.3" DataStructures = "0.18" Dates = "1.6" Distributions = "0.25" -FrankWolfe = "0.2.24, 0.3" +FrankWolfe = "0.4" HiGHS = "1" LinearAlgebra = "1.6" MathOptInterface = "1" diff --git a/src/callbacks.jl b/src/callbacks.jl index a61c0a9d7..a1968d028 100644 --- a/src/callbacks.jl +++ b/src/callbacks.jl @@ -21,7 +21,7 @@ function build_FW_callback( check_infeasible_vertex(tree.root.problem.tlmo.blmo, tree) @assert is_linear_feasible(tree.root.problem.tlmo, state.v) end - if state.tt != FrankWolfe.simplex_descent && !is_integer_feasible(tree, state.v) + if state.step_type != FrankWolfe.ST_SIMPLEXDESCENT && !is_integer_feasible(tree, state.v) @info "Vertex not integer feasible! Here are the integer variables: $(state.v[tree.root.problem.integer_variables])" @assert is_integer_feasible(tree, state.v) end @@ -51,7 +51,7 @@ function build_FW_callback( return false end - if tree.root.options[:domain_oracle](state.v) && state.tt != FrankWolfe.simplex_descent + if tree.root.options[:domain_oracle](state.v) && state.step_type != FrankWolfe.ST_SIMPLEXDESCENT val = tree.root.problem.f(state.v) if val < tree.incumbent #TODO: update solution without adding node