Skip to content

[Depends on #3991] Adding method for multistart initialization of nonlinear models. - #3994

Draft
stephenscini wants to merge 59 commits into
Pyomo:mainfrom
stephenscini:multistart-init
Draft

[Depends on #3991] Adding method for multistart initialization of nonlinear models.#3994
stephenscini wants to merge 59 commits into
Pyomo:mainfrom
stephenscini:multistart-init

Conversation

@stephenscini

@stephenscini stephenscini commented Jul 13, 2026

Copy link
Copy Markdown
Member

Fixes # .

Summary/Motivation:

Additional method in devel/initialization to use multistart optimization as a way for initializing nonliner models.

Changes proposed in this PR:

  • Updating contrib/multistart solver for reproducibility, and adding support for new solver interface.
  • Adding support for uniform, lhs, and sobol sampling within the multistart solver
  • Adding method to devel/initialization

AI-Use Disclosure

  • AI tools contributed to the development of this PR

    • AI tools generated code (apart from tests)

    Review process (select ONE):

    • Rewritten: All AI-generated content was rewritten by me before being committed.

Notes for reviewers (optional):

Legal Acknowledgement

By contributing to this software project, I have read the contribution guide and agree to the following terms and conditions for my contribution:

  1. I agree my contributions are submitted under the BSD license.
  2. I represent I am authorized to make the contributions and grant the license. If my employer has rights to intellectual property that includes these contributions, I represent that I have received permission to make contributions and grant the required license on behalf of that employer.

@stephenscini

Copy link
Copy Markdown
Member Author

Opening PR, but still in active development. Dependent on #3991 first as it includes those changes.

@stephenscini stephenscini left a comment

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Went through and added some questions in the code for design meeting.

Comment thread pyomo/contrib/solver/tests/solvers/test_solvers.py
Comment thread pyomo/contrib/multistart/reinit.py Outdated
Comment thread pyomo/contrib/multistart/reinit.py
Comment thread pyomo/contrib/multistart/multi.py
Comment thread pyomo/contrib/multistart/multi.py
Comment thread pyomo/contrib/multistart/multi.py Outdated
Comment thread pyomo/contrib/multistart/multi.py
Comment thread pyomo/contrib/multistart/multi.py
Comment thread pyomo/contrib/multistart/multi.py
Comment thread pyomo/contrib/multistart/multi.py Outdated
@stephenscini

Copy link
Copy Markdown
Member Author

Had discussion with Bethany and Michael. Main takeaway points:

  • Invest to make this work for newer SolverFactory. Do not keep in opt.SolverFactory.
  • Try and resolve all test failures with the new SolverFactory as default. More discussion needed on expectations for contrib solvers as they transition to new SolverFactory.
  • If all results are infeasible/not optimal, have it throw the 'NoOptimalSolution' error.
    -Keep this PR focused on a minimum working version that has key functionality we want. Can always add additional touches later.
  • LHS makes sense to be default for all methods/strategies, and should be looped in to the old strategies too.
  • Availability of multistart should depend on availablility of chosen sub-solver (default is ipopt)
  • Version 0.1.0 makes sense for this new iteration.
  • Subsolver has its own configuration, but still needs to comply with 'meta-solver' configurations. If subsolver timelimit is 1 minute for 50 runs, but metasolver is 10 minutes, when metasolver time runs out the methods stop.

method=config.sampling_method, rng=config.rng, seed=config.seed
)

# Set sub-solver options

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Note: Michael made case that all arguments should be independent for solver and subsolver. Fix before converting from draft

)

eligible_vars.append(var)

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Originally I made new method "rand_vector" to distinguish a method for sampling using stratified methods to retain original methods. Now all methods support stratified sampling. Is there a need/value for a vectorized form?

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.

1 participant