accim package
Subpackages
- accim.data package
- accim.parametric_and_optimisation package
- Subpackages
- Submodules
- accim.parametric_and_optimisation.main module
AccimPredefModelsParamSimOptimParamSimulationOptimParamSimulation.get_available_parameters()OptimParamSimulation.get_hourly_df()OptimParamSimulation.get_hourly_df_columns()OptimParamSimulation.get_output_meter_df_from_idf()OptimParamSimulation.get_output_var_df_from_idf()OptimParamSimulation.get_outputs_df_from_testsim()OptimParamSimulation.run_optimisation()OptimParamSimulation.run_parametric_simulation()OptimParamSimulation.sampling_full_factorial()OptimParamSimulation.sampling_full_set()OptimParamSimulation.sampling_lhs()OptimParamSimulation.set_evaluator()OptimParamSimulation.set_output_met_objects_to_idf()OptimParamSimulation.set_output_var_df_to_idf()OptimParamSimulation.set_outputs_for_simulation()OptimParamSimulation.set_parameters()OptimParamSimulation.set_problem()
get_mdd_file_as_df()get_rdd_file_as_df()parse_mtd_file()
- accim.parametric_and_optimisation.objectives module
- accim.parametric_and_optimisation.parameters module
ASTtolCATCATcoolOffsetCATheatOffsetComfModComfStandCoolSeasonEndCoolSeasonStartCustAST_ACSTallCustAST_ACSTaulCustAST_ACSToffsetCustAST_AHSTallCustAST_AHSTaulCustAST_AHSToffsetCustAST_ASTallCustAST_ASTaulCustAST_ASToffsetCustAST_mCustAST_nHVACmodeMaxTempDiffVOFMaxWindSpeedMinOToffsetMinTempDiffVOFMultiplierVOFParameterSetpointAccVSToffsetVentCtrlaccis_parameter()get_available_params_accim_custom_models()get_available_params_accim_predef_models()get_available_params_apmv_setpoints()
- accim.parametric_and_optimisation.params_dicts module
- accim.parametric_and_optimisation.utils module
- Module contents
- accim.run package
- accim.sim package
- Submodules
- accim.sim.accim_Base module
- accim.sim.accim_Base_EMS module
addEMSActuatorsBase()addEMSOutputVariableBase()addEMSPCMBase()addEMSProgramsBase()addEMSSensorsBase()addGlobVarList()addIntVarList()addOutputVariablesDetailed()addOutputVariablesSimplified()addOutputVariablesStandard()genOutputDataframe()makeAverages()outputsSpecified()removeDuplicatedOutputVariables()removeExistingOutputVariables()takeOutputDataFrame()
- accim.sim.accim_ExistingHVAC module
- accim.sim.accim_ExistingHVAC_EMS module
- accim.sim.accim_IDFgeneration module
- accim.sim.accim_Main module
accimJobaccimJob.addBaseSchedules()accimJob.addControlFilesObjects()accimJob.addCurveObj()accimJob.addDetHVACobj()accimJob.addEMSActuatorsBase()accimJob.addEMSOutputVariableBase()accimJob.addEMSPCMBase()accimJob.addEMSProgramsBase()accimJob.addEMSSensorsBase()accimJob.addEMSSensorsExisHVAC()accimJob.addEMSSensorsVRFsystem()accimJob.addForscriptSchExistHVAC()accimJob.addForscriptSchVRFsystem()accimJob.addGlobVarList()accimJob.addIntVarList()accimJob.addOpTempTherm()accimJob.addOutputEnergyManagementSystem()accimJob.addOutputVariableDictionaryObject()accimJob.addOutputVariablesDetailed()accimJob.addOutputVariablesSimplified()accimJob.addOutputVariablesStandard()accimJob.addVRFsystemSch()accimJob.amend_idf_version_from_dsb()accimJob.checkVentIsOn()accimJob.genIDF()accimJob.genOutputDataframe()accimJob.get_idd_path_from_ep_version()accimJob.inputData()accimJob.listdir()accimJob.makeAverages()accimJob.numpyaccimJob.outputsSpecified()accimJob.removeDuplicatedOutputVariables()accimJob.removeExistingOutputVariables()accimJob.saveaccim()accimJob.scan_zones()accimJob.setAvailSchOn()accimJob.setComfFieldsPeople()accimJob.setPMVsetpoint()accimJob.takeOutputDataFrame()
- accim.sim.accim_Main_single_idf module
accimJobaccimJob.addBaseSchedules()accimJob.addControlFilesObjects()accimJob.addCurveObj()accimJob.addDetHVACobj()accimJob.addEMSActuatorsBase()accimJob.addEMSOutputVariableBase()accimJob.addEMSPCMBase()accimJob.addEMSProgramsBase()accimJob.addEMSSensorsBase()accimJob.addEMSSensorsExisHVAC()accimJob.addEMSSensorsVRFsystem()accimJob.addForscriptSchExistHVAC()accimJob.addForscriptSchVRFsystem()accimJob.addGlobVarList()accimJob.addIntVarList()accimJob.addOpTempTherm()accimJob.addOutputEnergyManagementSystem()accimJob.addOutputVariableDictionaryObject()accimJob.addOutputVariablesDetailed()accimJob.addOutputVariablesSimplified()accimJob.addOutputVariablesStandard()accimJob.addVRFsystemSch()accimJob.checkVentIsOn()accimJob.genOutputDataframe()accimJob.listdir()accimJob.makeAverages()accimJob.numpyaccimJob.outputsSpecified()accimJob.removeDuplicatedOutputVariables()accimJob.removeExistingOutputVariables()accimJob.saveaccim()accimJob.scan_zones()accimJob.setAvailSchOn()accimJob.setComfFieldsPeople()accimJob.setPMVsetpoint()accimJob.takeOutputDataFrame()
- accim.sim.accim_VRFsystem module
- accim.sim.accim_VRFsystem_EMS module
- accim.sim.accis module
- accim.sim.accis_single_idf module
- accim.sim.accis_single_idf_funcs module
- accim.sim.apmv_setpoints module
- accim.sim.chile_funcs module
- accim.sim.dicts module
- accim.sim.lists module
- accim.sim.utils module
- Module contents
Submodules
accim.lists module
Lists to be used in the whole project.
accim.utils module
- accim.utils.amend_idf_version_from_dsb(file_path: str)[source]
Amends the idf version of the Designbuilder-sourced idf file, for Designbuilder v7.X. Replaces the string ‘Version, 9.4.0.002’ with ‘Version, 9.4’.
- Parameters:
idf_path (str) – the path to the idf
- accim.utils.convert_standard_to_comfort_thermostats(idf: IDF, pmv_heating_schedule_name: str, pmv_cooling_schedule_name: str, comfort_control_type_schedule_name: str) List[str][source]
Maps and substitutes standard DualSetpoint thermostats with Thermal Comfort Fanger thermostats.
- Parameters:
idf (besos.IDF_class.IDF) – The BESOS IDF model object.
pmv_heating_schedule_name (str) – Name of the Schedule defining the PMV lower limit for heating.
pmv_cooling_schedule_name (str) – Name of the Schedule defining the PMV upper limit for cooling.
comfort_control_type_schedule_name (str) – Name of the Schedule that defines the control type.
- Returns:
A list of Zone names that were successfully converted.
- Return type:
List[str]
- accim.utils.get_accim_args(idf_object: <module 'besos.IDF_class' from '/home/docs/checkouts/readthedocs.org/user_builds/accim/envs/v0.7.6/lib/python3.9/site-packages/besos/IDF_class.py'>) dict[source]
Collects all the EnergyManagementSystem:Program Program lines used to set the values for the arguments of ACCIS, and saves them in a dictionary.
- Parameters:
idf_object – the besos.IDF_class instance
- Returns:
a dictionary
- accim.utils.get_available_fields(idf_instance: IDF, object_name: str, source: Literal['idd', 'idf'] = 'idd', separator: str = '_') List[str][source]
Retrieves the available fields for an EnergyPlus object using an eppy IDF instance. It automatically removes colons (‘:’) from field names.
- Parameters:
idf_instance (IDF) – The eppy IDF class instance (e.g., from besos.get_building()).
object_name (str) – The type of the object (e.g., ‘Zone’, ‘Material’).
source (str, optional) – The source of the field definitions. - ‘idd’: (Default) Extracts the full schema from the EnergyPlus dictionary. - ‘idf’: Extracts fields from the first existing instance in the model.
separator (str, optional) – Character to replace spaces with. Default is ‘_’. If “ “ is passed, the original spaces are kept.
- Returns:
A list of formatted field names. Returns an empty list if an error occurs.
- Return type:
List[str]
- Raises:
ValueError – If ‘source’ is not ‘idd’ or ‘idf’.
- accim.utils.get_idf_hierarchy(idf: <module 'besos.IDF_class' from '/home/docs/checkouts/readthedocs.org/user_builds/accim/envs/v0.7.6/lib/python3.9/site-packages/besos/IDF_class.py'>) Dict[str, Any][source]
Parses an EnergyPlus IDF model object (from eppy or besos) to extract the hierarchical relationship between Zones and Spaces, as well as grouping lists.
This function is designed to be Case-Preserving for output keys (keeping the original IDF capitalization) while remaining Case-Insensitive for internal logic (robustly linking Spaces to Zones regardless of capitalization).
- Parameters:
idf (Union[IDF, IDF_class]) – The IDF model object to be parsed. Accepts both eppy’s IDF and besos’s IDF_class.
- Returns:
- A dictionary representing the model structure:
- {
- “zones”: {
- “ZoneName_Original”: {
“object_type”: “Zone”, “spaces”: [“Space1”, “Space2”]
}, “groups”: {
”zone_lists”: { “ListName”: [“Zone1”, “Zone2”] }, “space_lists”: { “ListName”: [“Space1”, “Space2”] }
}
}
- Return type:
Dict[str, Any]
- accim.utils.get_idf_hierarchy_with_people(idf: IDF) Dict[str, Any][source]
Parses an EnergyPlus IDF model to extract the hierarchy of Zones and Spaces.
Structure changes in this version: - ‘spaces’ is a list of dictionaries. - Each space dictionary contains:
“name”: The name of the space (str).
“people”: The name of the associated People object (str) or None.
The function resolves the ‘People’ object assignment regardless of whether it is assigned to a Space, a Zone, a SpaceList, or a ZoneList.
- Parameters:
idf (besos.IDF_class.IDF) – The BESOS IDF model object.
- Returns:
- Structure:
- {
- “zones”: {
- “ZoneName”: {
“object_type”: “Zone”, “spaces”: [
- {
“name”: “SpaceName”, “people”: “PeopleObjectName” (or None)
]
}
}, “groups”: { … }
}
- Return type:
Dict[str, Any]
- accim.utils.get_people_hierarchy(idf: IDF) Dict[str, Any][source]
Extracts the relationship between People objects and the physical Spaces they occupy.
Since a ‘People’ object can reference a Zone, a ZoneList, a Space, or a SpaceList, this function resolves all these references down to a list of specific Space names.
- Parameters:
idf (Union[IDF, IDF_class]) – The IDF model object.
- Returns:
- A dictionary where keys are People object names and values
contain the target reference and the resolved list of spaces. Example: {
- ”Residential Living Occupants”: {
“target_ref”: “Residential - Living Space”, “target_type”: “SpaceList”, (inferred) “affected_spaces”: [“Floor_1”, “Floor_2”]
}
}
- Return type:
Dict[str, Any]
- accim.utils.get_people_names_for_ems(idf: IDF, output_format: str = 'list') List[str] | Dict[str, List[str]][source]
Generates unique instance names for People objects applied to spaces.
Naming Pattern: “{SpaceName} {PeopleName}” Example: “Floor_1 Residential Living Occupants”
- Parameters:
idf (besos.IDF_class.IDF) – The BESOS IDF model object.
output_format (str) – Controls the structure of the return value. - ‘list’ (Default): Returns a flat list of all generated names. - ‘dict’: Returns a dictionary {PeopleName: [GeneratedNames]}.
- Returns:
A flat list or a dictionary depending on output_format.
- Return type:
Union[List[str], Dict[str, List[str]]]
- accim.utils.get_spaces_from_spacelist(idf: IDF, spacelist_name: str) List[str][source]
Retrieves the list of Space names belonging to a specific SpaceList object.
Performs a case-insensitive search for the SpaceList name to ensure robustness.
- Parameters:
idf (Union[IDF, IDF_class]) – The IDF model object.
spacelist_name (str) – The name of the SpaceList to query (e.g. “Residential - Living Space”).
- Returns:
- A list of space names contained in that SpaceList.
Returns an empty list [] if the SpaceList is not found.
- Return type:
List[str]
- accim.utils.identify_variable_key_pattern(idf_path: str, variable_name: str, epw_path: str, eplus_install_dir: str | None = None) str[source]
Identifies the naming pattern (Key Index) used by EnergyPlus for a specific Report Variable.
This function performs a quick simulation to generate the .eso output file, extracts the actual ‘Key Value’ (Area) generated by EnergyPlus, and compares it against the IDF objects to determine the naming convention.
It uses a two-level search strategy: 1. Direct Object Match: Checks the first field of every object in the IDF (obj.obj[1])
to see if it matches the ESO Key. This handles systems like VRF, Boilers, Chillers, etc.
Hierarchy Match: If no direct object is found, it analyzes the Zone/Space/People hierarchy to detect composite patterns (e.g., ‘[Space Name] [People Name]’).
- Parameters:
idf_path – Path to the input .idf file.
variable_name – The name of the Output:Variable to analyze (e.g., ‘VRF Heat Pump Cooling Electricity Energy’).
epw_path – Path to the weather file (.epw) required for simulation.
eplus_install_dir – (Optional) Path to the EnergyPlus installation directory.
- Returns:
A string representing the pattern with placeholders (e.g., ‘[AirConditioner:VariableRefrigerantFlow Name]’).
- accim.utils.inspect_thermostat_objects(idf: IDF) Dict[str, List[Dict[str, Any]]][source]
Inspects and retrieves key data from thermostat and setpoint objects in the IDF.
- Target Objects:
ZoneControl:Thermostat
ZoneControl:Thermostat:ThermalComfort
ThermostatSetpoint:DualSetpoint
ThermostatSetpoint:ThermalComfort:Fanger:DualSetpoint
- Parameters:
idf (besos.IDF_class.IDF) – The BESOS IDF model object.
- Returns:
- A dictionary where keys are the IDF Object Types
and values are lists of dictionaries containing the properties of each instance found.
- Return type:
Dict[str, List[Dict[str, Any]]]
- accim.utils.modify_timesteps(idf_object: IDF, timesteps: int) IDF[source]
Modifies the timesteps of the idf object.
- Parameters:
idf_object (IDF) – the IDF class from besos or eppy
timesteps (int) – The number of timesteps. Allowable values include 1, 2, 3, 4, 5, 6, 10, 12, 15, 20, 30, and 60
- accim.utils.modify_timesteps_path(idfpath: str, timesteps: int)[source]
Modifies the timesteps of the idf.
- Parameters:
idfpath (str) – the path to the idf
timesteps (int) – The number of timesteps. Allowable values include 1, 2, 3, 4, 5, 6, 10, 12, 15, 20, 30, and 60
- class accim.utils.print_available_outputs_mod(building, version=None, name=None, frequency=None)[source]
Bases:
object
- accim.utils.read_eso_using_readvarseso(eso_file_path: str = 'eplusout.eso', eplus_install_dir: str | None = None, only_run_period: bool = True, cleanup: bool = True) Dict[str, Dict[str, DataFrame]][source]
Lee el archivo .eso usando ReadVarsESO y parsea correctamente los nombres de objetos que contienen dos puntos (ej: Nombres de Zonas o Equipos VRF).
- accim.utils.reduce_runtime(idf_object: IDF, minimal_shadowing: bool = True, shading_calculation_update_frequency: int = 20, maximum_figures_in_shadow_overlap_calculations: int = 200, timesteps: int = 6, runperiod_begin_month: int = 1, runperiod_begin_day_of_month: int = 1, runperiod_end_month: int = 1, runperiod_end_day_of_month: int = 1) IDF[source]
Modifies the idf to reduce the simulation runtime.
- Parameters:
idf_object
minimal_shadowing – True or False. If True, applies minimal shadowing setting.
shading_calculation_update_frequency – An integer. Sets the intervals for the shading calculation update
maximum_figures_in_shadow_overlap_calculations – An integer. Applies the number to the maximum figures in shadow overlap calculations.
timesteps – An integer. Sets the number of timesteps.
runperiod_begin_day_of_month – the day of the month to start the simulation
runperiod_begin_month – the month to start the simulation
runperiod_end_day_of_month – the day of the month to end the simulation
runperiod_end_month – the month to end the simulation
- accim.utils.remove_accents_in_idf(idf_path: str)[source]
Replaces all letters with accent with the same letter without accent.
- accim.utils.set_occupancy_to_always(idf_object: IDF) IDF[source]
Sets the occupancy to always occupied for all zones with people object.
- Parameters:
idf_object (IDF) – the IDF class from besos or eppy