Skip to content

Add chebyquad#414

Open
arnavk23 wants to merge 6 commits intoJuliaSmoothOptimizers:mainfrom
arnavk23:add-chebyquad-mainonly
Open

Add chebyquad#414
arnavk23 wants to merge 6 commits intoJuliaSmoothOptimizers:mainfrom
arnavk23:add-chebyquad-mainonly

Conversation

@arnavk23
Copy link
Copy Markdown
Contributor

@arnavk23 arnavk23 commented Mar 31, 2026

Closes #115
Builds on #280

…gration

- Make Cheby function robust for AD and floating-point noise
- Add all necessary chebyquad overloads for type=Val(T), type=T, positional and keyword arguments, and model selection
- Ensure chebyquad works for both NLP and NLS forms
- Add fallback for keyword-only calls
- Confirmed gradient is valid and tests now run to completion
@arnavk23
Copy link
Copy Markdown
Contributor Author

arnavk23 commented Mar 31, 2026

OptimizationProblems.jl> julia --project -e "using ADNLPModels, OptimizationProblems.ADNLPProblems, NLPModels; nlp = chebyquad(); x = get_x0(nlp); println(grad(nlp, x))"

[0.4884343917032366, 0.3427897511394064, 0.12791614745429375, -0.04864916711127345, -0.11538430033659702, -0.07476947610247212, 0.009731027758558827, 0.0643710938139633, 0.05515576651091031, 0.002857933486413361, -0.04294916891897461, -0.046556537370172665, -0.011654108898887901, 0.027366416958388744, 0.037289518364351924, 0.013153208329055744, -0.02080031789049889, -0.03448661127266264, -0.018054507407989973, 0.01144198481365151, 0.02694757406002861, 0.015734899274417083, -0.010381745365069962, -0.027054133241672582, -0.019873546920724607, 0.0031758577269359514, 0.020035663202020465, 0.015362580900101817, -0.005589643709327231, -0.02257820030185312, -0.01980318868636321, -0.000705354956114449, 0.01577153986669283, 0.01368632657181804, -0.004514535514698286, -0.020638528674029447, -0.018839492485096854, -0.0013590352625745313, 0.01379629574999258, 0.011115293172347638, -0.006541290586890774, -0.020800877590383498, -0.016833282943028813, 0.000961515104431679, 0.013370242932792443, 0.006828884473594402, -0.011667438022023515, -0.021802457728230383, -0.01227679629171297, 0.006148985919863728, 0.012256626597793075, -0.0013869419774942384, -0.01915253912920277, -0.020009502174905262, -0.002711990522957443, 0.011707142757530166, 0.0049745356697277684, -0.015151393002800896, -0.023313899457658938, -0.008591623775488187, 0.010022525841194573, 0.007208241193833812, -0.014275552760777806, -0.025259886928948032, -0.009713554930765023, 0.01071628944778388, 0.0054994507644348335, -0.019175637539573808, -0.026309655390087314, -0.0036917698538219404, 0.013432588737551378, -0.004371334136517044, -0.02960995436482998, -0.018811865226317497, 0.01111789585726821, 0.005665065477686967, -0.0286238323204927, -0.027390333954238337, 0.010042427674828854, 0.008055771748754643, -0.034478916011086866, -0.027108455996210524, 0.018628181856769038, -0.0048239968178649065, -0.04921133132577815, -0.0008755768031082747, 0.019718489087599274, -0.05432023624291835, -0.015679414679670472, 0.031133475646888842, -0.07414494351288908, 0.010005144563976252, 0.0023477253483035598, -0.08839780208559837, 0.0841272983192187, -0.16796474155652863, 0.15584154363914918, -0.18432770471192625, -0.4108940312064887, 0.623128954648702]

Copilot AI review requested due to automatic review settings April 2, 2026 14:22
Copy link
Copy Markdown

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.

Pull request overview

Adds the Moré–Garbow–Hillstrom “chebyquad” test problem (Problem 35) to the OptimizationProblems.jl catalog, providing both a JuMP (PureJuMP) and AD-based (ADNLPProblems) implementation plus metadata for discovery via OptimizationProblems.meta.

Changes:

  • Added chebyquad implementation in src/PureJuMP/chebyquad.jl.
  • Added chebyquad NLP/NLS implementations in src/ADNLPProblems/chebyquad.jl (with use_nls switch).
  • Added metadata and size getters in src/Meta/chebyquad.jl.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 8 comments.

File Description
src/PureJuMP/chebyquad.jl Introduces a JuMP nonlinear objective formulation for chebyquad.
src/ADNLPProblems/chebyquad.jl Introduces AD-based NLP + in-place NLS residual formulations for chebyquad.
src/Meta/chebyquad.jl Registers chebyquad metadata and getter functions (including NLS residual count).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

arnavk23 and others added 3 commits April 3, 2026 01:20
…T) for typed constants and builds x0 from a typed step, which keeps Float32 inputs and the objective result in Float32 without forcing constructor conversions.
Co-authored-by: Copilot <175728472+Copilot@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.

Moré - Garbow - Hillstrom test set

2 participants