### DO NOT EDIT THIS FILE
### This file is auto-generated by the Dyad command-line compiler.
### If you edit this code it is likely to get overwritten.
### Instead, update the Dyad source code and regenerate this file


@doc Markdown.doc"""
   BrakeThermalTest_Step(; name)
"""
@component function BrakeThermalTest_Step(; name = nothing, kwargs...)
  isnothing(name) && throw(ArgumentError("""
        The `name` keyword must be provided. Please consider using the `@named` macro,
        like so:

        @named model = BrakeThermalTest_Step()
        """))
  __overrides = Dict{String, Symbolics.SymbolicT}(string(k) => v for (k, v) in kwargs)
  __params = Symbolics.SymbolicT[]
  __vars = Symbolics.SymbolicT[]
  __systems = System[]
  __guesses = Dict{Symbolics.SymbolicT, Symbolics.SymbolicT}()
  __initial_conditions = Dict{Symbolics.SymbolicT, Symbolics.SymbolicT}()
  __initialization_eqs = Equation[]
  __eqs = Equation[]
  __bindings = Dict{Symbolics.SymbolicT, Symbolics.SymbolicT}()

  ### Structural Parameters (functions)

  ### Structural Parameters (Final)

  ### Path Parameters (functions)

  ### Path Parameters (non-final)

  ### Final Parameters (declarations)

  ### Final Parameters (assignments)

  ### Deferred assignment (default values that depend on final parameters)

  ### Symbolic Parameters

  ### Final Path Parameters

  ### Variables (declarations)

  ### Variables (assignments)

  ### Constants
  __constants = Any[]

  ### Components
  # Subcomponent brake_thermal of type FrictionBrakeDemo.BrakeThermal
  brake_thermal_overrides = Dict(Symbol(replace(string(k), r"^brake_thermal__" => "")) => v for (k, v) in __overrides if startswith(string(k), "brake_thermal__"))
  filter!(p -> !startswith(string(first(p)), "brake_thermal__"), __overrides)
  push!(__systems, @named brake_thermal = FrictionBrakeDemo.BrakeThermal(brake_thermal_overrides...))
  # Subcomponent disk_heat_step of type BlockComponents.Sources.Step
  disk_heat_step_overrides = Dict(Symbol(replace(string(k), r"^disk_heat_step__" => "")) => v for (k, v) in __overrides if startswith(string(k), "disk_heat_step__"))
  filter!(p -> !startswith(string(first(p)), "disk_heat_step__"), __overrides)
  push!(__systems, @named disk_heat_step = BlockComponents.Sources.Step(height=-9300, offset=9300, start_time=1500, disk_heat_step_overrides...))
  # Subcomponent disk_heat_input of type ThermalComponents.Sources.PrescribedHeatFlow
  disk_heat_input_overrides = Dict(Symbol(replace(string(k), r"^disk_heat_input__" => "")) => v for (k, v) in __overrides if startswith(string(k), "disk_heat_input__"))
  filter!(p -> !startswith(string(first(p)), "disk_heat_input__"), __overrides)
  push!(__systems, @named disk_heat_input = ThermalComponents.Sources.PrescribedHeatFlow(disk_heat_input_overrides...))
  # Subcomponent pad_heat_step of type BlockComponents.Sources.Step
  pad_heat_step_overrides = Dict(Symbol(replace(string(k), r"^pad_heat_step__" => "")) => v for (k, v) in __overrides if startswith(string(k), "pad_heat_step__"))
  filter!(p -> !startswith(string(first(p)), "pad_heat_step__"), __overrides)
  push!(__systems, @named pad_heat_step = BlockComponents.Sources.Step(height=-700, offset=700, start_time=1500, pad_heat_step_overrides...))
  # Subcomponent pad_heat_input of type ThermalComponents.Sources.PrescribedHeatFlow
  pad_heat_input_overrides = Dict(Symbol(replace(string(k), r"^pad_heat_input__" => "")) => v for (k, v) in __overrides if startswith(string(k), "pad_heat_input__"))
  filter!(p -> !startswith(string(first(p)), "pad_heat_input__"), __overrides)
  push!(__systems, @named pad_heat_input = ThermalComponents.Sources.PrescribedHeatFlow(pad_heat_input_overrides...))
  # Subcomponent vehicle_speed_source of type BlockComponents.Sources.Constant
  vehicle_speed_source_overrides = Dict(Symbol(replace(string(k), r"^vehicle_speed_source__" => "")) => v for (k, v) in __overrides if startswith(string(k), "vehicle_speed_source__"))
  filter!(p -> !startswith(string(first(p)), "vehicle_speed_source__"), __overrides)
  push!(__systems, @named vehicle_speed_source = BlockComponents.Sources.Constant(k=6.94, vehicle_speed_source_overrides...))
  # Subcomponent wheel_speed_source of type BlockComponents.Sources.Constant
  wheel_speed_source_overrides = Dict(Symbol(replace(string(k), r"^wheel_speed_source__" => "")) => v for (k, v) in __overrides if startswith(string(k), "wheel_speed_source__"))
  filter!(p -> !startswith(string(first(p)), "wheel_speed_source__"), __overrides)
  push!(__systems, @named wheel_speed_source = BlockComponents.Sources.Constant(k=64.8, wheel_speed_source_overrides...))

  ### Check there are no unmatched overrides
  isempty(__overrides) || throw(ArgumentError("overides: [$(join(keys(__overrides), ", "))] don't match names found in model. These names may exist in the model but could have been conditionally excluded."))

  ### Guesses

  ### Initialization Equations

  ### Assertions
  __assertions = []

  ### Equations
  push!(__eqs, connect(disk_heat_step.y, disk_heat_input.Q_flow))
  push!(__eqs, connect(pad_heat_step.y, pad_heat_input.Q_flow))
  push!(__eqs, connect(disk_heat_input.port, brake_thermal.heat_disk))
  push!(__eqs, connect(pad_heat_input.port, brake_thermal.heat_pad))
  push!(__eqs, connect(vehicle_speed_source.y, brake_thermal.vehicle_speed))
  push!(__eqs, connect(wheel_speed_source.y, brake_thermal.wheel_speed))

  # Return completely constructed System
  return System(__eqs, t, __vars, __params; systems=__systems, initial_conditions=__initial_conditions, guesses=__guesses, name, initialization_eqs=__initialization_eqs, bindings=__bindings, assertions=__assertions)
end
export BrakeThermalTest_Step
