reV.config.project_points.PointsControl

class PointsControl(project_points, sites_per_split=100)[source]

Bases: object

Class to manage and split ProjectPoints.

Parameters:
  • project_points (reV.config.ProjectPoints) – ProjectPoints instance to be split between execution workers.

  • sites_per_split (int) – Sites per project points split instance returned in the __next__ iterator function.

Methods

split(i0, i1, project_points[, sites_per_split])

Split this execution by splitting the project points attribute.

Attributes

N

Length of current iterator list

project_points

Get the project points property.

sites

Get the project points sites for this instance.

sites_per_split

number of sites per split.

split_range

Get the current split range property.

property N

Length of current iterator list

Returns:

N (int) – Number of iterators in list

property sites_per_split

number of sites per split.

Returns:

_sites_per_split (int) – Sites per split iter object.

Type:

Get the iterator increment

property project_points

Get the project points property.

Returns:

_project_points (reV.config.project_points.ProjectPoints) – ProjectPoints instance corresponding to this PointsControl instance.

property sites

Get the project points sites for this instance.

Returns:

sites (list) – List of sites belonging to the _project_points attribute.

property split_range

Get the current split range property.

Returns:

_split_range (list) – Two-entry list that indicates the starting and finishing (inclusive, exclusive, respectively) indices of a split instance of the PointsControl object. This is set in the iterator dunder methods of PointsControl.

classmethod split(i0, i1, project_points, sites_per_split=100)[source]

Split this execution by splitting the project points attribute.

Parameters:
  • i0/i1 (int) – Beginning/end (inclusive/exclusive, respectively) index split parameters for ProjectPoints.split() method.

  • project_points (reV.config.ProjectPoints) – Project points instance that will be split.

  • sites_per_split (int) – Sites per project points split instance returned in the __next__ iterator function.

Returns:

sub (PointsControl) – New instance of PointsControl with a subset of the original project points.