Skip to content

Floatify pi in PureJuMP models - #439

Closed
MaxenceGollier wants to merge 1 commit into
JuliaSmoothOptimizers:mainfrom
MaxenceGollier:remove-pi
Closed

MaxenceGollier wants to merge 1 commit into
JuliaSmoothOptimizers:mainfrom
MaxenceGollier:remove-pi

Conversation

@MaxenceGollier

Copy link
Copy Markdown
Contributor

closes #438.

all the π are floatified:

gollmaxe@kappa.gerad.lan:~/OptimizationProblems.jl (1004)>grep -r "π" ./src/PureJuMP
./src/PureJuMP/hs9.jl:  @objective(nlp, Min, sin(π * x[1] / 12) * cos(π * x[2] / 16))
./src/PureJuMP/polygon1.jl:  @variable(nlp, 0 <= θ[1:N] <= 2π, start = 0)
./src/PureJuMP/polygon2.jl:  @constraint(nlp, sum(α) == 2π)
./src/PureJuMP/elec.jl:  θ0 = 2π .* range0
./src/PureJuMP/elec.jl:  ϕ0 = π .* range0
./src/PureJuMP/polygon.jl:  @variable(nlp, 0 <= θ[i = 1:N] <= π, start = i * π / (N - 1) - π / (N - 1))
./src/PureJuMP/polygon.jl:  @constraint(nlp, θ[N] == π)
./src/PureJuMP/robotarm.jl:  lvar = [zeros(n); -π * ones(n); zeros(n); -Inf * ones(6n); 0]
./src/PureJuMP/robotarm.jl:  uvar = [L * ones(n); π * ones(n); 2π * ones(n); Inf * ones(6n); Inf]
./src/PureJuMP/robotarm.jl:  lvar[2n] = uvar[2n] = 2 * π / 3
./src/PureJuMP/robotarm.jl:  lvar[2n + 1] = uvar[2n + 1] = lvar[3n] = uvar[3n] = π / 4
./src/PureJuMP/robotarm.jl:  θ0 = [2π / 3 * (t / n)^2 for t = 1:n]
./src/PureJuMP/robotarm.jl:  x0 = [L * ones(n); θ0; π * ones(n) / 4; zeros(6n); tf0]

Copilot AI balanced review requested due to automatic review settings October 7, 2026 14:17

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@github-actions

github-actions Bot commented Oct 7, 2026

Copy link
Copy Markdown
Contributor
Package name latest stable
AdaptiveRegularization
Envelopt
ExpressionTreeForge
JSOSuite
NCL
PartiallySeparableNLPModels
PartiallySeparableSolvers
RegularizedOptimization

@codecov

codecov Bot commented Oct 7, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 99.32%. Comparing base (2ada450) to head (ded36d7).
⚠️ Report is 67 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #439      +/-   ##
==========================================
- Coverage   99.80%   99.32%   -0.48%     
==========================================
  Files        1084     1139      +55     
  Lines       12319    13548    +1229     
==========================================
+ Hits        12295    13457    +1162     
- Misses         24       91      +67     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@odow

odow commented Oct 7, 2026

Copy link
Copy Markdown

You shouldn’t need this. Just update to the latest version

@MaxenceGollier

Copy link
Copy Markdown
Contributor Author

@odow, the current compat entry is JuMP = "^1.15", isn't this safer than to make the large update to JuMP = "1.32.1" ?

@odow

odow commented Oct 7, 2026

Copy link
Copy Markdown

You can leave as is. You don’t need to change anything in this package.

The only broken version is v1.32.0, which is replaced by v1.32.1. Anyone still using v1.15 or v1.19 etc is okay.

@MaxenceGollier

Copy link
Copy Markdown
Contributor Author

Ah, ok I didn't understand that, thank you.

@MaxenceGollier
MaxenceGollier deleted the remove-pi branch October 7, 2026 18:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

JuMP v1.32.0 breaks polygon on Julia lts

3 participants