JuliaSmoothOptimizers / OptimizationProblems.jl

Optimization Problems for Julia
Other
88 stars 48 forks source link

Avoid convert rationals #219

Closed tmigot closed 2 years ago

tmigot commented 2 years ago

The first batch of modification to improve the genericity of the functions.

The ultimate goal is to have f(x) return something of eltype(x) and not necessarily T. In this PR, I am handling most of the rationals, sin, log and exp will come next.

All these models have a JuMP implementation, so the unit tests verify that the implementation has not been changed.

codecov[bot] commented 2 years ago

Codecov Report

Base: 99.86% // Head: 99.86% // Decreases project coverage by -0.00% :warning:

Coverage data is based on head (43e00ee) compared to base (f740508). Patch coverage: 100.00% of modified lines in pull request are covered.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #219 +/- ## ========================================== - Coverage 99.86% 99.86% -0.01% ========================================== Files 751 751 Lines 6730 6722 -8 ========================================== - Hits 6721 6713 -8 Misses 9 9 ``` | [Impacted Files](https://codecov.io/gh/JuliaSmoothOptimizers/OptimizationProblems.jl/pull/219?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=JuliaSmoothOptimizers) | Coverage Δ | | |---|---|---| | [src/ADNLPProblems/BOX2.jl](https://codecov.io/gh/JuliaSmoothOptimizers/OptimizationProblems.jl/pull/219/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=JuliaSmoothOptimizers#diff-c3JjL0FETkxQUHJvYmxlbXMvQk9YMi5qbA==) | `100.00% <ø> (ø)` | | | [src/ADNLPProblems/BOX3.jl](https://codecov.io/gh/JuliaSmoothOptimizers/OptimizationProblems.jl/pull/219/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=JuliaSmoothOptimizers#diff-c3JjL0FETkxQUHJvYmxlbXMvQk9YMy5qbA==) | `100.00% <ø> (ø)` | | | [src/ADNLPProblems/NZF1.jl](https://codecov.io/gh/JuliaSmoothOptimizers/OptimizationProblems.jl/pull/219/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=JuliaSmoothOptimizers#diff-c3JjL0FETkxQUHJvYmxlbXMvTlpGMS5qbA==) | `100.00% <ø> (ø)` | | | [src/ADNLPProblems/chainwoo.jl](https://codecov.io/gh/JuliaSmoothOptimizers/OptimizationProblems.jl/pull/219/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=JuliaSmoothOptimizers#diff-c3JjL0FETkxQUHJvYmxlbXMvY2hhaW53b28uamw=) | `100.00% <ø> (ø)` | | | [src/ADNLPProblems/clplatea.jl](https://codecov.io/gh/JuliaSmoothOptimizers/OptimizationProblems.jl/pull/219/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=JuliaSmoothOptimizers#diff-c3JjL0FETkxQUHJvYmxlbXMvY2xwbGF0ZWEuamw=) | `100.00% <ø> (ø)` | | | [src/ADNLPProblems/clplateb.jl](https://codecov.io/gh/JuliaSmoothOptimizers/OptimizationProblems.jl/pull/219/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=JuliaSmoothOptimizers#diff-c3JjL0FETkxQUHJvYmxlbXMvY2xwbGF0ZWIuamw=) | `100.00% <ø> (ø)` | | | [src/ADNLPProblems/clplatec.jl](https://codecov.io/gh/JuliaSmoothOptimizers/OptimizationProblems.jl/pull/219/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=JuliaSmoothOptimizers#diff-c3JjL0FETkxQUHJvYmxlbXMvY2xwbGF0ZWMuamw=) | `100.00% <ø> (ø)` | | | [src/ADNLPProblems/curly.jl](https://codecov.io/gh/JuliaSmoothOptimizers/OptimizationProblems.jl/pull/219/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=JuliaSmoothOptimizers#diff-c3JjL0FETkxQUHJvYmxlbXMvY3VybHkuamw=) | `100.00% <ø> (ø)` | | | [src/ADNLPProblems/curly10.jl](https://codecov.io/gh/JuliaSmoothOptimizers/OptimizationProblems.jl/pull/219/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=JuliaSmoothOptimizers#diff-c3JjL0FETkxQUHJvYmxlbXMvY3VybHkxMC5qbA==) | `100.00% <ø> (ø)` | | | [src/ADNLPProblems/curly20.jl](https://codecov.io/gh/JuliaSmoothOptimizers/OptimizationProblems.jl/pull/219/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=JuliaSmoothOptimizers#diff-c3JjL0FETkxQUHJvYmxlbXMvY3VybHkyMC5qbA==) | `100.00% <ø> (ø)` | | | ... and [71 more](https://codecov.io/gh/JuliaSmoothOptimizers/OptimizationProblems.jl/pull/219/diff?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=JuliaSmoothOptimizers) | | Help us with your feedback. Take ten seconds to tell us [how you rate us](https://about.codecov.io/nps?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=JuliaSmoothOptimizers). Have a feature suggestion? [Share it here.](https://app.codecov.io/gh/feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=JuliaSmoothOptimizers)

:umbrella: View full report at Codecov.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.