MarcLavielle / mlxR

mlxR
Other
18 stars 5 forks source link

mlxR::getMlxLibraryPath #21

Closed fabern closed 5 years ago

fabern commented 5 years ago

Is there some function to get the currently defined MlxLibraryPath ? I.e. a "get"-pendant to the exissting setMlxLibraryPath() ?

If not, would it be possible to add this? In view of recent updates to Monolix it would be great for reproducibility to be able to easily record the MlxLibrary with which an mlxR simulation was performed.

Thanks and best regards, Fabian

fabern commented 5 years ago

Since v.4.0.0 (Monolix2019) mlxR relies on lixoftConnectors to communicate with the Monolix calculation engine.

To get the current state use: lixoftConnectors::getLixoftConnectorsState()

By default mlxR uses the path defined in the lixoft.ini file (on Windows by default in C:\Users\xxx\lixoft\lixoft.ini). To manually override lixoft.ini one can use mlxR::initMlxR(path = "C:/ProgramData/Lixoft/MonolixSuite2019R1/")

fabern commented 5 years ago

lixoftConnectors::getLixoftConnectorsState() does not work if mlxR is initialized manually with 2016R1 or 2018R1. I believe this is linked to the fact that mlxR does not use lixoftConnectors in these cases.

A workaround to get the current state of mlxR seems to be: get("LIXOFT_DIRECTORY", envir = mlxR:::mlxREnvironment). Note that mlxR needs to have been initialized, so that the variable mlxR:::mlxREnvironment exists.