@@ -576,28 +576,28 @@ The skeleton below can be used for the wrapper test file of a solver name `FooBa
576
576
using MathOptInterface
577
577
const MOI = MathOptInterface
578
578
const MOIT = MOI. Test
579
- const MOIU = MOI. Utilities
580
579
const MOIB = MOI. Bridges
581
580
582
- # Include here the functions/sets supported by the solver wrapper (not those that are supported through bridges)
583
- MOIU. @model FooBarModelData () (EqualTo, GreaterThan, LessThan) (Zeros, Nonnegatives, Nonpositives) () (SingleVariable,) (ScalarAffineFunction,) (VectorOfVariables,) (VectorAffineFunction,)
584
-
585
- MOIB. @bridge SplitInterval MOIB. SplitIntervalBridge () (Interval,) () () () (ScalarAffineFunction,) () ()
586
- MOIB. @bridge GeoMean MOIB. GeoMeanBridge () () (GeometricMeanCone,) () () () (VectorOfVariables,) (VectorAffineFunction,)
587
- MOIB. @bridge RootDet MOIB. RootDetBridge () () (RootDetConeTriangle,) () () () (VectorOfVariables,) (VectorAffineFunction,)
588
-
589
581
const optimizer = FooBarOptimizer ()
590
582
const config = MOIT. TestConfig (atol= 1e-6 , rtol= 1e-6 )
591
583
592
584
@testset " MOI Continuous Linear" begin
593
- MOIT. contlineartest (SplitInterval {Float64} (MOIU . CachingOptimizer ( FooBarModelData {Float64} (), optimizer) ), config)
585
+ MOIT. contlineartest (MOIB . SplitInterval {Float64} (optimizer), config)
594
586
end
595
587
596
588
@testset " MOI Continuous Conic" begin
597
- MOIT. contlineartest (RootDet {Float64} (GeoMean {Float64} (MOIU . CachingOptimizer ( FooBarModelData {Float64} (), optimizer) )), config)
589
+ MOIT. contlineartest (MOIB . RootDet {Float64} (MOIB . GeoMean {Float64} (optimizer)), config)
598
590
end
599
591
600
592
@testset " MOI Integer Conic" begin
601
- MOIT. intconictest (MOIU . CachingOptimizer ( FooBarModelData {Float64} (), optimizer) , config)
593
+ MOIT. intconictest (optimizer, config)
602
594
end
603
595
```
596
+
597
+ If the wrapper does not support building the model incrementally (i.e. with ` addvariable! ` and ` addconstraint! ` ), the line ` const optimizer = FooBarOptimizer() ` can be replaced with
598
+ ``` julia
599
+ const MOIU = MOI. Utilities
600
+ # Include here the functions/sets supported by the solver wrapper (not those that are supported through bridges)
601
+ MOIU. @model FooBarModelData () (EqualTo, GreaterThan, LessThan) (Zeros, Nonnegatives, Nonpositives) () (SingleVariable,) (ScalarAffineFunction,) (VectorOfVariables,) (VectorAffineFunction,)
602
+ const optimizer = MOIU. CachingOptimizer (FooBarModelData {Float64} (), FooBarOptimizer ())
603
+ ```
0 commit comments