4.2 Saving power and energy results separately
Saved Data objective allows saving power and energy results separately in each dense medium. A set of results are saved in an automatic way in each step of Grid Search.
Open Configure Optimiser dialogue.
Pressing the Add… button invokes Add Objective dialogue for adding a new objective.
Choose Saved Data objective.
Pressing the Configure… button invokes Breakpoints dialogue for configuring Breakpoints.
Pressing the Add… button invokes Add Breakpoint dialogue for adding Breakpoint.
Choose Save Pdiss Energy QF ReIm Media breakpoint from the list. Press Power Settings button. The Save Power & Q (ReIm, Media) dialogue will appear (see Save Power and Q (ReIm, Media) chapter for more information).
Pressing the Media… button invokes Dense Media dialogue for choosing media.
Select media from the list and press OK button.
Select Separate Media option in the Save Power & Q (ReIm, Media) dialogue. It will cause that this breakpoint will be executed for each medium separately. Iterations parameter is irrelevant – it will be set automatically to cover all iterations for simulation.
Set Points Nb parameter to value equals to number of points of curve that we expect to receive from an external program. This curve will be a subject to optimisation.
Set the External Progam in the Preferences tab in the Configure Optimiser dialogue.
For each step of Grid Search, the Save Pdiss Energy QF ReIm Media breakpoint will be expanded into a number (number of selected media) of Save Pdiss Energy QF ReIm Media tasks.
Each of these tasks will start at 1st simulation iteration and will save the results to the QuickWave *.pq3 file at the end of each simulation. In this case (4 media) there will be 4 files after each step of Grid Search:
horn3_1_2_Re_mediumdens1.pq3
horn3_1_2_Re_mediumdens2.pq3
horn3_1_2_Re_mediumdens3.pq3
horn3_1_2_Re_mediumdens4.pq3
The filenames of *.pq3 files are assigned based on the following rules:
1. horn3 – name of the project
2. <number> – OPI objective number (1 above)
3. <number> – Grid Search loop step number (2 above)
4. Re – grid type according to choice in the Save Power & Q (ReIm, Media) dialogue
5. mediumdens1 – name of the particular medium
The metadata *.pqm file will be also created and it contains the list of all *.pq3 files from the current Grid Search step. I.e. the horn3_1_2_Re_metadata.pqm file will contain:
! QuickWave Metadata File
! Wed Mar 13 18:54:51 2020
! Program version v2020:2020.02.13 HN64,OMP
horn3_1_2_Re_mediumdens3.pq3
horn3_1_2_Re_mediumdens4.pq3
horn3_1_2_Re_mediumdens1.pq3
horn3_1_2_Re_mediumdens2.pq3
The filenames of *.pqm metadata files are assigned based on following rules:
1. horn3 – name of the project
2. <number> – OPI objective number (1 above)
3. <number> – Grid Search loop step number (2 above)
4. Re – grid type according to choice in the Save Power & Q (ReIm, Media) dialogue
5. metadata – ‘metadata’ suffux
The metadata *.pqm file is sent as an argument to the external program:
"D:/Work/program.exe" 4 "W:/Horn3/horn3_opi_1.opi" "W:/Horn3/horn3_1_2_Re_metadata.pqm"
The arguments for the external program are:
4 – number of points (equals to number of selected media) we expect as an answer from the external program
"W:/Horn3/horn3_opi_1.opi" – name of file with answer from the external program
"W:/Horn3/horn3_1_2_Re_metadata.pqm" – metadata filename
The file with the answer (4 points here) from the external program should have format as follow (columns are separated by space):
1 1.1
2 2.2
3 2.5
4 1.4