Files
Anto01 eabcc4c3ca refactor: Major reorganization of optimization_engine module structure
BREAKING CHANGE: Module paths have been reorganized for better maintainability.
Backwards compatibility aliases with deprecation warnings are provided.

New Structure:
- core/           - Optimization runners (runner, intelligent_optimizer, etc.)
- processors/     - Data processing
  - surrogates/   - Neural network surrogates
- nx/             - NX/Nastran integration (solver, updater, session_manager)
- study/          - Study management (creator, wizard, state, reset)
- reporting/      - Reports and analysis (visualizer, report_generator)
- config/         - Configuration management (manager, builder)
- utils/          - Utilities (logger, auto_doc, etc.)
- future/         - Research/experimental code

Migration:
- ~200 import changes across 125 files
- All __init__.py files use lazy loading to avoid circular imports
- Backwards compatibility layer supports old import paths with warnings
- All existing functionality preserved

To migrate existing code:
  OLD: from optimization_engine.nx_solver import NXSolver
  NEW: from optimization_engine.nx.solver import NXSolver

  OLD: from optimization_engine.runner import OptimizationRunner
  NEW: from optimization_engine.core.runner import OptimizationRunner

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-29 12:30:59 -05:00

65 lines
2.1 KiB
Python

"""
Optimization Engine Core
========================
Main optimization runners and algorithm selection.
Modules:
- runner: Main OptimizationRunner class
- base_runner: BaseRunner abstract class
- intelligent_optimizer: IMSO adaptive optimizer
- method_selector: Algorithm selection logic
- strategy_selector: Strategy portfolio management
"""
# Lazy imports to avoid circular dependencies
def __getattr__(name):
if name == 'OptimizationRunner':
from .runner import OptimizationRunner
return OptimizationRunner
elif name == 'BaseRunner':
from .base_runner import BaseRunner
return BaseRunner
elif name == 'NeuralOptimizationRunner':
from .runner_with_neural import NeuralOptimizationRunner
return NeuralOptimizationRunner
elif name == 'IntelligentOptimizer':
from .intelligent_optimizer import IntelligentOptimizer
return IntelligentOptimizer
elif name == 'IMSO':
from .intelligent_optimizer import IMSO
return IMSO
elif name == 'MethodSelector':
from .method_selector import MethodSelector
return MethodSelector
elif name == 'select_method':
from .method_selector import select_method
return select_method
elif name == 'StrategySelector':
from .strategy_selector import StrategySelector
return StrategySelector
elif name == 'StrategyPortfolio':
from .strategy_portfolio import StrategyPortfolio
return StrategyPortfolio
elif name == 'GradientOptimizer':
from .gradient_optimizer import GradientOptimizer
return GradientOptimizer
elif name == 'LBFGSPolisher':
from .gradient_optimizer import LBFGSPolisher
return LBFGSPolisher
raise AttributeError(f"module 'optimization_engine.core' has no attribute '{name}'")
__all__ = [
'OptimizationRunner',
'BaseRunner',
'NeuralOptimizationRunner',
'IntelligentOptimizer',
'IMSO',
'MethodSelector',
'select_method',
'StrategySelector',
'StrategyPortfolio',
'GradientOptimizer',
'LBFGSPolisher',
]