dragonfly_energy.reopt module

Complete set of REopt Simulation Settings.

class dragonfly_energy.reopt.FinancialParameter(analysis_years=25, escalation_rate=0.023, tax_rate=0.26, discount_rate=0.083)[source]

Bases: object

Complete set of Financial settings for REopt.

Parameters
  • analysis_years – An integer for the number of years over which cost will be optimized. (Default: 25).

  • escalation_rate – A number between 0 and 1 for the escalation rate over the analysis. (Default: 0.023).

  • tax_rate – A number between 0 and 1 for the rate at which the owner/host of the system is taxed. (Default: 0.26).

  • discount_rate – A number between 0 and 1 for the discount rate for the owner/host of the system. (Default: 0.083).

Properties:
  • analysis_years

  • escalation_rate

  • tax_rate

  • discount_rate

ToString()[source]

Overwrite .NET ToString.

apply_to_dict(base_dict)[source]

Apply this object’s properties to a ‘Financial’ object of REopt schema.

duplicate()[source]

Get a copy of this object.

property analysis_years

Get or set a integer for the number of years to run the analysis.

property discount_rate

Get or set a fractional number for the discount rate.

property escalation_rate

Get or set a fractional number for the escalation rate.

property tax_rate

Get or set a fractional number for the tax rate.

class dragonfly_energy.reopt.GeneratorParameter(max_kw=0, dollars_per_kw=500)[source]

Bases: _SourceParameter

Generator settings for REopt.

Parameters
  • max_kw – A number for the maximum installed kilowatts. (Default: 0).

  • dollars_per_kw – A number for installation cost in US dollars. (Default: 500).

Properties:
  • max_kw

  • dollars_per_kw

ToString()[source]

Overwrite .NET ToString.

apply_to_dict(base_dict)

Apply this object’s properties to an object of REopt schema.

duplicate()

Get a copy of this object.

property dollars_per_kw

Get or set a number for the installation cost in US dollars.

property max_kw

Get or set a number for the maximum installed kilowatts.

class dragonfly_energy.reopt.GroundMountPV(identifier, geometry, building_identifier=None)[source]

Bases: object

Represents a ground-mounted photovoltaic system in REopt.

Parameters
  • identifier – Text string for a unique Photovoltaic ID. Must contain only characters that are acceptable in REopt. This will be used to identify the object across the exported geoJSON and REopt files.

  • geometry – A Polygon2D representing the geometry of the PV field.

  • building_identifier – An optional identifier of a dragonfly Building with which the photovoltaic system is associated. If None, the PV system will be assumed to be a community PV field that isn’t associated with a particular building meter. (Default: None).

Properties:
  • identifier

  • display_name

  • geometry

  • building_identifier

ToString()[source]
duplicate()[source]

Get a copy of this object.

classmethod from_dict(data)[source]

Initialize an GroundMountPV from a dictionary.

Parameters

data – A dictionary representation of an GroundMountPV object.

move(moving_vec)[source]

Move this object along a vector.

Parameters

moving_vec – A ladybug_geometry Vector3D with the direction and distance to move the object.

reflect(plane)[source]

Reflect this object across a plane.

Parameters

plane – A ladybug_geometry Plane across which the object will be reflected.

rotate_xy(angle, origin)[source]

Rotate this object counterclockwise in the XY plane by a certain angle.

Parameters
  • angle – An angle in degrees.

  • origin – A ladybug_geometry Point3D for the origin around which the object will be rotated.

scale(factor, origin=None)[source]

Scale this object by a factor from an origin point.

Parameters
  • factor – A number representing how much the object should be scaled.

  • origin – A ladybug_geometry Point3D representing the origin from which to scale. If None, it will be scaled from the World origin (0, 0, 0).

to_dict()[source]

GroundMountPV dictionary representation.

to_geojson_dict(location, point)[source]

Get GroundMountPV dictionary as it appears in an URBANopt geoJSON.

Parameters
  • 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)).

property building_identifier

Get or set the text string for a Building associated with the PV field.

property display_name

Get or set a string for the object name without any character restrictions.

If not set, this will be equal to the identifier.

property geometry

Get a Polygon2D representing the photovoltaic field.

property identifier

Get or set the text string for unique object identifier.

class dragonfly_energy.reopt.PVParameter(max_kw=0, dollars_per_kw=1600, max_kw_ground=0, dollars_per_kw_ground=2200)[source]

Bases: _SourceParameter

Photovoltaic settings for REopt.

Parameters
  • max_kw – A number for the maximum installed kilowatts. (Default: 0).

  • dollars_per_kw – A number for installation cost in US dollars. (Default: 1600).

Properties:
  • max_kw

  • dollars_per_kw

  • max_kw_ground

  • dollars_per_kw_ground

ToString()[source]

Overwrite .NET ToString.

apply_to_dict(base_dict)[source]

Apply this object’s properties to an object of REopt schema.

duplicate()

Get a copy of this object.

property dollars_per_kw

Get or set a number for the installation cost in US dollars.

property dollars_per_kw_ground

Get or set a number for the installation cost of ground PV in US dollars.

property max_kw

Get or set a number for the maximum installed kilowatts.

property max_kw_ground

Get or set a number for the maximum installed kilowatts of Ground PV.

class dragonfly_energy.reopt.REoptParameter(financial_parameter=None, wind_parameter=None, pv_parameter=None, storage_parameter=None, generator_parameter=None)[source]

Bases: object

Complete set of REopt Simulation Settings.

Parameters
  • financial_parameter – A FinancialParameter object to describe the parameters of the financial analysis. If None, a set of defaults will be generated. (Default: None).

  • wind_parameter – A WindParameter object to set the cost and max amount of wind to include in the analysis. If None, no wind will be included in the analysis. (Default: None).

  • pv_parameter – A PVParameter object to set the cost and max amount of photovoltaic to include in the analysis. If None, no PV will be included in the analysis. (Default: None).

  • storage_parameter – A StorageParameter object to set the cost and max amount of electricity storage to include in the analysis. If None, no storage will be included in the analysis. (Default: None).

  • generator_parameter – A GeneratorParameter object to set the cost and max amount of generators to include in the analysis. If None, no generators will be included in the analysis. (Default: None).

Properties:
  • financial_parameter

  • wind_parameter

  • pv_parameter

  • storage_parameter

  • generator_parameter

ToString()[source]

Overwrite .NET ToString.

duplicate()[source]

Get a copy of this object.

to_assumptions_dict(base_file, urdb_label)[source]

Get REoptParameter as a dictionary representation in the REopt Lite schema.

Full documentation of the REopt Lite schema can be found at. https://developer.nrel.gov/docs/energy-optimization/reopt-v1/

Parameters
  • base_file – A JSON file in the REopt Lite schema containing a base set of assumptions that will be modified based on the properties of this object.

  • urdb_label – Text string for the Utility Rate Database (URDB) label for the particular electrical utility rate for the optimization. The label is the last term of the URL of a utility rate detail page (eg. the label for the rate at https://openei.org/apps/IURDB/rate/view/5b0d83af5457a3f276733305 is 5b0d83af5457a3f276733305).

property financial_parameter

Get or set a FinancialParameter object for financial settings.

property generator_parameter

Get or set a GeneratorParameter object for electricity storage settings.

property pv_parameter

Get or set a PVParameter object for photovoltaic settings.

property storage_parameter

Get or set a StorageParameter object for electricity storage settings.

property wind_parameter

Get or set a WindParameter object for wind settings.

class dragonfly_energy.reopt.StorageParameter(max_kw=0, dollars_per_kw=840)[source]

Bases: _SourceParameter

Electrical storage settings for REopt.

Parameters
  • max_kw – A number for the maximum installed kilowatts. (Default: 0).

  • dollars_per_kw – A number for installation cost in US dollars. (Default: 840).

Properties:
  • max_kw

  • dollars_per_kw

ToString()[source]

Overwrite .NET ToString.

apply_to_dict(base_dict)

Apply this object’s properties to an object of REopt schema.

duplicate()

Get a copy of this object.

property dollars_per_kw

Get or set a number for the installation cost in US dollars.

property max_kw

Get or set a number for the maximum installed kilowatts.

class dragonfly_energy.reopt.WindParameter(max_kw=0, dollars_per_kw=3013)[source]

Bases: _SourceParameter

Wind settings for REopt.

Parameters
  • max_kw – A number for the maximum installed kilowatts. (Default: 0).

  • dollars_per_kw – A number for installation cost in US dollars. (Default: 3013).

Properties:
  • max_kw

  • dollars_per_kw

ToString()[source]

Overwrite .NET ToString.

apply_to_dict(base_dict)

Apply this object’s properties to an object of REopt schema.

duplicate()

Get a copy of this object.

property dollars_per_kw

Get or set a number for the installation cost in US dollars.

property max_kw

Get or set a number for the maximum installed kilowatts.