This sequence sets the damper and valve position for VAV reheat terminal unit. The implementation is according to Section 5.6.5 of ASHRAE Guideline 36, May 2020. The calculation is done following the steps below.
uCoo > 0), then
the cooling loop output uCoo shall be mapped to the
airflow setpoint from the cooling minimum
VActCooMin_flow to the cooling maximum
VActCooMax_flow airflow setpoints. The heating coil is
disabled (yVal=0) unless the discharge air temperature
TDis is below the minimum setpoint (10 °C).
TSup from the AHU is
greater than room temperature TZon, cooling supply
airflow setpoint shall be no higher than the minimum.uCoo=0 and
uHea=0), then the active airflow setpoint shall be the
minimum airflow setpoint VActMin_flow. The heating
coil is disabled unless the discharge air temperature is below the
minimum setpoint (10 °C).uHea > 0), then
the heating loop shall maintain space temperature at the heating
setpoint as follows:
uHea shall
reset the discharge temperature setpoint from current AHU SAT
setpoint TSupSet to a maximum of
dTDisZonSetMax above space temperature setpoint. The
airflow setpoint shall be the heating minimum
VActHeaMin_flow.TDis is greater than room temperature plus 3 Kelvin,
the heating loop output uHea shall reset the airflow
setpoint from the heating minimum airflow setpoint
VActHeaMin_flow to the heating maximum airflow
setpoint VActHeaMax_flow.The sequences of controlling damper and valve position for VAV reheat terminal unit are described in the following figure below.

As specified in Section 5.6.7 of ASHRAE Guideline 36, the airflow setpoint could be override by providing software switches that interlock to a system-level point to:
oveFloSet equals to 1, force the zone airflow
setpoint VSet_flow to zero,oveFloSet equals to 2, force the zone airflow
setpoint VSet_flow to zone cooling maximum airflow
rate VCooMax_flow,oveFloSet equals to 3, force the zone airflow
setpoint VSet_flow to zone minimum airflow setpoint
VMin_flow.oveFloSet equals to 4, force the zone airflow
setpoint VSet_flow to zone heating maximum airflow
setpoint VHeaMax_flow.have_preIndDam to exclude the
option of using pressure independant damper.