Skip to content

Commit

Permalink
Adapt to FrankWolfe 0.4.0 (#197)
Browse files Browse the repository at this point in the history
* Use new FrankWolfe step type convention.

* Allow FW version 0.4.

* Update Project.toml

Co-authored-by: Mathieu Besançon <[email protected]>

---------

Co-authored-by: Deborah Hendrych <[email protected]>
Co-authored-by: Mathieu Besançon <[email protected]>
  • Loading branch information
3 people authored Sep 10, 2024
1 parent 4adbee4 commit ad30f4e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions Project.toml
Original file line number Diff line number Diff line change
@@ -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"
Expand All @@ -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"
Expand Down
4 changes: 2 additions & 2 deletions src/callbacks.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down

4 comments on commit ad30f4e

@dhendryc
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JuliaRegistrator register()

@JuliaRegistrator
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Registration pull request created: JuliaRegistries/General/114936

Tip: Release Notes

Did you know you can add release notes too? Just add markdown formatted text underneath the comment after the text
"Release notes:" and it will be added to the registry PR, and if TagBot is installed it will also be added to the
release that TagBot creates. i.e.

@JuliaRegistrator register

Release notes:

## Breaking changes

- blah

To add them here just re-invoke and the PR will be updated.

Tagging

After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.

This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via:

git tag -a v0.1.27 -m "<description of version>" ad30f4edc32f5666dcf5a53e3f1a2ab6352e8b3b
git push origin v0.1.27

Also, note the warning: Version 0.1.27 skips over 0.1.26
This can be safely ignored. However, if you want to fix this you can do so. Call register() again after making the fix. This will update the Pull request.

@dhendryc
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JuliaRegistrator register()

@JuliaRegistrator
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Registration pull request updated: JuliaRegistries/General/114936

Tip: Release Notes

Did you know you can add release notes too? Just add markdown formatted text underneath the comment after the text
"Release notes:" and it will be added to the registry PR, and if TagBot is installed it will also be added to the
release that TagBot creates. i.e.

@JuliaRegistrator register

Release notes:

## Breaking changes

- blah

To add them here just re-invoke and the PR will be updated.

Tagging

After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.

This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via:

git tag -a v0.1.27 -m "<description of version>" ad30f4edc32f5666dcf5a53e3f1a2ab6352e8b3b
git push origin v0.1.27

Please sign in to comment.