Quickstart¶
This page walks through a first successful COBRA run.
1. Prepare Inputs¶
You need:
- A netlist file (
.cir/.sp) compatible with Xyce parsing. - At least one component mapping to either:
- ONNX surrogate model (
.onnx), or - fixed Touchstone model (
.sNp).
For an immediate starting point, use files in examples/.
2. Run GUI Mode¶
In GUI mode:
- Load netlist.
- Map each parsed component to model source files.
- Define design goals.
- Define optimization parameters.
- Start optimization.
3. Run Script Mode (Optional)¶
This script demonstrates:
- mixed model sources (
.onnx+.sNp), MODEL_INPUTandNETLIST_VARIABLEoptimization,- linked variables,
OptunaOptimizer+XyceSimulator,- optional ORCA geometry argument.
For concept details (workflow, goals, parameter types), see Home.
4. Inspect Results¶
Each run creates a timestamped folder under results/:
Typical contents include:
cobra_optimization_context.jsonsurrogate_s_params_<component>.sNp- the netlist carrying the best parameters found
Each trial is evaluated in its own trials/trial_<n>/ directory — its netlist,
<component>_predicted.sNp, vector-fitted .sp files, and simulator output.
Only the most recently finished trial is kept; the earlier directories are
removed once their results have been recorded.
Tip
Keep the generated context JSON when comparing optimization runs. It contains trial history and best parameters.
5. Common First-Run Checks¶
cobracommand opens the GUI.Xyceis discoverable inPATH.- Netlist component names match mapping keys (e.g.
X1,X2). - File paths in script mode are absolute or correctly resolved.