Once you have added a model to the study, it must be defined.
A resource file contains information about the input variables and/or output responses that you are investigating. When you load a resource file, HyperStudy extracts it's input variable and/or output response information. To load a resource file for a model in the Define models table:
The type of file you load in the Resource column will vary depending on the type of model you are defining.
If you are defining an Internal Math model, or if you invoked HyperStudy from another HyperWorks Desktop application, then you do not have to load a resource file.
|
When defining a model, create model resources to reference files called by scripts or to link to result files that were generated by existing models.
|
A Solver Input file is the name of the solver input deck. HyperStudy will create this file for each run from the initial template file, using the current value of the parameters. In HyperStudy, a solver input file is required in order to run the solver. In the Define models step, you can specify what solver input file you would like to run the solver with. To specify a solver input file, enter it in the Solver input file column. You can enter more than one file to the Solver input file field by separating the files with a semi-colon. In such cases, HyperStudy creates the first file from the parameterization and then copies the others files from its original location into the run directory.
|
HyperStudy uses a solver script to run the model. By default, HyperStudy has the following solver codes registered:
You need to register solver scripts in cases where:
You can register solver scripts in HyperStudy or by editing the preference file. For more information on how to register solver script files in HyperStudy, refer to Register Solver Scripts.
|
A Solver input argument is any argument to be passed to the solver. The default argument is $file, which means that the qualified solver input file name is passed to the solver script. Some examples of Solver input arguments are listed below. In these examples, $file refers to the solver file that is passed to the solver script.
Solver input arguments are passed to the solver script as separate arguments. The script then treats them as %1 (first argument) , %2 (second argument), and so on. In the following example, file1.txt is the model file updated by HyperStudy, and file2.txt and file3.txt are additional files needed for the solver (that is include files). Having the three files listed in the Solver input arguments field allows file1.txt to be updated and ensures that all three files are copied into the appropriate folder together. The solver input arguments ensures that $file ( = file1.txt), file2.txt and file3.txt are submitted to the solver script. Below is a sample solver script (.bat file) for this example: echo %1 echo %2 echo %3
Which results in: "C:\TEST\nom_run\m_1\file1.txt" file2.txt file3.txt
It is possible to improve the solver script by using: %1 = full file name passed by HyperStudy to the solver script %~n1 = file name without extension and path %~x1 = file extension
or by using a HyperStudy environment variables such as %STUDY_DIR_PATH% (to get the current path) or %STUDY_RUN_NUMBER% (to get the current run number). For others, see Process Environment Variables. The image below illustrates a Spreadsheet model type with an Excel connection Solver arguments example : In this example, the macro my_VB_script_1 will be executed for each solver run. In the case of the Excel connection, Solver input arguments also recognizes a number of environment variables that can be used to pass information to the VB macro used in the spreadsheet.
Following the previous example, you can pass the name of the current run folder to the macro. my_VB_Script1 $filespec
|
See Also: