Register External Fits
To use HyperStudy with a custom Python fit, it must be registered.
Register user utilities in HyperStudy or by editing the
preferences file.
Register External Fits in HyperStudy
- From the menu bar, click .
-
Add an external fit.
- Click Add External Fit.
- In the Add dialog, enter a label for the Fit and click OK.
- In the Path column, enter the location of the external fit to be registered.
- Click Close to exit the external fit registration.
Register External Fits by Editing the Preferences File
Register external optimizers in the *BeginExternalFitDefaults() section of the preferences_study.mvw file.
-
In the text editor, open the preferences_study.mvw
file.
You can find the preferences_study.mvw file in the HyperWorks installation directory under <install directory>/hw/prefinc/.
- Search for the syntax *BeginExternalFitDefaults().
-
Immediately following any existing *RegisterExternalFit
statements, register further external optimizers using the following
syntax:
where*RegisterExternalFit(fit_name,fit_script)
- fit_name
- Unique name for the fit, enclosed in parenthesis.
- fit_script
- Full path of the external fit Python file, including file name and extension.
- Save the preferences_study.mvw file.
Register myfit.py in the Preferences File
In this example, the myfit.py executable is added to the list of registered external fits.
*BeginExternalFitDefaults()
*RegisterExternalFit(“myFit”, "C:/My_SQPOptimizer/myfit.py")
*EndExternalFitDefaults()