feat: Major update with validators, skills, dashboard, and docs reorganization
- Add validation framework (config, model, results, study validators) - Add Claude Code skills (create-study, run-optimization, generate-report, troubleshoot, analyze-model) - Add Atomizer Dashboard (React frontend + FastAPI backend) - Reorganize docs into structured directories (00-09) - Add neural surrogate modules and training infrastructure - Add multi-objective optimization support 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
159
examples/optimization_config_neural.json
Normal file
159
examples/optimization_config_neural.json
Normal file
@@ -0,0 +1,159 @@
|
||||
{
|
||||
"study_name": "beam_optimization_with_neural",
|
||||
"sim_file": "examples/Models/Beam/Beam.sim",
|
||||
"fem_file": "examples/Models/Beam/Beam_fem1.fem",
|
||||
|
||||
"design_variables": [
|
||||
{
|
||||
"name": "width",
|
||||
"expression_name": "width",
|
||||
"min": 20.0,
|
||||
"max": 80.0
|
||||
},
|
||||
{
|
||||
"name": "height",
|
||||
"expression_name": "height",
|
||||
"min": 30.0,
|
||||
"max": 100.0
|
||||
},
|
||||
{
|
||||
"name": "thickness",
|
||||
"expression_name": "thickness",
|
||||
"min": 2.0,
|
||||
"max": 10.0
|
||||
}
|
||||
],
|
||||
|
||||
"objectives": [
|
||||
{
|
||||
"name": "max_stress",
|
||||
"type": "minimize",
|
||||
"weight": 1.0,
|
||||
"extractor": {
|
||||
"type": "result_parameter",
|
||||
"parameter_name": "Max Von Mises Stress"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "mass",
|
||||
"type": "minimize",
|
||||
"weight": 0.5,
|
||||
"extractor": {
|
||||
"type": "expression",
|
||||
"expression_name": "mass"
|
||||
}
|
||||
}
|
||||
],
|
||||
|
||||
"constraints": [
|
||||
{
|
||||
"name": "stress_limit",
|
||||
"type": "less_than",
|
||||
"value": 250.0,
|
||||
"extractor": {
|
||||
"type": "result_parameter",
|
||||
"parameter_name": "Max Von Mises Stress"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "max_displacement",
|
||||
"type": "less_than",
|
||||
"value": 5.0,
|
||||
"extractor": {
|
||||
"type": "result_parameter",
|
||||
"parameter_name": "Max Displacement"
|
||||
}
|
||||
}
|
||||
],
|
||||
|
||||
"optimization": {
|
||||
"algorithm": "NSGA-II",
|
||||
"n_trials": 200,
|
||||
"population_size": 20
|
||||
},
|
||||
|
||||
"neural_surrogate": {
|
||||
"enabled": true,
|
||||
"model_checkpoint": "atomizer-field/checkpoints/beam_model_v1.0/best_model.pt",
|
||||
"confidence_threshold": 0.85,
|
||||
"fallback_to_fea": true,
|
||||
"ensemble_models": [
|
||||
"atomizer-field/checkpoints/beam_model_v1.0/model_1.pt",
|
||||
"atomizer-field/checkpoints/beam_model_v1.0/model_2.pt",
|
||||
"atomizer-field/checkpoints/beam_model_v1.0/model_3.pt"
|
||||
],
|
||||
"device": "cuda",
|
||||
"batch_size": 32,
|
||||
"cache_predictions": true
|
||||
},
|
||||
|
||||
"hybrid_optimization": {
|
||||
"enabled": true,
|
||||
"exploration_trials": 20,
|
||||
"training_interval": 50,
|
||||
"validation_frequency": 10,
|
||||
"min_training_samples": 30,
|
||||
"retrain_on_drift": true,
|
||||
"drift_threshold": 0.15,
|
||||
"adaptive_switching": true,
|
||||
"phases": [
|
||||
{
|
||||
"name": "exploration",
|
||||
"trials": [0, 20],
|
||||
"use_nn": false,
|
||||
"description": "Initial FEA-based exploration"
|
||||
},
|
||||
{
|
||||
"name": "training",
|
||||
"trials": [21, 30],
|
||||
"use_nn": false,
|
||||
"description": "Collect training data"
|
||||
},
|
||||
{
|
||||
"name": "exploitation",
|
||||
"trials": [31, 180],
|
||||
"use_nn": true,
|
||||
"description": "Neural network exploitation"
|
||||
},
|
||||
{
|
||||
"name": "validation",
|
||||
"trials": [181, 200],
|
||||
"use_nn": false,
|
||||
"description": "Final FEA validation"
|
||||
}
|
||||
]
|
||||
},
|
||||
|
||||
"training_data_export": {
|
||||
"enabled": true,
|
||||
"export_dir": "atomizer_field_training_data/beam_study",
|
||||
"export_frequency": 1,
|
||||
"include_failed_trials": false,
|
||||
"compression": "gzip"
|
||||
},
|
||||
|
||||
"neural_training": {
|
||||
"auto_train": true,
|
||||
"training_script": "atomizer-field/train.py",
|
||||
"epochs": 200,
|
||||
"learning_rate": 0.001,
|
||||
"batch_size": 16,
|
||||
"validation_split": 0.2,
|
||||
"early_stopping_patience": 20,
|
||||
"model_architecture": "GraphUNet",
|
||||
"hidden_channels": 128,
|
||||
"num_layers": 4,
|
||||
"dropout": 0.1,
|
||||
"physics_loss_weight": 0.3
|
||||
},
|
||||
|
||||
"performance_tracking": {
|
||||
"track_speedup": true,
|
||||
"track_accuracy": true,
|
||||
"export_metrics": true,
|
||||
"metrics_file": "neural_performance_metrics.json"
|
||||
},
|
||||
|
||||
"version": "2.0",
|
||||
"description": "Beam optimization with AtomizerField neural surrogate for 600x speedup"
|
||||
}
|
||||
102
examples/optimization_config_protocol10.json
Normal file
102
examples/optimization_config_protocol10.json
Normal file
@@ -0,0 +1,102 @@
|
||||
{
|
||||
"_description": "Protocol 10: Intelligent Multi-Strategy Optimization Configuration",
|
||||
"_version": "1.0",
|
||||
"_date": "2025-11-19",
|
||||
|
||||
"study_name": "intelligent_optimization_example",
|
||||
"direction": "minimize",
|
||||
|
||||
"intelligent_optimization": {
|
||||
"_description": "Protocol 10 - Automatic landscape analysis and strategy selection",
|
||||
"enabled": true,
|
||||
|
||||
"characterization_trials": 15,
|
||||
"_comment_characterization": "Initial random exploration trials for landscape analysis (default: 15)",
|
||||
|
||||
"stagnation_window": 10,
|
||||
"_comment_stagnation": "Number of trials to check for stagnation before switching (default: 10)",
|
||||
|
||||
"min_improvement_threshold": 0.001,
|
||||
"_comment_threshold": "Minimum relative improvement to avoid stagnation (0.001 = 0.1%)",
|
||||
|
||||
"min_analysis_trials": 10,
|
||||
"_comment_min_trials": "Minimum trials before landscape analysis is reliable (default: 10)",
|
||||
|
||||
"reanalysis_interval": 15,
|
||||
"_comment_reanalysis": "Re-analyze landscape every N trials to detect changes (default: 15)",
|
||||
|
||||
"strategy_preferences": {
|
||||
"_description": "Optional user preferences for strategy selection",
|
||||
"prefer_cmaes_for_smooth": true,
|
||||
"prefer_tpe_for_multimodal": true,
|
||||
"enable_hybrid_strategies": false,
|
||||
"_comment_hybrid": "GP→CMA-ES hybrid (not yet implemented)"
|
||||
}
|
||||
},
|
||||
|
||||
"sampler": {
|
||||
"_description": "This will be overridden by Protocol 10's intelligent selection, but used as fallback",
|
||||
"type": "TPESampler",
|
||||
"params": {
|
||||
"n_startup_trials": 10,
|
||||
"n_ei_candidates": 24,
|
||||
"multivariate": true,
|
||||
"warn_independent_sampling": true
|
||||
}
|
||||
},
|
||||
|
||||
"pruner": {
|
||||
"_description": "Early stopping for unpromising trials (optional)",
|
||||
"type": "MedianPruner",
|
||||
"params": {
|
||||
"n_startup_trials": 5,
|
||||
"n_warmup_steps": 0
|
||||
}
|
||||
},
|
||||
|
||||
"adaptive_strategy": {
|
||||
"_description": "Protocol 8 - Adaptive exploitation based on surrogate confidence",
|
||||
"enabled": true,
|
||||
"min_confidence_for_exploitation": 0.65,
|
||||
"min_trials_for_confidence": 15,
|
||||
"target_confidence_metrics": {
|
||||
"convergence_weight": 0.4,
|
||||
"coverage_weight": 0.3,
|
||||
"stability_weight": 0.3
|
||||
}
|
||||
},
|
||||
|
||||
"trials": {
|
||||
"n_trials": 100,
|
||||
"timeout": null,
|
||||
"_comment_timeout": "Maximum time in seconds (null = no timeout)",
|
||||
"catch": []
|
||||
},
|
||||
|
||||
"reporting": {
|
||||
"auto_generate_plots": true,
|
||||
"include_optuna_visualizations": true,
|
||||
"include_confidence_report": true,
|
||||
"include_strategy_performance": true,
|
||||
"save_intelligence_report": true,
|
||||
"_comment_intelligence": "Saves landscape analysis and strategy decisions to JSON"
|
||||
},
|
||||
|
||||
"verbosity": {
|
||||
"print_landscape_report": true,
|
||||
"print_strategy_recommendation": true,
|
||||
"print_phase_transitions": true,
|
||||
"print_confidence_updates": true,
|
||||
"log_to_file": true
|
||||
},
|
||||
|
||||
"experimental": {
|
||||
"_description": "Experimental features (use at your own risk)",
|
||||
"enable_transfer_learning": false,
|
||||
"_comment_transfer": "Learn from previous studies (not yet implemented)",
|
||||
"enable_parallel_strategies": false,
|
||||
"_comment_parallel": "Run multiple strategies concurrently (not yet implemented)"
|
||||
},
|
||||
|
||||
"optimization_notes": "This configuration enables Protocol 10: Intelligent Multi-Strategy Optimization. Atomizer will automatically characterize your problem landscape, select the best optimization algorithm, and switch strategies dynamically if needed. All decisions are logged for transparency."
|
||||
}
|
||||
169
examples/optimization_config_protocol12.json
Normal file
169
examples/optimization_config_protocol12.json
Normal file
@@ -0,0 +1,169 @@
|
||||
{
|
||||
"study_name": "example_hybrid_surrogate",
|
||||
"description": "Example study using Protocol 12 - Hybrid FEA/NN Optimization",
|
||||
"engineering_context": "Demonstrates automated surrogate-accelerated optimization workflow",
|
||||
|
||||
"optimization_settings": {
|
||||
"protocol": "protocol_12_hybrid_surrogate",
|
||||
"n_trials": 200,
|
||||
"sampler": "NSGAIISampler",
|
||||
"pruner": null,
|
||||
"timeout_per_trial": 600
|
||||
},
|
||||
|
||||
"design_variables": [
|
||||
{
|
||||
"parameter": "thickness",
|
||||
"bounds": [1, 5],
|
||||
"type": "float",
|
||||
"description": "Wall thickness (mm)"
|
||||
},
|
||||
{
|
||||
"parameter": "width",
|
||||
"bounds": [20, 50],
|
||||
"type": "float",
|
||||
"description": "Section width (mm)"
|
||||
},
|
||||
{
|
||||
"parameter": "hole_diameter",
|
||||
"bounds": [5, 20],
|
||||
"type": "float",
|
||||
"description": "Lightening hole diameter (mm)"
|
||||
},
|
||||
{
|
||||
"parameter": "n_holes",
|
||||
"bounds": [4, 12],
|
||||
"type": "integer",
|
||||
"description": "Number of holes"
|
||||
}
|
||||
],
|
||||
|
||||
"objectives": [
|
||||
{
|
||||
"name": "mass",
|
||||
"goal": "minimize",
|
||||
"weight": 1.0,
|
||||
"target": 100,
|
||||
"description": "Total mass (grams)",
|
||||
"extraction": {
|
||||
"action": "extract_mass",
|
||||
"domain": "result_extraction",
|
||||
"params": {"result_type": "mass", "metric": "total"}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "fundamental_frequency",
|
||||
"goal": "maximize",
|
||||
"weight": 1.0,
|
||||
"target": 200,
|
||||
"description": "First natural frequency (Hz)",
|
||||
"extraction": {
|
||||
"action": "extract_frequency",
|
||||
"domain": "result_extraction",
|
||||
"params": {"result_type": "frequency", "mode_number": 1}
|
||||
}
|
||||
}
|
||||
],
|
||||
|
||||
"constraints": [
|
||||
{
|
||||
"name": "max_displacement",
|
||||
"type": "less_than",
|
||||
"threshold": 2.0,
|
||||
"description": "Max tip displacement < 2mm",
|
||||
"extraction": {
|
||||
"action": "extract_displacement",
|
||||
"domain": "result_extraction",
|
||||
"params": {"result_type": "displacement", "metric": "max"}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "max_stress",
|
||||
"type": "less_than",
|
||||
"threshold": 150,
|
||||
"description": "Max von Mises stress < 150 MPa",
|
||||
"extraction": {
|
||||
"action": "extract_stress",
|
||||
"domain": "result_extraction",
|
||||
"params": {"result_type": "stress", "metric": "max_von_mises"}
|
||||
}
|
||||
}
|
||||
],
|
||||
|
||||
"surrogate_settings": {
|
||||
"enabled": true,
|
||||
"mode": "auto",
|
||||
"_mode_options": ["auto", "manual", "disabled"],
|
||||
"_mode_description": "auto=system decides when to train/use NN, manual=user controls, disabled=FEA only",
|
||||
|
||||
"training": {
|
||||
"initial_fea_trials": 30,
|
||||
"_initial_fea_description": "FEA trials before training first surrogate",
|
||||
|
||||
"space_filling_samples": 100,
|
||||
"_space_filling_description": "Additional LHS samples for uniform coverage",
|
||||
|
||||
"sampling_method": "lhs_with_corners",
|
||||
"_sampling_options": ["lhs", "sobol", "lhs_with_corners", "adaptive"],
|
||||
|
||||
"parallel_workers": 2,
|
||||
"_parallel_description": "Number of parallel FEA processes for training data"
|
||||
},
|
||||
|
||||
"model": {
|
||||
"architecture": "mlp",
|
||||
"_architecture_options": ["mlp", "ensemble", "gaussian_process"],
|
||||
|
||||
"hidden_layers": [64, 128, 64],
|
||||
"_hidden_description": "Neural network hidden layer sizes",
|
||||
|
||||
"validation_method": "5_fold_cv",
|
||||
"_validation_options": ["5_fold_cv", "10_fold_cv", "holdout_20"],
|
||||
|
||||
"min_accuracy_mape": 10.0,
|
||||
"_min_accuracy_description": "Maximum MAPE% to accept surrogate as valid",
|
||||
|
||||
"retrain_threshold": 15.0,
|
||||
"_retrain_description": "If validation error exceeds this, retrain with more data"
|
||||
},
|
||||
|
||||
"optimization": {
|
||||
"nn_trials_per_fea": 50,
|
||||
"_nn_trials_description": "NN evaluations between FEA validations",
|
||||
|
||||
"validate_top_n": 5,
|
||||
"_validate_description": "FEA-validate top N candidates from NN",
|
||||
|
||||
"adaptive_sampling": true,
|
||||
"_adaptive_description": "Add high-error predictions to training set"
|
||||
},
|
||||
|
||||
"knowledge_base": {
|
||||
"save_to_master": true,
|
||||
"_save_description": "Store trained surrogate in global knowledge base",
|
||||
|
||||
"master_db_path": "knowledge_base/physics_surrogates.db",
|
||||
|
||||
"tags": ["cantilever", "aluminum", "modal", "static"],
|
||||
"_tags_description": "Tags for finding similar surrogates",
|
||||
|
||||
"reuse_similar": true,
|
||||
"_reuse_description": "Try to transfer learn from similar existing surrogate"
|
||||
}
|
||||
},
|
||||
|
||||
"simulation": {
|
||||
"model_file": "Part.prt",
|
||||
"sim_file": "Part_sim1.sim",
|
||||
"fem_file": "Part_fem1.fem",
|
||||
"solver": "nastran",
|
||||
"analysis_types": ["static", "modal"]
|
||||
},
|
||||
|
||||
"reporting": {
|
||||
"generate_plots": true,
|
||||
"save_incremental": true,
|
||||
"llm_summary": false,
|
||||
"surrogate_report": true
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user