Step 3 — CSV as a decision table
*CFOPEN,m09_results,csv
*VWRITE
('case_id,beam_h,...,validation_pass,feasible')
*DO,i,1,n_cases
*VWRITE,i,h_store(i),...,val_pass_store(i),feasible_store(i)
*ENDDO
*CFCLOSOnly the driver writes the CSV. If each submacro writes its own file, the last iteration overwrites the preceding ones and the selection loses its meaning.
Step 4 — Select the smallest suitable design
selected_case=0
selected_h=0
*DO,i,1,n_cases
*IF,feasible_store(i),EQ,1,THEN
*IF,selected_case,EQ,0,THEN
selected_case=i
selected_h=h_store(i)
*ELSE
*IF,h_store(i),LT,selected_h,THEN
selected_case=i
selected_h=h_store(i)
*ENDIF
*ENDIF
*ENDIF
*ENDDOFor the base sweep, the expected selection is selected_case=3, selected_h=0.12 m. Also check the trend: |uy(i+1)| < |uy(i)| as height increases.