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>
This commit is contained in:
2025-12-29 12:30:59 -05:00
parent 82f36689b7
commit eabcc4c3ca
120 changed files with 1127 additions and 637 deletions

View File

@@ -12,8 +12,8 @@ Expected behavior:
import numpy as np
import optuna
from pathlib import Path
from optimization_engine.adaptive_characterization import CharacterizationStoppingCriterion
from optimization_engine.landscape_analyzer import LandscapeAnalyzer
from optimization_engine.processors.adaptive_characterization import CharacterizationStoppingCriterion
from optimization_engine.reporting.landscape_analyzer import LandscapeAnalyzer
def simple_smooth_function(trial):

View File

@@ -1,7 +1,7 @@
"""Test neural surrogate integration."""
import time
from optimization_engine.neural_surrogate import create_surrogate_for_study
from optimization_engine.processors.surrogates.neural_surrogate import create_surrogate_for_study
print("Testing Neural Surrogate Integration")
print("=" * 60)

View File

@@ -7,7 +7,7 @@ project_root = Path(__file__).parent
sys.path.insert(0, str(project_root))
sys.path.insert(0, str(project_root / 'atomizer-field'))
from optimization_engine.neural_surrogate import create_parametric_surrogate_for_study
from optimization_engine.processors.surrogates.neural_surrogate import create_parametric_surrogate_for_study
# Create surrogate
print("Creating parametric surrogate...")

View File

@@ -1,7 +1,7 @@
"""Test parametric surrogate integration."""
import time
from optimization_engine.neural_surrogate import create_parametric_surrogate_for_study
from optimization_engine.processors.surrogates.neural_surrogate import create_parametric_surrogate_for_study
print("Testing Parametric Neural Surrogate")
print("=" * 60)

View File

@@ -117,7 +117,7 @@ from pathlib import Path
# Add parent directory to path
sys.path.insert(0, str(Path(__file__).parent.parent.parent))
from optimization_engine.runner import OptimizationRunner
from optimization_engine.core.runner import OptimizationRunner
def main():
"""Run the optimization."""