Skip to content

Commit 75eaa7e

Browse files
authored
Prep for v1.51.1 (#3005)
1 parent 27cc1c6 commit 75eaa7e

4 files changed

Lines changed: 56 additions & 3 deletions

File tree

Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name = "MathOptInterface"
22
uuid = "b8f27783-ece8-5eb3-8dc8-9495eed66fee"
3-
version = "1.51.0"
3+
version = "1.51.1"
44

55
[deps]
66
CodecBzip2 = "523fee87-0ab8-5b00-afb7-3ecf72e48cfd"

docs/src/changelog.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,18 @@ CurrentModule = MathOptInterface
77
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
88
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
99

10+
## v1.51.1 (May 29, 2026)
11+
12+
### Fixed
13+
14+
- Fixed basic tests with [`PowerCone`](@ref) (#3003)
15+
- Fixed various getters for [`VariableBridgingCost`](@ref) and
16+
[`ConstraintBridgingCost`](@ref). This release adds new tests, which may cause
17+
the tests of some dependent packages to break because of a common bug in how
18+
layers should compute the costs of bridging variable and constraints. If you
19+
need help fixing a package with broken tests, please open a GitHub issue.
20+
(#3001), (#3004)
21+
1022
## v1.51.0 (April 27, 2026)
1123

1224
### Breaking

docs/src/reference/models.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,8 @@ ListOfConstraintAttributesSet
5858
ListOfConstraintsWithAttributeSet
5959
UserDefinedFunction
6060
ListOfSupportedNonlinearOperators
61+
ConstraintBridgingCost
62+
VariableBridgingCost
6163
```
6264

6365
## Optimizer interface

src/attributes.jl

Lines changed: 41 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3271,7 +3271,27 @@ end
32713271

32723272
attribute_value_type(::DualStatus) = ResultStatusCode
32733273

3274-
# Cost of bridging constrained variable in S
3274+
"""
3275+
VariableBridgingCost{S<:AbstractSet}()::Float64
3276+
3277+
An [`AbstractModelAttribute`](@ref) for the cost or bridging a variable in a set
3278+
of type `S`.
3279+
3280+
## Implementation
3281+
3282+
There is a default fallback which returns `0.0` if
3283+
[`supports_add_constrained_variable`](@ref) or
3284+
[`supports_add_constrained_variables`](@ref) is `true` and `Inf` if `false`.
3285+
3286+
Therefore, you should implement this method only if your optimizer does
3287+
something unusual.
3288+
3289+
Optimizers should implement the following methods:
3290+
```
3291+
MOI.get(::Optimizer, ::MOI.VariableBridgingCost{S})::Float64
3292+
```
3293+
They should not implement [`set`](@ref) or [`supports`](@ref).
3294+
"""
32753295
struct VariableBridgingCost{S<:AbstractSet} <: AbstractModelAttribute end
32763296

32773297
attribute_value_type(::VariableBridgingCost) = Float64
@@ -3290,7 +3310,26 @@ function get_fallback(
32903310
return supports_add_constrained_variables(model, S) ? 0.0 : Inf
32913311
end
32923312

3293-
# Cost of bridging F-in-S constraints
3313+
"""
3314+
ConstraintBridgingCost{F<:AbstractFunction,S<:AbstractSet}()::Float64
3315+
3316+
An [`AbstractModelAttribute`](@ref) for the cost or bridging a constraint of
3317+
type `F` in `S`.
3318+
3319+
## Implementation
3320+
3321+
There is a default fallback which returns `0.0` if [`supports_constraint`](@ref)
3322+
is `true` and `Inf` if `false`.
3323+
3324+
Therefore, you should implement this method only if your optimizer does
3325+
something unusual.
3326+
3327+
Optimizers should implement the following methods:
3328+
```
3329+
MOI.get(::Optimizer, ::MOI.ConstraintBridgingCost{F,S})::Float64
3330+
```
3331+
They should not implement [`set`](@ref) or [`supports`](@ref).
3332+
"""
32943333
struct ConstraintBridgingCost{F<:AbstractFunction,S<:AbstractSet} <:
32953334
AbstractModelAttribute end
32963335

0 commit comments

Comments
 (0)