emodpy.emod_file module¶
-
class
emodpy.emod_file.
InputFilesList
(relative_path=None)¶ Bases:
idmtools.assets.asset_collection.AssetCollection
-
abstract
set_task_config
(simulation)¶
-
gather_assets
() → List[idmtools.assets.asset.Asset]¶ Gather input files for Input File List
Returns:
-
abstract
-
class
emodpy.emod_file.
MigrationTypes
(value)¶ Bases:
enum.Enum
An enumeration.
-
LOCAL
= 'Local'¶
-
AIR
= 'Air'¶
-
FAMILY
= 'Family'¶
-
REGIONAL
= 'Regional'¶
-
SEA
= 'Sea'¶
-
-
class
emodpy.emod_file.
MigrationModel
(value)¶ Bases:
enum.Enum
An enumeration.
-
NO_MIGRATION
= 'NO_MIGRATION'¶
-
FIXED_RATE_MIGRATION
= 'FIXED_RATE_MIGRATION'¶
-
-
class
emodpy.emod_file.
MigrationPattern
(value)¶ Bases:
enum.Enum
An enumeration.
-
RANDOM_WALK_DIFFUSION
= 'RANDOM_WALK_DIFFUSION'¶
-
SINGLE_ROUND_TRIPS
= 'SINGLE_ROUND_TRIPS'¶
-
WAYPOINTS_HOME
= 'WAYPOINTS_HOME'¶
-
-
class
emodpy.emod_file.
MigrationFiles
(relative_path=None)¶ Bases:
emodpy.emod_file.InputFilesList
-
enable_migration
()¶ Enables migration and sets the pattern if defined. If there are not other other parameters, it also set Enable_Migration_Heterogeneity to 0
-
update_migration_pattern
(migration_pattern: emodpy.emod_file.MigrationPattern, **kwargs) → NoReturn¶ Update migration pattern
- Parameters
migration_pattern – Migration Pattern to use
**kwargs –
- Returns
NoReturn
-
add_migration_from_file
(migration_type: emodpy.emod_file.MigrationTypes, file_path: str, multiplier: float = 1)¶ Add migration info from a file
- Parameters
migration_type – Type of migration
file_path – Path to file
multiplier – Multiplier
Returns:
-
set_task_config
(task: EMODTask)¶ Update the task with the migration configuration
- Parameters
task – Task to update
Returns:
-
gather_assets
()¶ Gather assets for Migration files. Called by EMODTask Returns:
-
set_all_persisted
()¶ Set akk migration assets as persisted
Returns:
-
merge_with
(mf: emodpy.emod_file.MigrationFiles, left_precedence: bool = True) → NoReturn¶ Merge migration file with other Migration file
- Parameters
mf – Other migration file to merge with
left_precedence – Does the current object have precedence or the other object?
Returns:
-
read_config_file
(config_path, asset_path)¶ Try to recreate the migration based on a given config file and an asset path :param config_path: path to the config :param asset_path: path containing the assets
-
-
class
emodpy.emod_file.
DemographicsFiles
(relative_path=None)¶ Bases:
emodpy.emod_file.InputFilesList
-
set_task_config
(task: EMODTask, extend: bool = False)¶ Set the simulation level config. If extend is true, the demographics files are appended to the list :param task: :param extend:
Returns:
-
-
class
emodpy.emod_file.
ClimateFileType
(value)¶ Bases:
enum.Enum
An enumeration.
-
AIR_TEMPERATURE
= 'Air_Temperature'¶
-
LAND_TEMPERATURE
= 'Land_Temperature'¶
-
RELATIVE_HUMIDITY
= 'Relative_Humidity'¶
-
RAINFALL
= 'Rainfall'¶
-
-
class
emodpy.emod_file.
ClimateModel
(value)¶ Bases:
enum.Enum
An enumeration.
-
CLIMATE_OFF
= 'CLIMATE_OFF'¶
-
CLIMATE_CONSTANT
= 'CLIMATE_CONSTANT'¶
-
CLIMATE_KOPPEN
= 'CLIMATE_KOPPEN'¶
-
CLIMATE_BY_DATA
= 'CLIMATE_BY_DATA'¶
-
-
class
emodpy.emod_file.
ClimateFiles
¶ Bases:
emodpy.emod_file.InputFilesList
-
set_task_config
(task: EMODTask)¶ Set the task Config. Set all the correct files for the climate.
- Parameters
task – Task to config
-
add_climate_files
(file_type, file_path)¶
-
gather_assets
()¶ Gather assets for Climate files. Called by EMODTask
-
set_climate_constant
(Base_Air_Temperature, Base_Rainfall, Base_Land_Temperature=None, Base_Relative_Humidity=None)¶
-
read_config_file
(config_path, asset_path)¶ Try to recreate the climate based on a given config file and an asset path :param config_path: path to the config :param asset_path: path containing the assets
-