diff --git a/ext/QUBOTools_MOI/qubo_model.jl b/ext/QUBOTools_MOI/qubo_model.jl index c4f86a9..d8d6600 100644 --- a/ext/QUBOTools_MOI/qubo_model.jl +++ b/ext/QUBOTools_MOI/qubo_model.jl @@ -75,6 +75,9 @@ function MOI.set( ::MOI.ObjectiveSense, objective_sense::MOI.OptimizationSense, ) + @assert objective_sense === MOI.MIN_SENSE || + objective_sense === MOI.MAX_SENSE + model.objective_sense = objective_sense return nothing