Automation of Parametric Input Files for Large Iteration Studies

Dear SOFiSTiK Community,

I am trying to create a parametric workflow to run several variants automatically and export results to Excel (without using Python).

For one variable with three iterations, my code is as follows:
#Define run_prog

+PROG TEMPLATE urs:3
KOPF Parametric Test

STO#thick 0.1,0.2,0.3
LET#i_current 0
Let#i_current $(i_var)
Sto#thick_c #thick(#i_current)

sto#xls.name “C:\Users\Besitzer…\results.xlsx”
sto#xls.sheet “$(i_var)”

let#ret xls.write(1,1,#thick_c)
ENDE
+Sys copy $(name).plb $(project).plb
+Sys del $(name).plb

#EndDef run_prog

#Define i_var=0
#Define project=9_$(i_var)
#Include run_prog

#Define i_var=1
#Define project=9_$(i_var)
#Include run_prog

#Define i_var=2
#Define project=9_$(i_var)
#Include run_prog
This works for a single variable with 3 different values.

However, I now have four variables, each with five values.
In each iteration, one value from each variable should be selected.

So technically I need to run:

5 × 5 × 5 × 5 = 625 combinations.

What is the recommended way to define nested iterations for multiple variables in a TEDDY input file without using python or any environment outside of sofistik?

I would appreciate any guidance or example structure for handling multi-parameter studies directly in SOFiSTiK (without Python).

Thank you very much for your help.

Kind regards,
Sanaz

I do parametric studies (up to 3000 systems) in this way:
*) For each system I have a separate dat-file, which defines the name of the database and consists only one line “#include master.dat”. These files can be generated by cmd-files with COPY in an efficient way.
*) The parameters are computed from the name of the database (see example below).
*) I use a batch file to compute these dat-Files: sps.exe ___.dat

If you want to void batch-files you can do this with +SYS as well in a .dat-file.

Example for parameter extraction (e.g. A-12-07-05.cdb):
let#cdb “$(NAME)” $ eg.
let#var1 ‘#cdb(3:4)’ $ => var1 = ‘12’
let#var2 ‘#cdb(6:7)’ $ => var2 = ‘07’
let#var3 ‘#cdb(9:10)’ $ => var3 = ‘05’

Regards
gmay

1 Like