#!/usr/bin/env python
"""
{STUDY_NAME} - Neural Network Acceleration Script (Simplified)
================================================================

This script uses ConfigDrivenSurrogate for config-driven NN optimization.
The ~600 lines of boilerplate code is now handled automatically.

Workflow:
---------
1. First run FEA: python run_optimization.py --run --trials 50
2. Then run NN:   python run_nn_optimization.py --turbo --nn-trials 5000

Or combine:
   python run_nn_optimization.py --all

Generated by Atomizer StudyWizard
"""

from pathlib import Path
import sys

# Add project root to path
project_root = Path(__file__).resolve().parents[2]
sys.path.insert(0, str(project_root))

from optimization_engine.processors.surrogates.generic_surrogate import ConfigDrivenSurrogate


def main():
    """Run neural acceleration using config-driven surrogate."""
    # Create surrogate - all config read from optimization_config.json
    surrogate = ConfigDrivenSurrogate(__file__)

    # Element type: 'auto' detects from DAT file
    # Override if needed: surrogate.element_type = 'cquad4' (shell) or 'ctetra' (solid)

    return surrogate.run()


if __name__ == "__main__":
    exit(main())
