[x] Define a new const that is a SingleBridgeOptimizer wrapping the
new bridge. The name of the const must be the name of the bridge, less
the Bridge suffix
[x] include the file in src/Bridges/XXX/bridges/XXX.jl
[x] If the bridge should be enabled by default, add the bridge to
add_all_bridges at the bottom of src/Bridges/XXX/XXX.jl
Tests
[x] Create a new file in the appropriate subdirectory of tests/Bridges/XXX
[x] Use MOI.Bridges.runtests to test various inputs and outputs of the
bridge
[x] If, after opening the pull request to add the bridge, some lines are not
covered by the tests, add additional bridge-specific tests to cover the
untested lines.
Documentation
[x] Add a docstring which uses the same template as existing bridges.
Final touch
If the bridge depends on run-time values of other variables and constraints in
the model:
Basic
src/Bridges/XXX/bridges
Bridge
MOI.Bridges.Constraint.SetMapBridge
const
that is aSingleBridgeOptimizer
wrapping the new bridge. The name of the const must be the name of the bridge, less theBridge
suffixinclude
the file insrc/Bridges/XXX/bridges/XXX.jl
add_all_bridges
at the bottom ofsrc/Bridges/XXX/XXX.jl
Tests
tests/Bridges/XXX
MOI.Bridges.runtests
to test various inputs and outputs of the bridgeDocumentation
Final touch
If the bridge depends on run-time values of other variables and constraints in the model:
MOI.Utilities.needs_final_touch(::Bridge)
MOI.Utilities.final_touch(::Bridge, ::MOI.ModelLike)
final_touch
can be called multiple times in a rowx-ref #2450
Results in: