Skip to content

Commit

Permalink
Merge branch 'master' into nlp
Browse files Browse the repository at this point in the history
  • Loading branch information
pulsipher committed Oct 21, 2021
2 parents e791363 + b6be9e3 commit f42e9a7
Show file tree
Hide file tree
Showing 5 changed files with 48 additions and 30 deletions.
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -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]
AbstractTrees = "1520ce14-60c1-5f80-bbc7-55ef81b5835c"
Expand Down
27 changes: 18 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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.
Expand Down
23 changes: 16 additions & 7 deletions docs/src/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
4 changes: 2 additions & 2 deletions test/infinite_domains.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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];
Expand Down
22 changes: 11 additions & 11 deletions test/show.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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))
Expand Down Expand Up @@ -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]
Expand All @@ -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]
Expand All @@ -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)
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit f42e9a7

Please sign in to comment.