File tree Expand file tree Collapse file tree 1 file changed +4
-6
lines changed Expand file tree Collapse file tree 1 file changed +4
-6
lines changed Original file line number Diff line number Diff line change @@ -716,16 +716,14 @@ def harm2(output):
716716 out2 = [pm ["output" ], pm ["fitness" ]]
717717
718718 # Rename machine to modify the title
719- out1 [
720- 0
721- ].simu .machine .name = "Machine that maximizes the average torque ({:.3f} Nm)" .format (
719+ name1 = "Machine that maximizes the average torque ({:.3f} Nm)" .format (
722720 abs (out1 [1 ][0 ])
723721 )
724- out2 [
725- 0
726- ].simu .machine .name = "Machine that minimizes the first torque harmonic ({:.4f}Nm)" .format (
722+ out1 [0 ].simu .machine .name = name1
723+ name2 = "Machine that minimizes the first torque harmonic ({:.4f}Nm)" .format (
727724 abs (out1 [1 ][1 ])
728725 )
726+ out2 [0 ].simu .machine .name = name2
729727
730728 # plot the machine
731729 out1 [0 ].simu .machine .plot ()
You can’t perform that action at this time.
0 commit comments