def test_simulation_parameter_equality(): """Test the equality of SimulationParameter objects.""" sim_par = SimulationParameter() sim_par_dup = sim_par.duplicate() sim_par_alt = SimulationParameter(timestep=4) assert sim_par is sim_par assert sim_par is not sim_par_dup assert sim_par == sim_par_dup sim_par_dup.timestep = 12 assert sim_par != sim_par_dup assert sim_par != sim_par_alt
'Models for energy simulation.\nIf you have geometry that is not a ' \ 'part of a Room boundary that you want included in the energy simulation, ' \ 'it should be added as shades.'.format(object_type) if all_required_inputs(ghenv.Component) and _write: # check the presence of openstudio and check that the version is compatible check_openstudio_version() # process the simulation parameters if _sim_par_ is None: _sim_par_ = SimulationParameter() _sim_par_.output.add_zone_energy_use() _sim_par_.output.add_hvac_energy_use() else: _sim_par_ = _sim_par_.duplicate() # ensure input is not edited # assign design days from the DDY next to the EPW if there are None if len(_sim_par_.sizing_parameter.design_days) == 0: msg = None folder, epw_file_name = os.path.split(_epw_file) ddy_file = os.path.join(folder, epw_file_name.replace('.epw', '.ddy')) if os.path.isfile(ddy_file): try: _sim_par_.sizing_parameter.add_from_ddy_996_004(ddy_file) except AssertionError: msg = 'No ddy_file_ was input into the _sim_par_ sizing ' \ 'parameters\n and no design days were found in the .ddy file '\ 'next to the _epw_file.' else: msg = 'No ddy_file_ was input into the _sim_par_ sizing parameters\n' \