Skip to content

Commit

Permalink
Fix attribute access
Browse files Browse the repository at this point in the history
  • Loading branch information
pedromxavier committed Nov 24, 2023
1 parent e089bbc commit e4e75a3
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion test/integration/interface.jl
Original file line number Diff line number Diff line change
Expand Up @@ -299,8 +299,16 @@ function test_interface_moi()
let virtual_model = model.model.optimizer
# MOI Attributes
@test MOI.get(model, MOI.ResultCount()) > 0
@test MOI.get(model, MOI.SolveTime()) > 0.0
@test MOI.get(model, MOI.SolveTimeSec()) > 0.0
@test MOI.get(model, MOI.TerminationStatus()) isa MOI.TerminationStatusCode
@test MOI.get(model, MOI.RawStatusString()) isa String

# MOI Variable Attributes
@test MOI.get(model, MOI.PrimalStatus()) isa MOI.ResultStatusCode
@test MOI.get(model, MOI.DualStatus()) isa MOI.ResultStatusCode
@test 0.0 <= MOI.get(model, MOI.VariablePrimal(), x[1]) <= 1.0
@test 0.0 <= MOI.get(model, MOI.VariablePrimal(), x[2]) <= 1.0
@test 0.0 <= MOI.get(model, MOI.VariablePrimal(), x[3]) <= 1.0

# ToQUBO Attribtues
@test MOI.get(model, Attributes.Optimization()) == 3
Expand Down

0 comments on commit e4e75a3

Please sign in to comment.