Skip to content

Commit

Permalink
Add model sweep pattern recognition
Browse files Browse the repository at this point in the history
  • Loading branch information
ra3xdh committed Sep 19, 2024
1 parent 1592d07 commit 3237373
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions qucs/components/param_sweep.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -151,11 +151,13 @@ QString Param_Sweep::getNgspiceBeforeSim(QString sim, int lvl)

if (step_var == "temp" || step_var == "temper") temper_sweep = true;

if (temper_sweep) {
if (temper_sweep) { // Sweep temperature
s += QString("option temp = $%1_act%2").arg(step_var).arg(nline_char);
} else if (compfound) {
} else if (compfound) { // Sweep device
s += QString("alter %1 = $%2_act%3").arg(par).arg(step_var).arg(nline_char);
} else {
} else if (par.startsWith("@")) { // Sweep model
s += QString("altermod %1 = $%2_act%3").arg(par).arg(step_var).arg(nline_char);
} else { // Sweep .PARAM variable
s += QString("alterparam %1 = $%2_act%3reset%3").arg(par).arg(step_var).arg(nline_char);
}
}
Expand Down

0 comments on commit 3237373

Please sign in to comment.