Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Do not create child node if the start point is not domain feasible. #199

Merged
merged 9 commits into from
Sep 17, 2024
Merged
2 changes: 1 addition & 1 deletion 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.27"
version = "0.1.28"

[deps]
Bonobo = "f7b14807-3d4d-461a-888a-05dd4bca8bc3"
Expand Down
9 changes: 6 additions & 3 deletions src/node.jl
Original file line number Diff line number Diff line change
Expand Up @@ -161,15 +161,18 @@ function Bonobo.get_branching_nodes_info(tree::Bonobo.BnBTree, node::FrankWolfeN
x_right = FrankWolfe.compute_active_set_iterate!(active_set_right)
domain_oracle = tree.root.options[:domain_oracle]

nodes = if !prune_left && !prune_right
domain_right = domain_oracle(x_right)
domain_left = domain_oracle(x_left)

nodes = if !prune_left && !prune_right && domain_right && domain_left
[node_info_left, node_info_right]
elseif prune_left
[node_info_right]
elseif prune_right
[node_info_left]
elseif domain_oracle(x_right)
elseif domain_right #domain_oracle(x_right)
matbesancon marked this conversation as resolved.
Show resolved Hide resolved
[node_info_right]
elseif domain_oracle(x_left)
elseif domain_left #domain_oracle(x_left)
matbesancon marked this conversation as resolved.
Show resolved Hide resolved
[node_info_left]
else
warn("No childern nodes can be created.")
Expand Down
Loading