dragonfly_energy.writer module

Methods to write files for URBANopt simulation from a Model.

dragonfly_energy.writer.model_to_urbanopt(model, location, point=Point2D(0.0, 0.0), shade_distance=None, use_multiplier=True, add_plenum=False, solve_ceiling_adjacencies=False, des_loop=None, electrical_network=None, road_network=None, ground_pv=None, folder=None, tolerance=0.01)[source]

Generate an URBANopt feature geoJSON and honeybee JSONs from a dragonfly Model.

  • model – A dragonfly Model for which an URBANopt feature geoJSON and corresponding honeybee Model JSONs will be returned.

  • location – A ladybug Location object possessing longitude and latitude data.

  • point – A ladybug_geometry Point2D for where the location object exists within the space of a scene. The coordinates of this point are expected to be in the units of this Model. (Default: (0, 0)).

  • shade_distance – An optional number to note the distance beyond which other objects’ shade should not be exported into a given honeybee Model. This is helpful for reducing the simulation run time of each Model when other connected buildings are too far away to have a meaningful impact on the results. If None, all other buildings will be included as context shade in each and every Model. Set to 0 to exclude all neighboring buildings from the resulting models. (Default: None).

  • use_multiplier – If True, the multipliers on the Model’s Stories will be passed along to the generated Honeybee Room objects, indicating the simulation will be run once for each unique room and then results will be multiplied. If False, full geometry objects will be written for each and every floor in the building that are represented through multipliers and all resulting multipliers will be 1. (Default: True).

  • add_plenum – Boolean to indicate whether ceiling/floor plenums should be auto-generated for the Rooms. (Default: False).

  • solve_ceiling_adjacencies – Boolean to note whether adjacencies should be solved between interior stories when Room2Ds perfectly match one another in their floor plate. This ensures that Surface boundary conditions are used instead of Adiabatic ones. Note that this input has no effect when the object_per_model is Story. (Default: False).

  • des_loop – An optional District Energy System (DES) ThermalLoop that’s associated with the dragonfly Model. (Default: None).

  • electrical_network – An optional OpenDSS ElectricalNetwork that’s associated with the dragonfly Model. (Default: None).

  • road_network – An optional RNM RoadNetwork that’s associated with the dragonfly Model. (Default: None).

  • ground_pv – An optional list of REopt GroundMountPV objects representing ground-mounted photovoltaic fields to be included in the REopt simulation. (Default: None).

  • folder – An optional folder to be used as the root of the model’s URBANopt folder. If None, the files will be written into a sub-directory of the honeybee-core default_simulation_folder.

  • tolerance – The minimum distance between points at which they are not considered touching. (Default: 0.01, suitable for objects in meters).


A tuple with three values.

feature_geojson – The path to an URBANopt feature geoJSON that has

been written by this method.

hb_model_jsons – An array of file paths to honeybee Model JSONs that

correspond to the detailed_model_filename keys in the feature_geojson.

hb_models – An array of honeybee Model objects that were generated in

process of writing the URBANopt files.