armi.settings package

Settings are various key-value pairs that determine a bunch of modeling and simulation behaviors.

They are one of the key inputs to an ARMI run. They say which modules to run and which modeling approximations to apply and how many cycles to run and at what power and availability fraction and things like that. The ARMI Framework itself has many settings of its own, and plugins typically register some of their own settings as well.

armi.settings.isBoolSetting(setting: armi.settings.setting.Setting) bool[source]

Return whether the passed setting represents a boolean value.

armi.settings.recursivelyLoadSettingsFiles(rootDir, patterns: List[str], recursive=True, ignorePatterns: Optional[List[str]] = None, handleInvalids=True)[source]

Scans path for valid xml files and returns their paths.

Parameters
  • rootDir (str) – The base path to scan for settings files

  • patterns (list) – file patterns to match file names

  • recursive (bool (optional)) – load files recursively

  • ignorePatterns (list (optional)) – list of filename patterns to ignore

  • handleInvalids (bool) – option to suppress errors generated when finding files that appear to be settings files but fail to load. This may happen when old settings are present.

Returns

csFiles – list of Settings objects.

Return type

list

armi.settings.promptForSettingsFile(choice=None)[source]

Allows the user to select an ARMI input from the input files in the directory

Parameters

choice (int, optional) – The item in the list of valid XML files to load

armi.settings.getMasterCs()[source]

Return the global case-settings object (cs).

This can be called at any time to create or obtain the master Cs, a module-level CS intended to be shared by many other objects.

It can have multiple instances in multiprocessing cases.

Returns

cs – The loaded cs object

Return type

Settings

armi.settings.setMasterCs(cs)[source]

Set the master Cs to be the one that is passed in.

These are kept track of independently on a PID basis to allow independent multiprocessing.

armi.settings.convertSettingsFromXMLToYaml(cs)[source]