Hello,
Here is an example describing how to use the Python API of Persalys in order to automatically launch analyses.
One may have several analyses to launch and each analysis is time consuming so it could be nice to launch everything overnight. The problem is that Persalys does not have the possibility to define a list of analysis to be executed one after the other.
However it is possible to use the Python API of Persalys to get the current available analyses of a study and then run the desired analysis.
In the following minimal example, several analyses are defined but not evaluated:
The following code can be copied in the Persalys console to launch automatically all selected analyses (by names):
import persalys
# get the first study opened in Persalys (to be modified if several studies exist in Persalys)
study = persalys.Study.GetInstances()[0]
# Name of the analyses (must match the names in Persalys)
analysis_name_list = ['optimisation_0', 'screening_0', 'sensitivity_0', 'optimisation_1']
# launch the analyses in a for loop
for analysis_name in analysis_name_list:
analysis = study.getAnalysisByName(analysis_name)
analysis.run()
I hope this could be useful in your study !
Regards,
Antoine