ExcelCoreModel(wd, model_file, configuration: Optional[Union[str, Mapping]] = None, scope: Optional[Union[emat.scope.scope.Scope, str]] = None, safe: bool = True, db: Optional[emat.database.database.Database] = None, name: str = 'EMAT', metamodel_id=None)¶
Interface class for a core model in Excel.
- wd (Path-like) – The working directory for the excel model. This should be the directory in which the model resides. Any supplementary data files required for the excel model should also be in this directory, and these files should be linked using only relative paths. No other files should appear in this directory, as the entire directory will (potentially) be replicated multiple times during model execution.
- model_file (str) – The file name of the excel model. A file by this name should appear in wd.
- configuration (str, dict, or None) – The configuration for this core model. This can be passed as a dict, or as a str which gives the filename of a yaml file that will be loaded.
- scope (Scope or str) – The Scope for this exploratory analysis. Can be given as an explicit Scope object, or as a str which gives the filename of a yaml file that will be loaded.
- safe (bool) – Load the configuration yaml file in ‘safe’ mode. This can be disabled if the configuration requires custom Python types or is otherwise not compatible with safe mode. Loading configuration files with safe mode off is not secure and should not be done with files from untrusted sources.
- db (Database) – An optional Database to store experiments and results.
- name (str) – A name for this model, given as an alphanumeric string. The name is required by ema_workbench operations. If not given, the name of the function is extracted, or failing that, “EMAT” is used.
- metamodel_id – An identifier for this model, if it is a meta-model. Defaults to 0 (i.e., not a meta-model).
Excel models are only available on the Windows operating system. Although Excel is also available on other operating systems (i.e., macOS) the necessary automated control API in Python is only available on Windows.
It is also important to note that Excel-based models are processed including the entire working directory given by the wd argument in the constructor, not just based on an Excel workbook in isolation.