Incorrect @info format
- Dominant language
- C++
- Stars
- 14.1k
- Forks
- 2.5k
- Avg merge
- 8h 39m
- Merged PRs (30d)
- 72
Description
https://github.com/google/or-tools/blob/93dafb79a0261b5211f4eb17437aeebd7f45e543/ortools/julia/ORTools.jl/src/moi_wrapper/MOI_wrapper.jl#L1996-L1997
When solving, I ran into an issue pointing at the above lines. The issue is:
```
┌ Error: Exception while generating log record in module ORTools at /home//.julia/packages/ORTools/TNxxp/src/moi_wrapper/MOI_wrapper.jl:1996
│ exception =
│ MethodError: no method matching adjoint(::String)
│ The function `adjoint` exists, but no method is defined for this combination of argument types.
```
I understand I may have an issue with configuration (not specifying limit), but the error should be handled gracefully. A minimal repro:
```julia
import MathOptInterface as MOI
using ORTools
model = ORTools.Optimizer(solver_type=ORTools.SolverType.SOLVER_TYPE_CP_SAT)
x = MOI.add_variable(model)
MOI.add_constraint(model, x, MOI.Integer())
# Contradictory constraints:
MOI.add_constraint(model,
MOI.ScalarAffineFunction([MOI.ScalarAffineTerm(1.0, x)], 0.0),
MOI.LessThan(0.0))
MOI.add_constraint(model,
MOI.ScalarAffineFunction([MOI.ScalarAffineTerm(1.0, x)], 0.0),
MOI.GreaterThan(2.0))
MOI.optimize!(model)
status = MOI.get(model, MOI.TerminationStatus())
if status == MOI.OPTIMAL || status == MOI.FEASIBLE_POINT
println("SAT: ", Int(round(MOI.get(model, MOI.VariablePrimal(), x))))
else
println("UNSAT")
end
```
Contributor guide
Assessment
This issue has not been assessed yet.