Module to easily load pickled parameters (e.g. used in a parameter study) to set properties in a simulation object

In order to be able to use this module import it like this:

#or assign it to a shorter name
import as loa, fname='./params.pickle', createNonExisting=True, ignoreNonExisting=False)

Load a file with name ‘fname’ and set matching properties in a simulation object ‘sim’ with the dictionary entries

  • sim – Mpacts simulation tree into which the parameters should be loaded
  • fname (str) – Name of the pickle file in which the parameters are stored
  • createNonExisting (bool) – If ‘True’, non-existing parameters will be created as Variable type tree elements
  • ignoreNonExisting (bool) – If ‘True’ and createNonExisting is ‘False’, non-existing parameters will simply be ignored. If ‘False’ and createNonExisting is ‘False’, an exception will be raised

Open a file with name ‘fname’ and return the unpickled dictionary