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:
48
studies/bracket_pareto_3obj/reset_study.py
Normal file
48
studies/bracket_pareto_3obj/reset_study.py
Normal file
@@ -0,0 +1,48 @@
|
||||
"""
|
||||
Reset study - Delete results database and logs.
|
||||
|
||||
Usage:
|
||||
python reset_study.py
|
||||
python reset_study.py --confirm # Skip confirmation
|
||||
"""
|
||||
|
||||
from pathlib import Path
|
||||
import shutil
|
||||
|
||||
|
||||
def main():
|
||||
import argparse
|
||||
parser = argparse.ArgumentParser()
|
||||
parser.add_argument('--confirm', action='store_true', help='Skip confirmation')
|
||||
args = parser.parse_args()
|
||||
|
||||
study_dir = Path(__file__).parent
|
||||
results_dir = study_dir / "2_results"
|
||||
|
||||
if not args.confirm:
|
||||
print(f"This will delete all results in: {results_dir}")
|
||||
response = input("Are you sure? (y/N): ")
|
||||
if response.lower() != 'y':
|
||||
print("Cancelled.")
|
||||
return
|
||||
|
||||
# Delete database files
|
||||
for f in results_dir.glob("*.db"):
|
||||
f.unlink()
|
||||
print(f"Deleted: {f.name}")
|
||||
|
||||
# Delete log files
|
||||
for f in results_dir.glob("*.log"):
|
||||
f.unlink()
|
||||
print(f"Deleted: {f.name}")
|
||||
|
||||
# Delete JSON results
|
||||
for f in results_dir.glob("*.json"):
|
||||
f.unlink()
|
||||
print(f"Deleted: {f.name}")
|
||||
|
||||
print("Study reset complete.")
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
Reference in New Issue
Block a user