-
Notifications
You must be signed in to change notification settings - Fork 32
Reusing Post Hoc Edited Solve Files
Erik A. Roberts edited this page Feb 1, 2019
·
4 revisions
Sometimes it is desirable to manually inject code into a solve file after it has been automatically created. One would then reuse this file for different simulation runs by copying the solve folder from the old study_dir to the new one. In most cases, it is best to automatically create the new study_dir, and combine elements from its solve file with the old solve file according to the tips below.
- Use a new
studyinfo.matfile to avoid sim files being saved in the oldstudy_dir. - Use a new
param.matfile - Copy over the first line of the solve file in case the arguments changed
- If using
one_solve_file_flag- Make a new solve file automatically first and halt execution after the solve file is made before simulation.
- Use the new lines at the beginning of the solve file that replace values in struct
pfrompVecs
- Use the new lines at the beginning of the solve file that replace values in struct
- The old solve file will have a suffix with the number of sims. This should be modified to fit the new number of sims. Also change the comment inside the file with the number of sims.
- If using 'mex_flag', make a new mex file for each set of simulations with a different number of sims from the vary.
- Make a new solve file automatically first and halt execution after the solve file is made before simulation.