feat: Add MLP surrogate with Turbo Mode for 100x faster optimization
Neural Acceleration (MLP Surrogate): - Add run_nn_optimization.py with hybrid FEA/NN workflow - MLP architecture: 4-layer (64->128->128->64) with BatchNorm/Dropout - Three workflow modes: - --all: Sequential export->train->optimize->validate - --hybrid-loop: Iterative Train->NN->Validate->Retrain cycle - --turbo: Aggressive single-best validation (RECOMMENDED) - Turbo mode: 5000 NN trials + 50 FEA validations in ~12 minutes - Separate nn_study.db to avoid overloading dashboard Performance Results (bracket_pareto_3obj study): - NN prediction errors: mass 1-5%, stress 1-4%, stiffness 5-15% - Found minimum mass designs at boundary (angle~30deg, thick~30mm) - 100x speedup vs pure FEA exploration Protocol Operating System: - Add .claude/skills/ with Bootstrap, Cheatsheet, Context Loader - Add docs/protocols/ with operations (OP_01-06) and system (SYS_10-14) - Update SYS_14_NEURAL_ACCELERATION.md with MLP Turbo Mode docs NX Automation: - Add optimization_engine/hooks/ for NX CAD/CAE automation - Add study_wizard.py for guided study creation - Fix FEM mesh update: load idealized part before UpdateFemodel() New Study: - bracket_pareto_3obj: 3-objective Pareto (mass, stress, stiffness) - 167 FEA trials + 5000 NN trials completed - Demonstrates full hybrid workflow 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
72
optimization_engine/hooks/__init__.py
Normal file
72
optimization_engine/hooks/__init__.py
Normal file
@@ -0,0 +1,72 @@
|
||||
"""
|
||||
Atomizer NX Open Hooks
|
||||
======================
|
||||
|
||||
Direct Python hooks for NX CAD/CAE operations via NX Open API.
|
||||
|
||||
This module provides a clean Python interface for manipulating NX parts
|
||||
programmatically. Each hook executes NX journals via `run_journal.exe`
|
||||
and returns structured JSON results.
|
||||
|
||||
Modules
|
||||
-------
|
||||
nx_cad : CAD manipulation hooks
|
||||
- part_manager : Open, close, save parts
|
||||
- expression_manager : Get/set design parameters
|
||||
- geometry_query : Mass properties, bodies, volumes
|
||||
- feature_manager : Suppress/unsuppress features
|
||||
|
||||
nx_cae : CAE/Simulation hooks (Phase 2)
|
||||
- solver_manager : BDF export, solve simulations
|
||||
|
||||
Quick Start
|
||||
-----------
|
||||
>>> from optimization_engine.hooks.nx_cad import expression_manager
|
||||
>>> result = expression_manager.get_expressions("C:/model.prt")
|
||||
>>> if result["success"]:
|
||||
... for name, expr in result["data"]["expressions"].items():
|
||||
... print(f"{name} = {expr['value']}")
|
||||
|
||||
>>> from optimization_engine.hooks.nx_cae import solver_manager
|
||||
>>> result = solver_manager.get_bdf_from_solution_folder("C:/model.sim")
|
||||
|
||||
Requirements
|
||||
------------
|
||||
- Siemens NX 2506+ installed
|
||||
- NX_BIN_PATH environment variable (or default path)
|
||||
- Python 3.8+ with atomizer conda environment
|
||||
|
||||
See Also
|
||||
--------
|
||||
- optimization_engine/hooks/README.md : Full documentation
|
||||
- docs/plans/NX_OPEN_AUTOMATION_ROADMAP.md : Development roadmap
|
||||
|
||||
Version
|
||||
-------
|
||||
1.1.0 (2025-12-06) - Added nx_cae module with solver_manager
|
||||
1.0.0 (2025-12-06) - Initial release with nx_cad hooks
|
||||
"""
|
||||
|
||||
from .nx_cad import (
|
||||
part_manager,
|
||||
expression_manager,
|
||||
geometry_query,
|
||||
feature_manager,
|
||||
)
|
||||
|
||||
from .nx_cae import (
|
||||
solver_manager,
|
||||
)
|
||||
|
||||
__all__ = [
|
||||
# CAD hooks
|
||||
'part_manager',
|
||||
'expression_manager',
|
||||
'geometry_query',
|
||||
'feature_manager',
|
||||
# CAE hooks
|
||||
'solver_manager',
|
||||
]
|
||||
|
||||
__version__ = '1.1.0'
|
||||
__author__ = 'Atomizer'
|
||||
Reference in New Issue
Block a user