Skip to content

Commit

Permalink
up
Browse files Browse the repository at this point in the history
  • Loading branch information
BatyLeo committed Dec 20, 2024
1 parent 23c41b3 commit d1c4cd4
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ function Utils.generate_dataset(
if compute_solutions
solutions = [algorithm(instance; kwargs...) for instance in instances]
return [
DataSample(; x=feature, instance, y=solution) for
DataSample(; x=feature, instance, y_true=solution) for
(instance, feature, solution) in zip(instances, features, solutions)
]
end
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ function column_generation(
end

"""
compute_solution_from_selected_columns(instance::Instance, paths[; bin=true])
$TYPEDSIGNATURES
Note: If you have Gurobi, use `grb_model` as `model_builder` instead od `glpk_model`.
"""
Expand Down Expand Up @@ -141,7 +141,9 @@ function compute_solution_from_selected_columns(
optimize!(model)

sol = value.(y)
return objective_value(model), sol, paths[isapprox.([sol[p] for p in paths], 1.0)]
return Float64(objective_value(model)),
sol,
paths[isapprox.([sol[p] for p in paths], 1.0)]
end

"""
Expand Down

0 comments on commit d1c4cd4

Please sign in to comment.