This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
optim:userguide [2019/06/19 13:44] helene |
optim:userguide [2022/05/27 10:05] (current) helene [Activation of Lagamine Inverse] |
||
---|---|---|---|
Line 1: | Line 1: | ||
====== Optim user guide ====== | ====== Optim user guide ====== | ||
+ | |||
---- | ---- | ||
Line 13: | Line 14: | ||
==== Activation of Lagamine Inverse ==== | ==== Activation of Lagamine Inverse ==== | ||
- | In the *ex.dat file, the parameter IOPT (ninth parameter on the first line) must be set to 1 to activate the Lagamine Inverse simulation. It is also necessary to indicate an IDENT (5th parameter of first line) that allows the user to specify his curve in INVA.F and WSENSM.F (see <imgref image1>). | + | In the *ex.dat file, the parameter IOPT (ninth parameter on the first line) must be set to 1 to activate the Lagamine Inverse simulation. It is also necessary to indicate an IDENT (5th parameter of first line) that allows the user to specify his curve in INVA.F and WSENSM.F (see <imgref image1>). For the list of existing IDENT, see [[optim:ident|this page]]. |
<imgcaption image1|Example of *ex.dat file with activation of Lagamine Inverse>{{ :optim:optim_laginv1.png?600 |}}</imgcaption> | <imgcaption image1|Example of *ex.dat file with activation of Lagamine Inverse>{{ :optim:optim_laginv1.png?600 |}}</imgcaption> | ||
Line 80: | Line 81: | ||
* Main input for Optim *.info. | * Main input for Optim *.info. | ||
+ | The structure of these files is detailed in the [[optim:files|File]] section of this manual. | ||
+ | |||
+ | ---- | ||
+ | |||
+ | ==== Structure of the code ==== | ||
+ | The code Optim is structured in several subroutines: | ||
+ | * Main_levenberg: reading of files *.ia, *.op, *.exp and *.info + initialization of variables; | ||
+ | * pre_optim: initialization of optimization parameters; | ||
+ | * algo_leven: Levenberg-Marquardt algorithm; | ||
+ | * fcn: execution of Lagamine Inverse simulation, interpolation of the curves at points i=1,NPOI, computation of fvec vector containing the residuals at each point; | ||
+ | * fdjac: interpolation of the derivatives and computation of matrix fdjac containing the derivative of the curves at points i. | ||
+ | |||
+ | The algorithm can be summed up as follows: | ||
+ | * **MAIN_LEVENBERG** \\ Read *.info file, *.exp file, *.op file \\ Run prepro \\ Initialize variables and allocate memory \\ Call PRE_OPTIM | ||
+ | * **PRE_OPTIM** \\ Check input parameters \\ Initialize Optim parameters \\ Call ALGO_LEVEN | ||
+ | * **ALGO_LEVEN** \\ Check input parameters \\ Call: | ||
+ | * **FCN** \\ Launch Lagamine simulation \\ Read *.sm file \\ Compute EF and REF curves | ||
+ | * **ENORM** \\ Compute the norm (objective function) | ||
+ | * **FDJAC** \\ Compute sensitivity matrix (Jacobian) from *.sm file | ||
+ | * **QRFAC** \\ QR factorization of the Jacobian | ||
+ | * **LMPAR** \\ Determine Levenberg-Marcquardt parameters | ||
+ | * Check for convergence \\ If no -> loop \\ If yes -> end | ||
+ | |||
+ | ---- | ||
+ | ==== Files used by Optim ==== | ||
+ | ^Type^Unit^Description^ | ||
+ | |.exp|1|Experimental (reference) curve| | ||
+ | |.info.FPA|2|Recording of every optimization step (parameters + norm)| | ||
+ | |.fd|8|Result from Lagamine Inverse| | ||
+ | |NFEV.fd|9|Result from Lagamine Inverse at iteration NFEV| | ||
+ | |.sm|10|Result from Lagamine Inverse| | ||
+ | |ex.dat|11|Loading file for Lagamine| | ||
+ | |FCT_OBJECTIF.OPT|12|Result file| | ||
+ | |.op|13|Parameters to be optimized| | ||
+ | |.ia|20|Input data for Lagamine Inverse| | ||
+ | |.info|78|Input data for the optimization| | ||
+ | |fvec.vm|88|Record difference between EF curve and REF curve| | ||
+ | ==== Results and output files ==== | ||
+ | During the optimization, the intermediary results are printed out in the console window as well as in the *info.FPA file. \\ When the objective function is reduced, the result and the corresponding parameters are written in the FCT_OBJECTIF.OPT file. |