diff --git a/src/instance.jl b/src/instance.jl index 718cccf..3b76b37 100644 --- a/src/instance.jl +++ b/src/instance.jl @@ -5,9 +5,17 @@ using JSON2 import Base: dump -get_instance_features(instance) = [0.] -get_variable_features(instance, var, index) = [0.] +to_model(instance) = + error("not implemented: to_model") + +get_instance_features(instance) = + error("not implemented: get_instance_features") + +get_variable_features(instance, var, index) = + error("not implemented: get_variable_features") + find_violated_lazy_constraints(instance, model) = [] + build_lazy_constraint(instance, model, v) = nothing dump(instance::PyCall.PyObject, filename) = @pycall instance.dump(filename) diff --git a/test/knapsack.jl b/test/knapsack.jl index 95f4c02..2b45b92 100644 --- a/test/knapsack.jl +++ b/test/knapsack.jl @@ -2,7 +2,8 @@ # Copyright (C) 2020, UChicago Argonne, LLC. All rights reserved. # Released under the modified BSD license. See COPYING.md for more details. -import MIPLearn: get_instance_features, +import MIPLearn: to_model, + get_instance_features, get_variable_features find_violated_lazy_constraints using JuMP @@ -26,7 +27,6 @@ function get_instance_features(data::KnapsackData) return [0.] end - function get_variable_features(data::KnapsackData, var, index) return [0.] end