Merged
Conversation
- Add aliases for max_iter, max_wall_time, acceptable_tol across all solvers - Implement alias preservation in StrategyOptions with alias_map - Add comprehensive tests for alias resolution - Enable interchangeable option names between solvers Cross-solver aliases added: - max_iter: maxit, maxiter, max_iterations - max_wall_time: maxtime, max_time, time_limit - acceptable_tol: acc_tol Modified files: - ext/CTSolversIpopt.jl: Add maxit, time aliases, acc_tol - ext/CTSolversKnitro.jl: Add wall time aliases - ext/CTSolversMadNCL.jl: Add maxit, time aliases - ext/CTSolversMadNLP.jl: Add maxit, time aliases - ext/CTSolversUno.jl: Add maxit, time aliases - src/Strategies/contract/strategy_options.jl: Add alias_map field and resolution - src/Strategies/api/configuration.jl: Build alias_map from metadata - test/suite/strategies/test_strategy_options.jl: Add alias resolution tests - test/suite/strategies/test_alias_integration.jl: New cross-solver tests - test - Add aliases for max_iter, max_wall_time, acceptaAdd- Implement alias preservation in StrategyOptions with alias_map - Add comppt- Add comprehensive tests for alias resolution
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR adds cross-solver option aliases to enable interchangeable option names across all 5 solvers (Ipopt, Knitro, MadNCL, MadNLP, Uno). Users can now use any solver's option names with any other solver, making the API more consistent and user-friendly.
Features
Cross-Solver Aliases Added
Maximum iterations - All 5 solvers now support:
:max_iter(canonical in Ipopt, MadNCL, MadNLP):maxit(canonical in Knitro) ← NEW:maxiter,:max_iterations(existing aliases)Maximum wall time - All 5 solvers now support:
:max_wall_time(canonical in Ipopt, MadNCL, MadNLP):maxtime(canonical in Knitro) ← NEW:max_time(existing alias in MadNCL/MadNLP) ← NEW:time_limit(canonical in Uno) ← NEWAcceptable tolerance - 3 solvers now support:
:acceptable_tol(canonical in Ipopt, MadNCL, MadNLP):acc_tol(existing alias in MadNCL/MadNLP) ← NEW for IpoptImplementation
alias_mapfield for O(1) alias resolutiongetindex,haskey,optionnow resolve aliases automaticallyExamples