From b6be9e357d77f5162742e6725f4e105cf5599de5 Mon Sep 17 00:00:00 2001 From: Joshua Pulsipher <33848311+pulsipher@users.noreply.github.com> Date: Thu, 21 Oct 2021 18:53:53 -0500 Subject: [PATCH] v0.4.3 Prep (#172) * 0.4 prep * v0.4.1 prep * version prep * v0.4.3 prep * test fix --- Project.toml | 5 +++-- README.md | 27 ++++++++++++++++++--------- docs/src/index.md | 23 ++++++++++++++++------- test/infinite_domains.jl | 4 ++-- test/runtests.jl | 3 ++- test/show.jl | 22 +++++++++++----------- 6 files changed, 52 insertions(+), 32 deletions(-) diff --git a/Project.toml b/Project.toml index 35056d159..14a40122d 100644 --- a/Project.toml +++ b/Project.toml @@ -1,7 +1,7 @@ name = "InfiniteOpt" uuid = "20393b10-9daf-11e9-18c9-8db751c92c57" authors = ["Joshua Pulsipher and Weiqi Zhang"] -version = "0.4.3-dev" +version = "0.4.3" [deps] DataStructures = "864edb3b-99cc-5e75-8d2d-829cb0a9cfe8" @@ -21,6 +21,7 @@ julia = "1" [extras] Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c" Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" +LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e" [targets] -test = ["Test", "Random"] +test = ["Test", "Random", "LinearAlgebra"] diff --git a/README.md b/README.md index 4be895236..40c374a2a 100644 --- a/README.md +++ b/README.md @@ -13,7 +13,7 @@ making it a powerful and convenient tool for advanced users. | **Documentation** | **Build Status** | **Citation** | |:-------------------------------------------------------------------------------:|:-----------------------------------------------------------------------------------------------:|:--------------------------------------:| -| [![](https://img.shields.io/badge/docs-stable-blue.svg)](https://pulsipher.github.io/InfiniteOpt.jl/stable) | [![Build Status](https://github.com/pulsipher/InfiniteOpt.jl/workflows/CI/badge.svg?branch=release-0.4)](https://github.com/pulsipher/InfiniteOpt.jl/actions?query=workflow%3ACI) [![codecov.io](https://codecov.io/github/pulsipher/InfiniteOpt.jl/coverage.svg?branch=release-0.4)](https://codecov.io/github/pulsipher/InfiniteOpt.jl?branch=release-0.4) | [![DOI](https://img.shields.io/badge/math.OC-arXiv%3A2106.12689-B31B1B.svg)](https://arxiv.org/abs/2106.12689) | +| [![](https://img.shields.io/badge/docs-stable-blue.svg)](https://pulsipher.github.io/InfiniteOpt.jl/stable) | [![Build Status](https://github.com/pulsipher/InfiniteOpt.jl/workflows/CI/badge.svg?branch=release-0.4)](https://github.com/pulsipher/InfiniteOpt.jl/actions?query=workflow%3ACI) [![codecov.io](https://codecov.io/github/pulsipher/InfiniteOpt.jl/coverage.svg?branch=release-0.4)](https://codecov.io/github/pulsipher/InfiniteOpt.jl?branch=release-0.4) | [![DOI](https://img.shields.io/badge/Elsevier-CompChemEng%3A107567-yellow.svg)](https://doi.org/10.1016/j.compchemeng.2021.107567) | | [![](https://img.shields.io/badge/docs-dev-blue.svg)](https://pulsipher.github.io/InfiniteOpt.jl/dev) | [![Build Status](https://github.com/pulsipher/InfiniteOpt.jl/workflows/CI/badge.svg?branch=master)](https://github.com/pulsipher/InfiniteOpt.jl/actions?query=workflow%3ACI) [![codecov.io](https://codecov.io/github/pulsipher/InfiniteOpt.jl/coverage.svg?branch=master)](https://codecov.io/github/pulsipher/InfiniteOpt.jl?branch=master) | | It builds upon `JuMP` to add support for many complex modeling objects which @@ -52,24 +52,33 @@ Please visit our [documentation pages](https://pulsipher.github.io/InfiniteOpt.j to learn more. These pages are quite extensive and feature overviews, guides, manuals, tutorials, examples, and more! +## Questions +For additional help please visit and post in our +[Discussion Forum](https://github.com/pulsipher/InfiniteOpt.jl/discussions). + ## Citing +[![DOI](https://img.shields.io/badge/Elsevier-CompChemEng%3A107567-yellow.svg)](https://doi.org/10.1016/j.compchemeng.2021.107567) [![DOI](https://img.shields.io/badge/math.OC-arXiv%3A2106.12689-B31B1B.svg)](https://arxiv.org/abs/2106.12689) If you use InfiniteOpt.jl in your research, we would greatly appreciate your citing it. ```latex -@misc{pulsipher2021unifying, - title={A Unifying Modeling Abstraction for Infinite-Dimensional Optimization}, - author={Joshua L. Pulsipher and Weiqi Zhang and Tyler J. Hongisto and Victor M. Zavala}, - year={2021}, - eprint={2106.12689}, - archivePrefix={arXiv}, - primaryClass={math.OC} +@article{pulsipher2022unifying, + title = {A unifying modeling abstraction for infinite-dimensional optimization}, + journal = {Computers & Chemical Engineering}, + volume = {156}, + pages = {107567}, + year = {2022}, + issn = {0098-1354}, + doi = {https://doi.org/10.1016/j.compchemeng.2021.107567}, + url = {https://www.sciencedirect.com/science/article/pii/S0098135421003458}, + author = {Joshua L. Pulsipher and Weiqi Zhang and Tyler J. Hongisto and Victor M. Zavala}, } ``` +A pre-print version is freely available though [ArXiv](https://arxiv.org/abs/2106.12689). ## Project Status -The package is tested against Julia `1.0` and `1.6` on Linux and Windows. +The package is tested against Julia `1.0` and `1.6` on Linux, Mac, and Windows. ## Contributing `InfiniteOpt` is being actively developed and suggestions or other forms of contribution are encouraged. diff --git a/docs/src/index.md b/docs/src/index.md index 61eca9d04..f57012727 100644 --- a/docs/src/index.md +++ b/docs/src/index.md @@ -120,6 +120,10 @@ extensions in `InfiniteOpt` are provided on the [Extensions](@ref) page. Finally, case study examples are provided in the `Examples` sections. +## Questions +For additional help please visit and post in our +[Discussion Forum](https://github.com/pulsipher/InfiniteOpt.jl/discussions). + ## Contribution `InfiniteOpt` is a powerful tool with a broad scope lending to a large realm of possible feature additions and enhancements. So, we are thrilled to support @@ -136,20 +140,25 @@ For other contributions, please visit our review our style guide. ## Citing +[![DOI](https://img.shields.io/badge/Elsevier-CompChemEng%3A107567-yellow.svg)](https://doi.org/10.1016/j.compchemeng.2021.107567) [![DOI](https://img.shields.io/badge/math.OC-arXiv%3A2106.12689-B31B1B.svg)](https://arxiv.org/abs/2106.12689) If you use InfiniteOpt.jl in your research, we would greatly appreciate your citing it. ```latex -@misc{pulsipher2021unifying, - title={A Unifying Modeling Abstraction for Infinite-Dimensional Optimization}, - author={Joshua L. Pulsipher and Weiqi Zhang and Tyler J. Hongisto and Victor M. Zavala}, - year={2021}, - eprint={2106.12689}, - archivePrefix={arXiv}, - primaryClass={math.OC} +@article{pulsipher2022unifying, + title = {A unifying modeling abstraction for infinite-dimensional optimization}, + journal = {Computers & Chemical Engineering}, + volume = {156}, + pages = {107567}, + year = {2022}, + issn = {0098-1354}, + doi = {https://doi.org/10.1016/j.compchemeng.2021.107567}, + url = {https://www.sciencedirect.com/science/article/pii/S0098135421003458}, + author = {Joshua L. Pulsipher and Weiqi Zhang and Tyler J. Hongisto and Victor M. Zavala}, } ``` +A pre-print version is freely available though [ArXiv](https://arxiv.org/abs/2106.12689). ## Acknowledgements We acknowledge our support from the Department of Energy under grant diff --git a/test/infinite_domains.jl b/test/infinite_domains.jl index e92070a75..2dac49f6a 100644 --- a/test/infinite_domains.jl +++ b/test/infinite_domains.jl @@ -13,7 +13,7 @@ end sdomain1 = IntervalDomain(0, 1) sdomain2 = UniDistributionDomain(Uniform()) domain1 = CollectionDomain([sdomain1, sdomain2]) - domain2 = MultiDistributionDomain(MvNormal(ones(4))) + domain2 = MultiDistributionDomain(MvNormal(Diagonal(map(abs2, ones(4))))) @test length(sdomain1) == 1 @test length(sdomain2) == 1 @test length(domain1) == 2 @@ -38,7 +38,7 @@ end end # supports_in_domain (MultivariateDistribution domain) @testset "Multivariate Distribution" begin - domain = MultiDistributionDomain(MvNormal(ones(2))) + domain = MultiDistributionDomain(MvNormal(Diagonal(map(abs2, ones(2))))) @test supports_in_domain(ones(2), domain) @test supports_in_domain(ones(2, 10), domain) bad_supports = [1 1; 2 2; 3 3]; diff --git a/test/runtests.jl b/test/runtests.jl index b680e6618..c9e2f7fc5 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -1,7 +1,8 @@ using InfiniteOpt: _domain_or_error using Test: Error # Load in the dependencies -using InfiniteOpt, Distributions, Random, FastGaussQuadrature, DataStructures +using InfiniteOpt, Distributions, Random, FastGaussQuadrature, DataStructures, +LinearAlgebra # load the test module using Test diff --git a/test/show.jl b/test/show.jl index 36ff24a0a..4ed1ff949 100644 --- a/test/show.jl +++ b/test/show.jl @@ -3,7 +3,7 @@ # initialize model and attributes m = InfiniteModel() @infinite_parameter(m, par1 in [0, 1]) - @infinite_parameter(m, pars[1:2] ~ MvNormal([1, 1], 1)) + @infinite_parameter(m, pars[1:2] ~ MvNormal([1, 1], [1 0; 0 1])) @infinite_parameter(m, pars2[1:2] in [0, 2]) @infinite_parameter(m, pars3[1:2] in [0, 1], independent = true) @variable(m, x, Infinite(par1)) @@ -130,8 +130,8 @@ @test InfiniteOpt.domain_string(REPLMode, domain) == "Uniform{Float64}(a=0.0, b=1.0)" @test InfiniteOpt.domain_string(IJuliaMode, domain) == "Uniform{Float64}(a=0.0, b=1.0)" # test mulivariate domain - domain = MultiDistributionDomain(MvNormal([1], 1)) - str = "IsoNormal(\ndim: 1" # just test first part + domain = MultiDistributionDomain(MvNormal([1], ones(1, 1))) + str = "FullNormal(\ndim: 1" # just test first part @test InfiniteOpt.domain_string(REPLMode, domain)[1:length(str)] == str @test InfiniteOpt.domain_string(IJuliaMode, domain)[1:length(str)] == str end @@ -184,12 +184,12 @@ str = InfiniteOpt._math_symbol(IJuliaMode, :prop) * " Uniform" @test in_domain_string(IJuliaMode, domain) == str # test mulivariate domain - domain = MultiDistributionDomain(MvNormal([1], 1)) + domain = MultiDistributionDomain(MvNormal([1], ones(1, 1))) str = InfiniteOpt._math_symbol(REPLMode, :prop) * " MvNormal(dim: (1))" - str2 = InfiniteOpt._math_symbol(REPLMode, :prop) * " IsoNormal(dim: (1))" + str2 = InfiniteOpt._math_symbol(REPLMode, :prop) * " FullNormal(dim: (1))" @test in_domain_string(REPLMode, domain) in [str, str2] str = InfiniteOpt._math_symbol(IJuliaMode, :prop) * " MvNormal(dim: (1))" - str2 = InfiniteOpt._math_symbol(IJuliaMode, :prop) * " IsoNormal(dim: (1))" + str2 = InfiniteOpt._math_symbol(IJuliaMode, :prop) * " FullNormal(dim: (1))" @test in_domain_string(IJuliaMode, domain) in [str, str2] # test matrix domain domain = MultiDistributionDomain(MatrixBeta(2, 2, 2)) @@ -544,7 +544,7 @@ InfiniteOpt._math_symbol(REPLMode, :intersect) * " (pars[1] " * InfiniteOpt._math_symbol(REPLMode, :in) * " [0, 1])" str2 = "pars " * InfiniteOpt._math_symbol(REPLMode, :prop) * - " IsoNormal(dim: (2)) " * + " FullNormal(dim: (2)) " * InfiniteOpt._math_symbol(REPLMode, :intersect) * " (pars[1] " * InfiniteOpt._math_symbol(REPLMode, :in) * " [0, 1])" @test InfiniteOpt._param_domain_string(REPLMode, m, idx, rs) in [str, str2] @@ -553,7 +553,7 @@ InfiniteOpt._math_symbol(IJuliaMode, :intersect) * " (pars_{1} " * InfiniteOpt._math_symbol(IJuliaMode, :in) * " [0, 1])" str2 = "pars " * InfiniteOpt._math_symbol(IJuliaMode, :prop) * - " IsoNormal(dim: (2)) " * + " FullNormal(dim: (2)) " * InfiniteOpt._math_symbol(IJuliaMode, :intersect) * " (pars_{1} " * InfiniteOpt._math_symbol(IJuliaMode, :in) * " [0, 1])" @test InfiniteOpt._param_domain_string(IJuliaMode, m, idx, rs) in [str, str2] @@ -562,12 +562,12 @@ str = "pars " * InfiniteOpt._math_symbol(REPLMode, :prop) * " MvNormal(dim: (2))" str2 = "pars " * InfiniteOpt._math_symbol(REPLMode, :prop) * - " IsoNormal(dim: (2))" + " FullNormal(dim: (2))" @test InfiniteOpt._param_domain_string(REPLMode, m, idx, rs) in [str, str2] str = "pars " * InfiniteOpt._math_symbol(IJuliaMode, :prop) * " MvNormal(dim: (2))" str2 = "pars " * InfiniteOpt._math_symbol(IJuliaMode, :prop) * - " IsoNormal(dim: (2))" + " FullNormal(dim: (2))" @test InfiniteOpt._param_domain_string(IJuliaMode, m, idx, rs) in [str, str2] end # test constraint_string (infinite constraint) @@ -667,7 +667,7 @@ end # initialize models m = InfiniteModel() @infinite_parameter(m, par1 in [0, 1]) - @infinite_parameter(m, pars[1:2] ~ MvNormal([1, 1], 1)) + @infinite_parameter(m, pars[1:2] ~ MvNormal([1, 1], [1 0; 0 1])) @variable(m, x, Infinite(par1)) @variable(m, z, Infinite(pars)) @variable(m, y)