Skip to content

Implementation field#416

Open
BenjaminPINEAU wants to merge 21 commits into
JuliaSmoothOptimizers:mainfrom
BenjaminPINEAU:implementation_features
Open

Implementation field#416
BenjaminPINEAU wants to merge 21 commits into
JuliaSmoothOptimizers:mainfrom
BenjaminPINEAU:implementation_features

Conversation

@BenjaminPINEAU
Copy link
Copy Markdown

Add a new field implementation (see #415) that take jump if the problem is defined in PureJuMP, adnlpmodels if the problem is defined in ADNLPProblems, or both if both.

Copy link
Copy Markdown
Member

@tmigot tmigot left a comment

Choose a reason for hiding this comment

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

Thanks @BenjaminPINEAU for the PR. A few comments to start with.

Comment thread Project.toml Outdated
JLD2 = "033835bb-8acc-5ee8-8aae-3f567f8a3819"
JuMP = "4076af6c-e467-56ae-b986-b466b2749572"
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
NLPModels = "a4795742-8479-5a88-8948-cc11e1c8c1a6"
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Please do not change the Project.toml in your PR

Comment thread .DS_Store
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Not in this PR

Comment thread src/.DS_Store
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Not in this PR

@tmigot tmigot requested a review from Copilot May 8, 2026 20:00
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Copilot wasn't able to review this pull request because it exceeds the maximum number of files (300). Try reducing the number of changed files and requesting a review from Copilot again.

@tmigot tmigot linked an issue May 8, 2026 that may be closed by this pull request
@tmigot
Copy link
Copy Markdown
Member

tmigot commented May 8, 2026

@BenjaminPINEAU We could add a test in the unit tests that checks that:

  • All the problems that have :jump are in names(PureJuMP) but not in names(ADNLPProblems)
  • The same for :adnlpmodels
  • For both, we check that they are in both.
    What do you think?

@BenjaminPINEAU
Copy link
Copy Markdown
Author

@tmigot I apologize for the DS_Store files, they aren't displaying in my code editor and I missed them in the PR.
The new test looks good; I will be working on it!

@tmigot
Copy link
Copy Markdown
Member

tmigot commented May 22, 2026

Hey @BenjaminPINEAU ! Do you need help with this?

@BenjaminPINEAU
Copy link
Copy Markdown
Author

hey @tmigot! To be honest I haven't had time to work on it lately, but it's still on my to-do list. Sorry about that!

@tmigot
Copy link
Copy Markdown
Member

tmigot commented May 22, 2026

No worries, I was planning a few fixes around meta as well, feel free to ask if you encounter any issue.

BenjaminPINEAU and others added 14 commits May 26, 2026 11:11
…Optimizers#410)

* Improve contributing.md: clarify requirements for adding new problems, including constraints, compatibility, meta fields, allocation, and scalability

* Clarify meta field completeness and validation requirements in meta.md, as suggested by validation analysis PDF

* Add note to benchmark.md about compatibility and meta field validation requirements for benchmarking, as suggested by validation analysis PDF

* Update meta.md for improved clarity on meta fields

Clarified requirements for meta field completeness and validation.

* Apply suggestions from code review

Co-authored-by: Tangi Migot <tangi.migot@gmail.com>

* addressing review comments

* Update contributing.md

* Fix punctuation and formatting in contributing.md

Corrected punctuation and formatting in the contributing guidelines.

* Apply suggestions from code review

Co-authored-by: Tangi Migot <tangi.migot@gmail.com>

* Enhance contributing.md with NLS problem guidelines

Added guidelines for handling Nonlinear Least Squares (NLS) problems in contributing documentation.

* Apply suggestions from code review

Co-authored-by: Tangi Migot <tangi.migot@gmail.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* addressing review comments

* Apply suggestions from code review

Co-authored-by: Tangi Migot <tangi.migot@gmail.com>

* addressing review comments

* Apply suggestions from code review

Co-authored-by: Tangi Migot <tangi.migot@gmail.com>

* Update contributing.md

* Apply suggestions from code review

Co-authored-by: Tangi Migot <tangi.migot@gmail.com>

---------

Co-authored-by: Tangi Migot <tangi.migot@gmail.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Add CLAUDE.md

* Fix CLAUDE.md issues raised in PR review

- Fix elementwise boolean operator (.&& → .&) in meta filter example
- Soften three-file pattern to guideline, noting legacy exceptions
- Generalize scalable n-adjustment guidance (not just max(2,n))
- Correct generate_meta() location to test/utils.jl

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
* Fix JuliaSmoothOptimizers#354: Add warnings when dimension is modified on NZF1, spmsrtls, and bearing

- NZF1: Warn when n is not a multiple of 13 (adjusted to nearest multiple)
- spmsrtls: Warn when n is adjusted due to minimum dimension requirement (n >= 100)
- bearing: Warn when grid dimensions are adjusted to ensure nx > 0 and ny > 0

These warnings follow the pattern already established in dixmaan* problems.

* Update src/ADNLPProblems/bearing.jl

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* n%13 removal

* Add @adjust_nvar_warn macro and update all dimension adjustment warnings

- Created @adjust_nvar_warn macro in ADNLPProblems module to standardize
  dimension adjustment warnings across all problems
- Updated warning messages to consistently show both original and adjusted
  values following pattern: 'problem_name: number of variables adjusted
  from {n_orig} to {n}'
- Applied macro to all problems with dimension adjustments:
  - NZF1 (multiple of 13)
  - spmsrtls (adjusted formula)
  - chainwoo (multiple of 4, both :nlp and :nls variants)
  - woods (multiple of 4)
  - srosenbr (multiple of 2)
  - catenary (multiple of 3, minimum 6)
  - clplatea, clplateb, clplatec (perfect squares)
  - fminsrf2 (minimum 4, then perfect square)
  - powellsg (multiple of 4, both :nlp and :nls variants)
  - watson (clamped between 2 and 31, both :nlp and :nls variants)

Addresses issue JuliaSmoothOptimizers#354

* Apply suggestions from code review

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update powellsg :nls variant to use @adjust_nvar_warn macro

Ensures consistent warning messages between :nlp and :nls variants,
showing both original and adjusted dimension values.

* PureJuMP implementations

* Update src/PureJuMP/PureJuMP.jl

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Add regression tests for dimension-adjustment warnings

* unifying macros for defining problems and dimensions, and added warnings for dimension mismatches in the defined problems.

* adding copilot suggestions to fix dimension warnings in ADNLPProblems and PureJuMP

* Update OptimizationProblems.jl

* final changes

* Update src/OptimizationProblems.jl

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* addressing review comments

* addressing review comments

* format

* addressing review comments

* further macro additions

* addressing review comments

* missing macro

* fixing failing checks

* reverting elec.jl to the version before the dimension warnings were added. The changes in this commit are to fix the dimension warnings that were introduced in the previous commit. The changes include changing the bounds on the constraints, building a feasible x0, and changing the number of variables and constraints in the model. The changes are made in both the ADNLPProblems and PureJuMP versions of elec.jl.

* passing elec.jl macro

* Update elec.jl

* PureJuMP changes

* Update catenary.jl

* Apply suggestions from code review

Co-authored-by: Tangi Migot <tangi.migot@gmail.com>

* ADNLProblems changes

* Update powellsg.jl

* updating fminsrf2.jl to remove dimension warnings

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Tangi Migot <tangi.migot@gmail.com>
* Move doc from comments to meta (aircrfta)

* up

* do not move license

* add new fields in Meta

* Move comments to META

* fix

* add refs

* move things around hs

* add doc

* Add a bib creator

* fix

* fix conflict

* allow multiple URL

* fill-in meta

* up some refs

* clean COPS test problems

* clean HS2

* Fix split :origin and :origin_notes

* Add missing bibtex and links

* Add lib ref

* small fixes

* 59 files with http://dx.doi.org/https://doi.org/

* Update SKILL

* uniform bib
Co-authored-by: tmigot <tmigot@users.noreply.github.com>
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.

Distinguish PureJuMP problems and ADNLPProblems ?

4 participants