Skip to content

Conversation

@ChrisRackauckas-Claude
Copy link

Summary

Fixes deprecation warnings when using MultistartOptimization.TikTak by updating to use current OptimizationSolution field names.

Changes

Updates the _local_optimiser function in OptimizationMultistartOptimization.jl to use the current field names for optimization results:

  • Changed res.minimumres.objective
  • Changed res.minimizerres.u

Context

This resolves deprecation warnings that appeared during testing and ensures compatibility with the current OptimizationSolution API. The issue was mentioned in Discourse thread #133174.

The traits for MultistartOptimization.TikTak are already correctly set:

  • requiresbounds = true (TikTak needs bounds for Sobol sequence generation)
  • allowsbounds = true (TikTak supports bounds and passes them to local optimizer)

Test plan

  • Ran Pkg.test("OptimizationMultistartOptimization") - all tests pass without deprecation warnings
  • Verified the fix eliminates the deprecation warnings that were present before
  • Formatted code with SciMLStyle

🤖 Generated with Claude Code

Updates the `_local_optimiser` function in OptimizationMultistartOptimization
to use the current field names for optimization results:
- Changed `res.minimum` to `res.objective`
- Changed `res.minimizer` to `res.u`

This resolves deprecation warnings when running tests and ensures compatibility
with the current OptimizationSolution API.

The traits for MultistartOptimization.TikTak are already correctly set:
- `requiresbounds = true` (TikTak needs bounds for Sobol sequence generation)
- `allowsbounds = true` (TikTak passes bounds to local optimizer)

Fixes issue mentioned in https://discourse.julialang.org/t/error-when-using-multistart-optimization/133174

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <[email protected]>
@ChrisRackauckas ChrisRackauckas merged commit 36fbd85 into SciML:master Oct 22, 2025
40 of 79 checks passed
@ChrisRackauckas-Claude
Copy link
Author

Additional Context

I've verified that the bounds support issue mentioned in the Discourse thread was caused by a previous bug that has already been fixed.

Testing Results:

Testing TikTak traits:
  requiresbounds: true
  allowsbounds: true
  allowscallback: false

All trait tests passed!

Testing that bounds checking doesn't throw error...
Success! Bounds checking passed - TikTak correctly supports bounds

The traits are correctly set in the current codebase:

  • requiresbounds(TikTak) = true (line 7) - TikTak requires bounds for Sobol sequence generation
  • allowsbounds(TikTak) = true (line 8) - TikTak supports bounds
  • allowscallback(TikTak) = false (line 9) - No callback support

This PR only fixes the remaining deprecation warnings from using outdated field names.

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.

2 participants