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

POI does not support to compute the conflict #148

Closed
guilhermebodin opened this issue Apr 10, 2024 · 1 comment · Fixed by #152
Closed

POI does not support to compute the conflict #148

guilhermebodin opened this issue Apr 10, 2024 · 1 comment · Fixed by #152

Comments

@guilhermebodin
Copy link
Collaborator

ERROR: LoadError: ArgumentError: The optimizer ParametricOptInterface.Optimizer{Float64, Xpress.Optimizer} does not support `compute_conflict!`
Stacktrace:
 [1] compute_conflict!(optimizer::ParametricOptInterface.Optimizer{Float64, Xpress.Optimizer})
   @ MathOptInterface C:\Users\guilhermebodin\.julia\packages\MathOptInterface\mz9FK\src\MathOptInterface.jl:108
 [2] compute_conflict!(model::Model)
   @ JuMP C:\Users\guilhermebodin\.julia\packages\JuMP\glJ0u\src\optimizer_interface.jl:502

Probably a simple new dispatch would do the trick

@odow
Copy link
Member

odow commented Jun 25, 2024

I got waylaid by #151, but then this should be sufficient:

diff --git a/src/MOI_wrapper.jl b/src/MOI_wrapper.jl
index 4915b22..34b1850 100644
--- a/src/MOI_wrapper.jl
+++ b/src/MOI_wrapper.jl
@@ -1363,3 +1363,19 @@ function MOI.optimize!(model::Optimizer)
     end
     return
 end
+
+#
+# compute_conflict!
+#
+
+function MOI.compute_conflict!(model::Optimizer)
+    return MOI.compute_conflict!(model.optimizer)
+end
+
+function MOI.get(
+    model::Optimizer,
+    attr::MOI.ConstraintConflictStatus,
+    ci::MOI.ConstraintIndex{MOI.VariableIndex,<:MOI.Parameter},
+)
+    return MOI.MAYBE_IN_CONFLICT
+end

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging a pull request may close this issue.

2 participants