{
  "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
  }
}
