type: DAG
annotations: {}
inputs:
- type: DAGStringInput
  annotations: {}
  name: grid-name
  description: Sensor grid file name. This is useful to rename the final result file
    to {grid_name}.res
  default: null
  alias: []
  required: true
  spec: null
- type: DAGFileInput
  annotations: {}
  name: octree-file
  description: A Radiance octree file.
  default: null
  alias: []
  required: true
  spec: null
  extensions:
  - oct
- type: DAGFileInput
  annotations: {}
  name: octree-file-with-suns
  description: A Radiance octree file with suns.
  default: null
  alias: []
  required: true
  spec: null
  extensions:
  - oct
- 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: DAGFileInput
  annotations: {}
  name: sensor-grid
  description: Sensor grid file.
  default: null
  alias: []
  required: true
  spec: null
  extensions:
  - pts
- type: DAGFileInput
  annotations: {}
  name: sky-dome
  description: Path to sky dome file.
  default: null
  alias: []
  required: true
  spec: null
  extensions: null
- type: DAGFileInput
  annotations: {}
  name: sky-matrix
  description: Path to total sky matrix file.
  default: null
  alias: []
  required: true
  spec: null
  extensions: null
- type: DAGFileInput
  annotations: {}
  name: sky-matrix-direct
  description: Path to direct skymtx file (i.e. gendaymtx -d).
  default: null
  alias: []
  required: true
  spec: null
  extensions: null
- type: DAGFileInput
  annotations: {}
  name: sun-modifiers
  description: A file with sun modifiers.
  default: null
  alias: []
  required: true
  spec: null
  extensions: null
outputs: []
name: annual-daylight-ray-tracing
fail_fast: true
tasks:
- type: DAGTask
  annotations: {}
  name: direct-sky
  template: honeybee-radiance/daylight-coefficient
  needs:
  - split-grid
  arguments:
  - type: TaskArgument
    annotations: {}
    name: radiance-parameters
    from:
      type: InputReference
      annotations: {}
      variable: radiance-parameters
  - type: TaskArgument
    annotations: {}
    name: fixed-radiance-parameters
    from:
      type: ValueReference
      annotations: {}
      value: -aa 0.0 -I -ab 1 -c 1 -faf
  - type: TaskArgument
    annotations: {}
    name: sensor-count
    from:
      type: ValueReference
      annotations: {}
      value: '{{item.count}}'
  - type: TaskPathArgument
    annotations: {}
    name: sky-matrix
    from:
      type: InputFileReference
      annotations: {}
      variable: sky-matrix-direct
    sub_path: null
  - type: TaskPathArgument
    annotations: {}
    name: sky-dome
    from:
      type: InputFileReference
      annotations: {}
      variable: sky-dome
    sub_path: null
  - type: TaskPathArgument
    annotations: {}
    name: sensor-grid
    from:
      type: TaskFolderReference
      annotations: {}
      name: split-grid
      variable: output-folder
    sub_path: '{{item.path}}'
  - type: TaskPathArgument
    annotations: {}
    name: scene-file
    from:
      type: InputFileReference
      annotations: {}
      variable: octree-file
    sub_path: null
  loop:
    type: DAGTaskLoop
    annotations: {}
    from:
      type: TaskReference
      annotations: {}
      name: split-grid
      variable: grids-list
  sub_folder: direct_sky
  returns:
  - type: TaskPathReturn
    annotations: {}
    name: result-file
    description: null
    path: '{{item.name}}.ill'
    required: true
- type: DAGTask
  annotations: {}
  name: direct-sunlight
  template: honeybee-radiance/daylight-contribution
  needs:
  - split-grid
  arguments:
  - type: TaskArgument
    annotations: {}
    name: radiance-parameters
    from:
      type: InputReference
      annotations: {}
      variable: radiance-parameters
  - type: TaskArgument
    annotations: {}
    name: fixed-radiance-parameters
    from:
      type: ValueReference
      annotations: {}
      value: -aa 0.0 -I -faf -ab 0 -dc 1.0 -dt 0.0 -dj 0.0 -dr 0
  - type: TaskArgument
    annotations: {}
    name: sensor-count
    from:
      type: ValueReference
      annotations: {}
      value: '{{item.count}}'
  - type: TaskPathArgument
    annotations: {}
    name: modifiers
    from:
      type: InputFileReference
      annotations: {}
      variable: sun-modifiers
    sub_path: null
  - type: TaskPathArgument
    annotations: {}
    name: sensor-grid
    from:
      type: TaskFolderReference
      annotations: {}
      name: split-grid
      variable: output-folder
    sub_path: '{{item.path}}'
  - type: TaskPathArgument
    annotations: {}
    name: scene-file
    from:
      type: InputFileReference
      annotations: {}
      variable: octree-file-with-suns
    sub_path: null
  loop:
    type: DAGTaskLoop
    annotations: {}
    from:
      type: TaskReference
      annotations: {}
      name: split-grid
      variable: grids-list
  sub_folder: direct_sunlight
  returns:
  - type: TaskPathReturn
    annotations: {}
    name: result-file
    description: null
    path: '{{item.name}}.ill'
    required: true
- type: DAGTask
  annotations: {}
  name: merge-results
  template: honeybee-radiance/merge-files
  needs:
  - output-matrix-math
  arguments:
  - type: TaskArgument
    annotations: {}
    name: name
    from:
      type: InputReference
      annotations: {}
      variable: grid-name
  - type: TaskArgument
    annotations: {}
    name: extension
    from:
      type: ValueReference
      annotations: {}
      value: .ill
  - type: TaskPathArgument
    annotations: {}
    name: folder
    from:
      type: ValueFolderReference
      annotations: {}
      path: final
    sub_path: null
  loop: null
  sub_folder: null
  returns:
  - type: TaskPathReturn
    annotations: {}
    name: result-file
    description: null
    path: ../../results/{{inputs.name}}.ill
    required: true
- type: DAGTask
  annotations: {}
  name: output-matrix-math
  template: honeybee-radiance/add-remove-sky-matrix
  needs:
  - split-grid
  - direct-sunlight
  - total-sky
  - direct-sky
  arguments:
  - type: TaskPathArgument
    annotations: {}
    name: direct-sky-matrix
    from:
      type: ValueFileReference
      annotations: {}
      path: direct_sky/{{item.name}}.ill
    sub_path: null
  - type: TaskPathArgument
    annotations: {}
    name: total-sky-matrix
    from:
      type: ValueFileReference
      annotations: {}
      path: total_sky/{{item.name}}.ill
    sub_path: null
  - type: TaskPathArgument
    annotations: {}
    name: sunlight-matrix
    from:
      type: ValueFileReference
      annotations: {}
      path: direct_sunlight/{{item.name}}.ill
    sub_path: null
  - type: TaskArgument
    annotations: {}
    name: conversion
    from:
      type: ValueReference
      annotations: {}
      value: 47.4 119.9 11.6
  loop:
    type: DAGTaskLoop
    annotations: {}
    from:
      type: TaskReference
      annotations: {}
      name: split-grid
      variable: grids-list
  sub_folder: final
  returns:
  - type: TaskPathReturn
    annotations: {}
    name: results-file
    description: null
    path: '{{item.name}}.ill'
    required: true
- type: DAGTask
  annotations: {}
  name: split-grid
  template: honeybee-radiance/split-grid
  needs: []
  arguments:
  - type: TaskArgument
    annotations: {}
    name: sensor-count
    from:
      type: InputReference
      annotations: {}
      variable: sensor-count
  - type: TaskPathArgument
    annotations: {}
    name: input-grid
    from:
      type: InputFileReference
      annotations: {}
      variable: sensor-grid
    sub_path: null
  loop: null
  sub_folder: null
  returns:
  - type: TaskReturn
    annotations: {}
    name: grids-list
    description: null
  - type: TaskPathReturn
    annotations: {}
    name: output-folder
    description: null
    path: sub_grids
    required: true
- type: DAGTask
  annotations: {}
  name: total-sky
  template: honeybee-radiance/daylight-coefficient
  needs:
  - split-grid
  arguments:
  - type: TaskArgument
    annotations: {}
    name: radiance-parameters
    from:
      type: InputReference
      annotations: {}
      variable: radiance-parameters
  - type: TaskArgument
    annotations: {}
    name: fixed-radiance-parameters
    from:
      type: ValueReference
      annotations: {}
      value: -aa 0.0 -I -c 1 -faf
  - type: TaskArgument
    annotations: {}
    name: sensor-count
    from:
      type: ValueReference
      annotations: {}
      value: '{{item.count}}'
  - type: TaskPathArgument
    annotations: {}
    name: sky-matrix
    from:
      type: InputFileReference
      annotations: {}
      variable: sky-matrix
    sub_path: null
  - type: TaskPathArgument
    annotations: {}
    name: sky-dome
    from:
      type: InputFileReference
      annotations: {}
      variable: sky-dome
    sub_path: null
  - type: TaskPathArgument
    annotations: {}
    name: sensor-grid
    from:
      type: TaskFolderReference
      annotations: {}
      name: split-grid
      variable: output-folder
    sub_path: '{{item.path}}'
  - type: TaskPathArgument
    annotations: {}
    name: scene-file
    from:
      type: InputFileReference
      annotations: {}
      variable: octree-file
    sub_path: null
  loop:
    type: DAGTaskLoop
    annotations: {}
    from:
      type: TaskReference
      annotations: {}
      name: split-grid
      variable: grids-list
  sub_folder: total_sky
  returns:
  - type: TaskPathReturn
    annotations: {}
    name: result-file
    description: null
    path: '{{item.name}}.ill'
    required: true
