Skip to content
LIBRARY
Examples.HVAC.HVACForecast.md

Examples.HVAC.HVACForecast ​

Clocked forecast of one of the tutorial series: at every tick, y[i] is the value of the series i - 1 steps of Ts ahead of the current time (y[1] is the current value). This is the flat column-major preview vector the d (outdoor temperature) and p (electricity price) inputs of LinearMPCController take with disturbance_preview/parameter_preview. The clock is inferred from the connected inputs.

Usage ​

MPCComponents.Examples.HVAC.HVACForecast()

Parameters: ​

NameDescriptionUnitsDefault value
signalWhich series to preview–
NpPreview length (the MPC horizon)–24
TsStep between preview entries [h] (the MPC sample time)–1.0

Connectors ​

  • y - This connector represents a real signal as an output from a component (RealOutput)

Behavior ​

Behavior of this component cannot be rendered because it includes path variables.

Source ​

dyad
"""
Clocked forecast of one of the tutorial series: at every tick, `y[i]` is the value of the series
`i - 1` steps of `Ts` ahead of the current time (`y[1]` is the current value). This is the flat
column-major preview vector the `d` (outdoor temperature) and `p` (electricity price) inputs of
`LinearMPCController` take with `disturbance_preview`/`parameter_preview`. The clock is inferred from
the connected inputs.
"""
external component HVACForecast@[input clk extends Discrete]
  "Series preview over the horizon"
  y = [RealOutput@[clk]() for i in 1:Np] {
    "Dyad": {
      "placement": {
        "diagram": {"iconName": "default", "x1": 1000, "y1": 450, "x2": 1100, "y2": 550, "rot": 0}
      },
      "tags": []
    }
  }
  "Which series to preview"
  structural parameter signal::HVACSignal
  "Preview length (the MPC horizon)"
  structural parameter Np::Integer = 24
  "Step between preview entries [h] (the MPC sample time)"
  structural parameter Ts::Real = 1.0
relations
metadata {
  "Dyad": {
    "icons": {"default": "dyad://MPCComponents/HVACForecast.svg"},
    "doc": {"behavior": false}
  }
}
end
Flattened Source
dyad
"""
Clocked forecast of one of the tutorial series: at every tick, `y[i]` is the value of the series
`i - 1` steps of `Ts` ahead of the current time (`y[1]` is the current value). This is the flat
column-major preview vector the `d` (outdoor temperature) and `p` (electricity price) inputs of
`LinearMPCController` take with `disturbance_preview`/`parameter_preview`. The clock is inferred from
the connected inputs.
"""
external component HVACForecast
  "Series preview over the horizon"
  y = [RealOutput@[clk]() for i in 1:Np] {
    "Dyad": {
      "placement": {
        "diagram": {"iconName": "default", "x1": 1000, "y1": 450, "x2": 1100, "y2": 550, "rot": 0}
      },
      "tags": []
    }
  }
  "Which series to preview"
  structural parameter signal::HVACSignal
  "Preview length (the MPC horizon)"
  structural parameter Np::Integer = 24
  "Step between preview entries [h] (the MPC sample time)"
  structural parameter Ts::Real = 1.0
relations
metadata {
  "Dyad": {
    "icons": {"default": "dyad://MPCComponents/HVACForecast.svg"},
    "doc": {"behavior": false}
  }
}
end


Test Cases ​

No test cases defined.

  • Examples

  • Experiments

  • Analyses