type: DAG
annotations: {}
inputs:
- type: DAGFileInput
  annotations: {}
  name: model
  description: A Honeybee model in HBJSON file format.
  default: null
  alias:
  - type: DAGGenericInputAlias
    annotations: {}
    name: model
    description: A path to a HBJSON file or a HB model object built with Python or
      dotnet libraries.
    platform:
    - grasshopper
    handler:
    - type: IOAliasHandler
      annotations: {}
      language: python
      module: pollination_handlers.inputs.model
      function: model_to_json
    - type: IOAliasHandler
      annotations: {}
      language: csharp
      module: HoneybeeSchema.Handlers
      function: HBModelToJSON
    default: null
    required: true
    spec: null
  - type: DAGLinkedInputAlias
    annotations: {}
    name: model
    description: This input links the model to Rhino model.
    platform:
    - rhino
    handler:
    - type: IOAliasHandler
      annotations: {}
      language: csharp
      module: HoneybeeRhino.Handlers
      function: RhinoHBModelToJSON
    default: null
    required: true
    spec: null
  required: true
  spec: null
  extensions:
  - json
  - hbjson
- type: DAGNumberInput
  annotations: {}
  name: north
  description: A number for rotation from north.
  default: 0.0
  alias:
  - type: DAGGenericInputAlias
    annotations: {}
    name: north
    description: Either a Vector2D for the north direction or a number between -360
      and 360 for the counterclockwise difference between the North and the positive
      Y-axis in degrees.
    platform:
    - grasshopper
    handler:
    - type: IOAliasHandler
      annotations: {}
      language: python
      module: pollination_handlers.inputs.north
      function: north_vector_to_angle
    default: null
    required: true
    spec: null
  required: false
  spec:
    type: number
    minimum: 0
    maximum: 360
- type: DAGStringInput
  annotations: {}
  name: radiance-parameters
  description: The radiance parameters for ray tracing.
  default: -ab 2 -ad 5000 -lw 2e-05
  alias: []
  required: false
  spec: null
- type: DAGIntegerInput
  annotations: {}
  name: sensor-count
  description: The maximum number of grid points per parallel execution.
  default: 200
  alias: []
  required: false
  spec:
    type: integer
    minimum: 1
- type: DAGStringInput
  annotations: {}
  name: sensor-grid
  description: A grid name or a pattern to filter the sensor grids. By default all
    the grids in HBJSON model will be exported.
  default: '*'
  alias: []
  required: false
  spec: null
- type: DAGFileInput
  annotations: {}
  name: wea
  description: Wea file.
  default: null
  alias:
  - type: DAGGenericInputAlias
    annotations: {}
    name: wea
    description: Either a Wea python object or the path to a wea or an epw file.
    platform:
    - grasshopper
    handler:
    - type: IOAliasHandler
      annotations: {}
      language: python
      module: pollination_handlers.inputs.wea
      function: wea_handler
    default: null
    required: true
    spec: null
  required: true
  spec: null
  extensions:
  - wea
outputs:
- type: DAGFolderOutput
  annotations: {}
  name: results
  description: null
  from:
    type: FolderReference
    annotations: {}
    path: results
  alias:
  - type: DAGGenericOutputAlias
    annotations: {}
    name: annual_daylight
    description: Annual daylight result files.
    platform:
    - grasshopper
    handler:
    - type: IOAliasHandler
      annotations: {}
      language: python
      module: pollination_handlers.outputs.daylight
      function: sort_ill_from_folder
  required: true
name: main
fail_fast: true
tasks:
- type: DAGTask
  annotations: {}
  name: annual-daylight-raytracing
  template: annual-daylight-ray-tracing
  needs:
  - create-sky-dome
  - create-octree-with-suns
  - create-octree
  - generate-sunpath
  - create-total-sky
  - create-direct-sky
  - create-rad-folder
  arguments:
  - type: TaskArgument
    annotations: {}
    name: sensor-count
    from:
      type: InputReference
      annotations: {}
      variable: sensor-count
  - type: TaskArgument
    annotations: {}
    name: radiance-parameters
    from:
      type: InputReference
      annotations: {}
      variable: radiance-parameters
  - type: TaskPathArgument
    annotations: {}
    name: octree-file-with-suns
    from:
      type: TaskFileReference
      annotations: {}
      name: create-octree-with-suns
      variable: scene-file
    sub_path: null
  - type: TaskPathArgument
    annotations: {}
    name: octree-file
    from:
      type: TaskFileReference
      annotations: {}
      name: create-octree
      variable: scene-file
    sub_path: null
  - type: TaskArgument
    annotations: {}
    name: grid-name
    from:
      type: ValueReference
      annotations: {}
      value: '{{item.full_id}}'
  - type: TaskPathArgument
    annotations: {}
    name: sensor-grid
    from:
      type: TaskFolderReference
      annotations: {}
      name: create-rad-folder
      variable: model-folder
    sub_path: grid/{{item.full_id}}.pts
  - type: TaskPathArgument
    annotations: {}
    name: sky-matrix
    from:
      type: TaskFileReference
      annotations: {}
      name: create-total-sky
      variable: sky-matrix
    sub_path: null
  - type: TaskPathArgument
    annotations: {}
    name: sky-dome
    from:
      type: TaskFileReference
      annotations: {}
      name: create-sky-dome
      variable: sky-dome
    sub_path: null
  - type: TaskPathArgument
    annotations: {}
    name: sky-matrix-direct
    from:
      type: TaskFileReference
      annotations: {}
      name: create-direct-sky
      variable: sky-matrix
    sub_path: null
  - type: TaskPathArgument
    annotations: {}
    name: sunpath
    from:
      type: TaskFileReference
      annotations: {}
      name: generate-sunpath
      variable: sunpath
    sub_path: null
  - type: TaskPathArgument
    annotations: {}
    name: sun-modifiers
    from:
      type: TaskFileReference
      annotations: {}
      name: generate-sunpath
      variable: sun-modifiers
    sub_path: null
  loop:
    type: DAGTaskLoop
    annotations: {}
    from:
      type: TaskReference
      annotations: {}
      name: create-rad-folder
      variable: sensor-grids
  sub_folder: initial_results/{{item.name}}
  returns: []
- type: DAGTask
  annotations: {}
  name: create-direct-sky
  template: honeybee-radiance/create-sky-matrix
  needs: []
  arguments:
  - type: TaskArgument
    annotations: {}
    name: north
    from:
      type: InputReference
      annotations: {}
      variable: north
  - type: TaskPathArgument
    annotations: {}
    name: wea
    from:
      type: InputFileReference
      annotations: {}
      variable: wea
    sub_path: null
  - type: TaskArgument
    annotations: {}
    name: sky-type
    from:
      type: ValueReference
      annotations: {}
      value: sun-only
  - type: TaskArgument
    annotations: {}
    name: sun-up-hours
    from:
      type: ValueReference
      annotations: {}
      value: sun-up-hours
  loop: null
  sub_folder: null
  returns:
  - type: TaskPathReturn
    annotations: {}
    name: sky-matrix
    description: null
    path: resources/sky_direct.mtx
    required: true
- type: DAGTask
  annotations: {}
  name: create-octree
  template: honeybee-radiance/create-octree
  needs:
  - create-rad-folder
  arguments:
  - type: TaskPathArgument
    annotations: {}
    name: model
    from:
      type: TaskFolderReference
      annotations: {}
      name: create-rad-folder
      variable: model-folder
    sub_path: null
  loop: null
  sub_folder: null
  returns:
  - type: TaskPathReturn
    annotations: {}
    name: scene-file
    description: null
    path: resources/scene.oct
    required: true
- type: DAGTask
  annotations: {}
  name: create-octree-with-suns
  template: honeybee-radiance/create-octree-with-sky
  needs:
  - generate-sunpath
  - create-rad-folder
  arguments:
  - type: TaskPathArgument
    annotations: {}
    name: model
    from:
      type: TaskFolderReference
      annotations: {}
      name: create-rad-folder
      variable: model-folder
    sub_path: null
  - type: TaskPathArgument
    annotations: {}
    name: sky
    from:
      type: TaskFileReference
      annotations: {}
      name: generate-sunpath
      variable: sunpath
    sub_path: null
  loop: null
  sub_folder: null
  returns:
  - type: TaskPathReturn
    annotations: {}
    name: scene-file
    description: null
    path: resources/scene_with_suns.oct
    required: true
- type: DAGTask
  annotations: {}
  name: create-rad-folder
  template: honeybee-radiance/create-radiance-folder
  needs: []
  arguments:
  - type: TaskPathArgument
    annotations: {}
    name: input-model
    from:
      type: InputFileReference
      annotations: {}
      variable: model
    sub_path: null
  - type: TaskArgument
    annotations: {}
    name: sensor-grid
    from:
      type: InputReference
      annotations: {}
      variable: sensor-grid
  loop: null
  sub_folder: null
  returns:
  - type: TaskPathReturn
    annotations: {}
    name: model-folder
    description: null
    path: model
    required: true
  - type: TaskPathReturn
    annotations: {}
    name: sensor-grids-file
    description: null
    path: results/grids_info.json
    required: true
  - type: TaskReturn
    annotations: {}
    name: sensor-grids
    description: Sensor grids information.
- type: DAGTask
  annotations: {}
  name: create-sky-dome
  template: honeybee-radiance/create-sky-dome
  needs: []
  arguments: []
  loop: null
  sub_folder: null
  returns:
  - type: TaskPathReturn
    annotations: {}
    name: sky-dome
    description: null
    path: resources/sky.dome
    required: true
- type: DAGTask
  annotations: {}
  name: create-total-sky
  template: honeybee-radiance/create-sky-matrix
  needs: []
  arguments:
  - type: TaskArgument
    annotations: {}
    name: north
    from:
      type: InputReference
      annotations: {}
      variable: north
  - type: TaskPathArgument
    annotations: {}
    name: wea
    from:
      type: InputFileReference
      annotations: {}
      variable: wea
    sub_path: null
  - type: TaskArgument
    annotations: {}
    name: sun-up-hours
    from:
      type: ValueReference
      annotations: {}
      value: sun-up-hours
  loop: null
  sub_folder: null
  returns:
  - type: TaskPathReturn
    annotations: {}
    name: sky-matrix
    description: null
    path: resources/sky.mtx
    required: true
- type: DAGTask
  annotations: {}
  name: generate-sunpath
  template: honeybee-radiance/create-sun-matrix
  needs: []
  arguments:
  - type: TaskArgument
    annotations: {}
    name: north
    from:
      type: InputReference
      annotations: {}
      variable: north
  - type: TaskPathArgument
    annotations: {}
    name: wea
    from:
      type: InputFileReference
      annotations: {}
      variable: wea
    sub_path: null
  loop: null
  sub_folder: null
  returns:
  - type: TaskPathReturn
    annotations: {}
    name: sunpath
    description: null
    path: resources/sunpath.mtx
    required: true
  - type: TaskPathReturn
    annotations: {}
    name: sun-modifiers
    description: null
    path: resources/suns.mod
    required: true
- type: DAGTask
  annotations: {}
  name: parse-sun-up-hours
  template: honeybee-radiance/parse-sun-up-hours
  needs:
  - generate-sunpath
  arguments:
  - type: TaskPathArgument
    annotations: {}
    name: sun-modifiers
    from:
      type: TaskFileReference
      annotations: {}
      name: generate-sunpath
      variable: sun-modifiers
    sub_path: null
  loop: null
  sub_folder: null
  returns:
  - type: TaskPathReturn
    annotations: {}
    name: sun-up-hours
    description: null
    path: results/sun-up-hours.txt
    required: true
