From 308f56fb7b93834014494957fc66ddfe117052a0 Mon Sep 17 00:00:00 2001 From: odow Date: Mon, 4 Sep 2023 14:44:17 +1200 Subject: [PATCH 1/9] [docs] prep changelog for v1.15.0 --- docs/src/changelog.md | 45 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) diff --git a/docs/src/changelog.md b/docs/src/changelog.md index 73e3a349c8c..249dd1d0301 100644 --- a/docs/src/changelog.md +++ b/docs/src/changelog.md @@ -7,6 +7,51 @@ CurrentModule = JuMP The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## Version 1.15.0 (unreleased) + +This is a large minor release because it adds an entirely new data structure and +API path for working with nonlinear programs. The previous nonlinear interface +remains unchanged and is documented at [Nonlinear Modeling (Legacy)](@ref). The +new interface is a treated as a non-breaking feature addition and is documented +at [Nonlinear Modeling](@ref). + +### Breaking + +The syntax inside JuMP macros is parsed using a different code path, even for +linear and quadratic expressions. In all cases, the new code should return +equivalent expressions, but there are three changes to be aware of when updating: + + - The printed form of the expression may change, for example from `x * y` to + `y * x`. This can cause tests which test the `String` representation of a + model to fail. + - Because of the different order of operations, some coefficients may change + due to floating point round-off error. + - Because of the different order of operations, and particularly when working + with a JuMP extension, you may encounter a `MethodError` due to a missing or + ambiguous method. These errors are due to previously existing bugs that were + not triggered by the previous parsing code. If you encouter such an error, + please open a GitHub issue. + +### Added + + - Added [`triangle_vec`](@ref) which simplifies adding [`MOI.LogDetConeTriangle`](@ref) + and [`MOI.RootDetConeTriangle`](@ref) constraints (#3456) + - Added new nonlinear interface (#3106) (#3468) (#3472) (#3475) + +### Fixed + + - Fixed uses of `@nospecialize` which cause precompilation failures in Julia + v1.6.0 and v1.6.1. (#3464) + - Fixed adding a container of [`Parameter`](@ref) (#3473) + +### Other + + - Added GAMS to solver documentation (#3357) + - Updated various tutorials (#3459) (#3460) (#3462) (#3463) (#3465) + - Added [Two-stage stochastic programs](@ref) tutorial (#3466) + - Added better error messages for unsupported operations in `LinearAlgebra` (#3476) + - Updated to the latest version of Documenter (#3484) + ## Version 1.14.1 (September 2, 2023) ### Fixed From 2a0d4e5bf59f0cfc866fe41e4d658758906db272 Mon Sep 17 00:00:00 2001 From: odow Date: Tue, 5 Sep 2023 09:02:28 +1200 Subject: [PATCH 2/9] Update --- docs/src/changelog.md | 49 ++++++++++++++++++++++++++++++------------- 1 file changed, 35 insertions(+), 14 deletions(-) diff --git a/docs/src/changelog.md b/docs/src/changelog.md index 249dd1d0301..9bbeade1105 100644 --- a/docs/src/changelog.md +++ b/docs/src/changelog.md @@ -17,20 +17,39 @@ at [Nonlinear Modeling](@ref). ### Breaking -The syntax inside JuMP macros is parsed using a different code path, even for -linear and quadratic expressions. In all cases, the new code should return -equivalent expressions, but there are three changes to be aware of when updating: - - - The printed form of the expression may change, for example from `x * y` to - `y * x`. This can cause tests which test the `String` representation of a - model to fail. - - Because of the different order of operations, some coefficients may change - due to floating point round-off error. - - Because of the different order of operations, and particularly when working - with a JuMP extension, you may encounter a `MethodError` due to a missing or - ambiguous method. These errors are due to previously existing bugs that were - not triggered by the previous parsing code. If you encouter such an error, - please open a GitHub issue. +Although the new nonlinear interface is a feature addition, there are two +changes which might be breaking for a small number of users. + + - The syntax inside JuMP macros is parsed using a different code path, even for + linear and quadratic expressions. We made this change to unify how we parse + linear, quadratic, and nonlinear expressions. In all cases, the new code + returns equivalent expressions, but because of the different order of + operations, there are three changes to be aware of when updating: + - The printed form of the expression may change, for example from `x * y` to + `y * x`. This can cause tests which test the `String` representation of a + model to fail. + - Some coefficients may change slightly due to floating point round-off + error. + - Particularly when working with a JuMP extension, you may encounter a + `MethodError` due to a missing or ambiguous method. These errors are due + to previously existing bugs that were not triggered by the previous + parsing code. If you encounter such an error, please open a GitHub issue. + - The methods for `Base.^(x::VariableRef, n::Integer)` and + `Base.^(x::AffExpr, n::Integer)` have changed. Previously, these methods + supported only `n = 0, 1, 2` and they always returned a [`QuadExpr`](@ref), + even for the case when `n = 0` or `n = 1`. Now: + - `x^0` returns `one(T)`, where `T` is the [`value_type`](@ref) of the + model (defaults to `Float64`) + - `x^1` returns `x` + - `x^2` returns a [`QuadExpr`](@ref) + - `x^n` where `n > 2` returns a [`NonlinearExpr`](@ref). + We made this change to support nonlinear expressions and to align the + mathematical definition of the operation with their return type. (Previously, + users were surprised that `x^1` returned a [`QuadExpr`](@ref).) As a + consequence of this change, the methods are now not type-stable. This means + that the compiler cannot prove that `x^2` returns a [`QuadExpr`](@ref). If + benchmarking shows that this is a performance problem, you can use the + type-stable `x * x` instead of `x^2`. ### Added @@ -43,6 +62,8 @@ equivalent expressions, but there are three changes to be aware of when updating - Fixed uses of `@nospecialize` which cause precompilation failures in Julia v1.6.0 and v1.6.1. (#3464) - Fixed adding a container of [`Parameter`](@ref) (#3473) + - Fixed return type of `x^0` and `x^1` to no longer return `QuadExpr` (see note + in `Breaking` section above) (#3474) ### Other From bb497aeb72da5b2cdb658819b7938dc1a0206625 Mon Sep 17 00:00:00 2001 From: odow Date: Wed, 6 Sep 2023 09:09:42 +1200 Subject: [PATCH 3/9] Update --- Project.toml | 2 +- README.md | 2 +- docs/src/changelog.md | 13 ++++++++----- 3 files changed, 10 insertions(+), 7 deletions(-) diff --git a/Project.toml b/Project.toml index e7b4c127f26..ebe32d2383a 100644 --- a/Project.toml +++ b/Project.toml @@ -1,7 +1,7 @@ name = "JuMP" uuid = "4076af6c-e467-56ae-b986-b466b2749572" repo = "https://github.com/jump-dev/JuMP.jl.git" -version = "1.14.1" +version = "1.15.0" [deps] LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e" diff --git a/README.md b/README.md index 5e7147b630e..1823766bf7c 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,7 @@ embedded in [Julia](https://julialang.org/). You can find out more about us by visiting [jump.dev](https://jump.dev). -**Latest Release**: [![version](https://juliahub.com/docs/JuMP/DmXqY/1.14.1/version.svg)](https://juliahub.com/ui/Packages/JuMP/DmXqY/1.14.1) (`release-1.0` branch): +**Latest Release**: [![version](https://juliahub.com/docs/JuMP/DmXqY/1.15.0/version.svg)](https://juliahub.com/ui/Packages/JuMP/DmXqY/1.15.0) (`release-1.0` branch): * Installation via the Julia package manager: * `import Pkg; Pkg.add("JuMP")` * Get help: diff --git a/docs/src/changelog.md b/docs/src/changelog.md index 9bbeade1105..40336586630 100644 --- a/docs/src/changelog.md +++ b/docs/src/changelog.md @@ -18,7 +18,7 @@ at [Nonlinear Modeling](@ref). ### Breaking Although the new nonlinear interface is a feature addition, there are two -changes which might be breaking for a small number of users. +changes which might be breaking for a very small number of users. - The syntax inside JuMP macros is parsed using a different code path, even for linear and quadratic expressions. We made this change to unify how we parse @@ -34,15 +34,15 @@ changes which might be breaking for a small number of users. `MethodError` due to a missing or ambiguous method. These errors are due to previously existing bugs that were not triggered by the previous parsing code. If you encounter such an error, please open a GitHub issue. - - The methods for `Base.^(x::VariableRef, n::Integer)` and - `Base.^(x::AffExpr, n::Integer)` have changed. Previously, these methods + - The methods for `Base.:^(x::VariableRef, n::Integer)` and + `Base.:^(x::AffExpr, n::Integer)` have changed. Previously, these methods supported only `n = 0, 1, 2` and they always returned a [`QuadExpr`](@ref), even for the case when `n = 0` or `n = 1`. Now: - `x^0` returns `one(T)`, where `T` is the [`value_type`](@ref) of the model (defaults to `Float64`) - `x^1` returns `x` - `x^2` returns a [`QuadExpr`](@ref) - - `x^n` where `n > 2` returns a [`NonlinearExpr`](@ref). + - `x^n` where `!(0 <= n <= 2)` returns a [`NonlinearExpr`](@ref). We made this change to support nonlinear expressions and to align the mathematical definition of the operation with their return type. (Previously, users were surprised that `x^1` returned a [`QuadExpr`](@ref).) As a @@ -55,7 +55,10 @@ changes which might be breaking for a small number of users. - Added [`triangle_vec`](@ref) which simplifies adding [`MOI.LogDetConeTriangle`](@ref) and [`MOI.RootDetConeTriangle`](@ref) constraints (#3456) - - Added new nonlinear interface (#3106) (#3468) (#3472) (#3475) + - Added the new nonlinear interface. This is a very large change. See the + documentation at [Nonlinear Modeling](@ref) and the (long) discussion in + [JuMP.jl#3106](https://github.com/jump-dev/JuMP.jl/pull/3106). Related PRs + are (#3468) (#3472) (#3475) (#3483) (#3487) ### Fixed From fa5c1bf843dd9c6d89fb2ca2b7b0f09079699c36 Mon Sep 17 00:00:00 2001 From: Oscar Dowson Date: Wed, 6 Sep 2023 16:45:01 +1200 Subject: [PATCH 4/9] Update docs/src/changelog.md --- docs/src/changelog.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/src/changelog.md b/docs/src/changelog.md index 40336586630..c8792a70708 100644 --- a/docs/src/changelog.md +++ b/docs/src/changelog.md @@ -58,7 +58,7 @@ changes which might be breaking for a very small number of users. - Added the new nonlinear interface. This is a very large change. See the documentation at [Nonlinear Modeling](@ref) and the (long) discussion in [JuMP.jl#3106](https://github.com/jump-dev/JuMP.jl/pull/3106). Related PRs - are (#3468) (#3472) (#3475) (#3483) (#3487) + are (#3468) (#3472) (#3475) (#3483) (#3487) (#3488) ### Fixed From 810d8cf3e00df30650fce4ef5e7713a1be5bb92c Mon Sep 17 00:00:00 2001 From: Oscar Dowson Date: Fri, 8 Sep 2023 15:39:22 +1200 Subject: [PATCH 5/9] Apply suggestions from code review --- docs/src/changelog.md | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/docs/src/changelog.md b/docs/src/changelog.md index c8792a70708..c145c450c41 100644 --- a/docs/src/changelog.md +++ b/docs/src/changelog.md @@ -7,7 +7,7 @@ CurrentModule = JuMP The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). -## Version 1.15.0 (unreleased) +## Version 1.15.0 (September 15, 2023) This is a large minor release because it adds an entirely new data structure and API path for working with nonlinear programs. The previous nonlinear interface @@ -58,7 +58,7 @@ changes which might be breaking for a very small number of users. - Added the new nonlinear interface. This is a very large change. See the documentation at [Nonlinear Modeling](@ref) and the (long) discussion in [JuMP.jl#3106](https://github.com/jump-dev/JuMP.jl/pull/3106). Related PRs - are (#3468) (#3472) (#3475) (#3483) (#3487) (#3488) + are (#3468) (#3472) (#3475) (#3483) (#3487) (#3488) (#3489) ### Fixed @@ -71,7 +71,8 @@ changes which might be breaking for a very small number of users. ### Other - Added GAMS to solver documentation (#3357) - - Updated various tutorials (#3459) (#3460) (#3462) (#3463) (#3465) + - Updated various tutorials (#3459) (#3460) (#3462) (#3463) (#3465) (#3490) (#3492) + - Added [The network multi-commodity flow problem](@ref) tutorial (#3491) - Added [Two-stage stochastic programs](@ref) tutorial (#3466) - Added better error messages for unsupported operations in `LinearAlgebra` (#3476) - Updated to the latest version of Documenter (#3484) From 5f0469a38c0fbdee09da733c0223b4e83b469fc0 Mon Sep 17 00:00:00 2001 From: Oscar Dowson Date: Mon, 11 Sep 2023 17:28:18 +1200 Subject: [PATCH 6/9] Update changelog.md --- docs/src/changelog.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/docs/src/changelog.md b/docs/src/changelog.md index c145c450c41..de078100d78 100644 --- a/docs/src/changelog.md +++ b/docs/src/changelog.md @@ -67,6 +67,9 @@ changes which might be breaking for a very small number of users. - Fixed adding a container of [`Parameter`](@ref) (#3473) - Fixed return type of `x^0` and `x^1` to no longer return `QuadExpr` (see note in `Breaking` section above) (#3474) + - Fixed error messages in [`LowerBoundRef`](@ref), [`UpperBoundRef`](@ref), + [`FixRef`](@ref), [`IntegerRef`](@ref), [`BinaryRef`](@ref), + [`ParameterRef`](@ref) and related functions (#3494) ### Other @@ -75,7 +78,7 @@ changes which might be breaking for a very small number of users. - Added [The network multi-commodity flow problem](@ref) tutorial (#3491) - Added [Two-stage stochastic programs](@ref) tutorial (#3466) - Added better error messages for unsupported operations in `LinearAlgebra` (#3476) - - Updated to the latest version of Documenter (#3484) + - Updated to the latest version of Documenter (#3484) (#3495) ## Version 1.14.1 (September 2, 2023) From 845efb456fa7ec09049476505082b227d551235a Mon Sep 17 00:00:00 2001 From: Oscar Dowson Date: Wed, 13 Sep 2023 11:13:18 +1200 Subject: [PATCH 7/9] Update changelog.md --- docs/src/changelog.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/docs/src/changelog.md b/docs/src/changelog.md index de078100d78..ff78a7c6451 100644 --- a/docs/src/changelog.md +++ b/docs/src/changelog.md @@ -58,7 +58,7 @@ changes which might be breaking for a very small number of users. - Added the new nonlinear interface. This is a very large change. See the documentation at [Nonlinear Modeling](@ref) and the (long) discussion in [JuMP.jl#3106](https://github.com/jump-dev/JuMP.jl/pull/3106). Related PRs - are (#3468) (#3472) (#3475) (#3483) (#3487) (#3488) (#3489) + are (#3468) (#3472) (#3475) (#3483) (#3487) (#3488) (#3489) (#3504) ### Fixed @@ -75,10 +75,11 @@ changes which might be breaking for a very small number of users. - Added GAMS to solver documentation (#3357) - Updated various tutorials (#3459) (#3460) (#3462) (#3463) (#3465) (#3490) (#3492) + (#3503) - Added [The network multi-commodity flow problem](@ref) tutorial (#3491) - Added [Two-stage stochastic programs](@ref) tutorial (#3466) - Added better error messages for unsupported operations in `LinearAlgebra` (#3476) - - Updated to the latest version of Documenter (#3484) (#3495) + - Updated to the latest version of Documenter (#3484) (#3495) (#3497) ## Version 1.14.1 (September 2, 2023) From 1af2eea1d8bc08a6beb2cd2cabb042045af5151e Mon Sep 17 00:00:00 2001 From: Oscar Dowson Date: Thu, 14 Sep 2023 19:03:58 +1200 Subject: [PATCH 8/9] Update changelog.md --- docs/src/changelog.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/src/changelog.md b/docs/src/changelog.md index ff78a7c6451..4bf4ab48ab6 100644 --- a/docs/src/changelog.md +++ b/docs/src/changelog.md @@ -70,6 +70,7 @@ changes which might be breaking for a very small number of users. - Fixed error messages in [`LowerBoundRef`](@ref), [`UpperBoundRef`](@ref), [`FixRef`](@ref), [`IntegerRef`](@ref), [`BinaryRef`](@ref), [`ParameterRef`](@ref) and related functions (#3494) + - Fixed type inference of empty containers in JuMP macros (#3500) ### Other @@ -80,6 +81,7 @@ changes which might be breaking for a very small number of users. - Added [Two-stage stochastic programs](@ref) tutorial (#3466) - Added better error messages for unsupported operations in `LinearAlgebra` (#3476) - Updated to the latest version of Documenter (#3484) (#3495) (#3497) + - Updated GitHub action versions (#3507) ## Version 1.14.1 (September 2, 2023) From 361c065e9efd3671f35500a57afbf581dd357cc4 Mon Sep 17 00:00:00 2001 From: Oscar Dowson Date: Fri, 15 Sep 2023 08:35:55 +1200 Subject: [PATCH 9/9] Update docs/src/changelog.md --- docs/src/changelog.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/src/changelog.md b/docs/src/changelog.md index 4bf4ab48ab6..3d9b490f205 100644 --- a/docs/src/changelog.md +++ b/docs/src/changelog.md @@ -58,7 +58,7 @@ changes which might be breaking for a very small number of users. - Added the new nonlinear interface. This is a very large change. See the documentation at [Nonlinear Modeling](@ref) and the (long) discussion in [JuMP.jl#3106](https://github.com/jump-dev/JuMP.jl/pull/3106). Related PRs - are (#3468) (#3472) (#3475) (#3483) (#3487) (#3488) (#3489) (#3504) + are (#3468) (#3472) (#3475) (#3483) (#3487) (#3488) (#3489) (#3504) (#3509) ### Fixed