Show Objectives and Design variables

Plot the 3D geometry of wedges and end-spacers

Download Input files

Setting up

Standard Loading of input, Parsing and Initializing RoxiePlotOutputs object

from roxieapi.output.plots import RoxiePlotOutputs

plots = RoxiePlotOutputs(
    "../input_files/dipole_iron_trans_opt.post.xml",
    "../input_files/dipole_iron_trans_opt.data",
)

Show Design variables

for idx, opt in plots.output.opt.items():
    print(f"Optimization step nr {idx}:")
    plots.output_design_variables(1)
Optimization step nr 1:
   nr  value name  act_on blocks
0   1   20.0  PHI       2    [2]
1   2   45.0  PHI       2    [5]
2   3   64.0  PHI       2    [6]
Optimization step nr 2:
   nr  value name  act_on blocks
0   1   20.0  PHI       2    [2]
1   2   45.0  PHI       2    [5]
2   3   64.0  PHI       2    [6]
Optimization step nr 3:
   nr  value name  act_on blocks
0   1   20.0  PHI       2    [2]
1   2   45.0  PHI       2    [5]
2   3   64.0  PHI       2    [6]
Optimization step nr 4:
   nr  value name  act_on blocks
0   1   20.0  PHI       2    [2]
1   2   45.0  PHI       2    [5]
2   3   64.0  PHI       2    [6]
Optimization step nr 5:
   nr  value name  act_on blocks
0   1   20.0  PHI       2    [2]
1   2   45.0  PHI       2    [5]
2   3   64.0  PHI       2    [6]
Optimization step nr 6:
   nr  value name  act_on blocks
0   1   20.0  PHI       2    [2]
1   2   45.0  PHI       2    [5]
2   3   64.0  PHI       2    [6]
Optimization step nr 7:
   nr  value name  act_on blocks
0   1   20.0  PHI       2    [2]
1   2   45.0  PHI       2    [5]
2   3   64.0  PHI       2    [6]
Optimization step nr 8:
   nr  value name  act_on blocks
0   1   20.0  PHI       2    [2]
1   2   45.0  PHI       2    [5]
2   3   64.0  PHI       2    [6]

Show Objectives

plots.output_objective_results(1)
   nr        value  raw_value obj_name  obj_p1  obj_p2
0   1   903.204871  30.053367        B       3       1
1   2  1162.823638 -15.250073        B       5       1
2   3    95.603448   3.091981        B       7       1

Retreive tables as pandas Dataframe

output = plots.output
input = plots.input

dv = plots.tables.print_design_variables(output.opt[1].designVariables, input.design)
obj = plots.tables.print_objective_results(
    output.opt[1].objectiveResults, input.objective
)

Design variable table

dv
nr value name act_on blocks
0 1 20.0 PHI 2 [2]
1 2 45.0 PHI 2 [5]
2 3 64.0 PHI 2 [6]


Objectives table

obj
nr value raw_value obj_name obj_p1 obj_p2
0 1 903.204871 30.053367 B 3 1
1 2 1162.823638 -15.250073 B 5 1
2 3 95.603448 3.091981 B 7 1


Total running time of the script: (0 minutes 1.267 seconds)

Gallery generated by Sphinx-Gallery