<?xml version="1.0" encoding="UTF-8"?>
<definitions xmlns="https://www.omg.org/spec/DMN/20191111/MODEL/" id="Definitions_P06_CancellationPolicy" name="P06 Cancellation Policy Selection" namespace="http://hotel-national-zermatt/dmn">
  <decision id="Decision_P06_CancellationPolicySelection" name="Cancellation policy selection">
    <decisionTable id="DecisionTable_P06_CancellationPolicySelection" hitPolicy="FIRST">
      <input id="Input_P06_LeadDays" label="Lead days before check-in">
        <inputExpression id="InputExpression_P06_LeadDays" typeRef="number">
          <text>leadDays</text>
        </inputExpression>
      </input>
      <input id="Input_P06_Season" label="Season tier">
        <inputExpression id="InputExpression_P06_Season" typeRef="string">
          <text>seasonTier</text>
        </inputExpression>
      </input>
      <input id="Input_P06_ChannelRisk" label="Channel risk">
        <inputExpression id="InputExpression_P06_ChannelRisk" typeRef="string">
          <text>channelRisk</text>
        </inputExpression>
      </input>
      <input id="Input_P06_DemandPressure" label="Demand pressure">
        <inputExpression id="InputExpression_P06_DemandPressure" typeRef="string">
          <text>demandPressure</text>
        </inputExpression>
      </input>
      <output id="Output_P06_PolicyCode" label="Policy code" name="policyCode" typeRef="string" />
      <output id="Output_P06_Prepayment" label="Prepayment required" name="prepaymentRequired" typeRef="boolean" />
      <output id="Output_P06_Reason" label="Reason" name="reason" typeRef="string" />

      <rule id="Rule_P06_StrictPeak">
        <inputEntry id="Rule_P06_StrictPeak_Lead"><text>&lt;= 21</text></inputEntry>
        <inputEntry id="Rule_P06_StrictPeak_Season"><text>"peak"</text></inputEntry>
        <inputEntry id="Rule_P06_StrictPeak_Channel"><text>-</text></inputEntry>
        <inputEntry id="Rule_P06_StrictPeak_Demand"><text>"high"</text></inputEntry>
        <outputEntry id="Rule_P06_StrictPeak_Code"><text>"STRICT_14D"</text></outputEntry>
        <outputEntry id="Rule_P06_StrictPeak_Prepay"><text>true</text></outputEntry>
        <outputEntry id="Rule_P06_StrictPeak_Reason"><text>"short lead + peak demand"</text></outputEntry>
      </rule>

      <rule id="Rule_P06_ModerateHighRisk">
        <inputEntry id="Rule_P06_ModerateHighRisk_Lead"><text>&lt;= 30</text></inputEntry>
        <inputEntry id="Rule_P06_ModerateHighRisk_Season"><text>"shoulder"</text></inputEntry>
        <inputEntry id="Rule_P06_ModerateHighRisk_Channel"><text>"high"</text></inputEntry>
        <inputEntry id="Rule_P06_ModerateHighRisk_Demand"><text>-</text></inputEntry>
        <outputEntry id="Rule_P06_ModerateHighRisk_Code"><text>"MODERATE_7D"</text></outputEntry>
        <outputEntry id="Rule_P06_ModerateHighRisk_Prepay"><text>true</text></outputEntry>
        <outputEntry id="Rule_P06_ModerateHighRisk_Reason"><text>"channel risk requires tighter terms"</text></outputEntry>
      </rule>

      <rule id="Rule_P06_FlexibleLowRisk">
        <inputEntry id="Rule_P06_FlexibleLowRisk_Lead"><text>&gt; 30</text></inputEntry>
        <inputEntry id="Rule_P06_FlexibleLowRisk_Season"><text>"low"</text></inputEntry>
        <inputEntry id="Rule_P06_FlexibleLowRisk_Channel"><text>"low"</text></inputEntry>
        <inputEntry id="Rule_P06_FlexibleLowRisk_Demand"><text>"normal"</text></inputEntry>
        <outputEntry id="Rule_P06_FlexibleLowRisk_Code"><text>"FLEX_48H"</text></outputEntry>
        <outputEntry id="Rule_P06_FlexibleLowRisk_Prepay"><text>false</text></outputEntry>
        <outputEntry id="Rule_P06_FlexibleLowRisk_Reason"><text>"low-risk low-season demand capture"</text></outputEntry>
      </rule>

      <rule id="Rule_P06_Default">
        <inputEntry id="Rule_P06_Default_Lead"><text>-</text></inputEntry>
        <inputEntry id="Rule_P06_Default_Season"><text>-</text></inputEntry>
        <inputEntry id="Rule_P06_Default_Channel"><text>-</text></inputEntry>
        <inputEntry id="Rule_P06_Default_Demand"><text>-</text></inputEntry>
        <outputEntry id="Rule_P06_Default_Code"><text>"STANDARD_72H"</text></outputEntry>
        <outputEntry id="Rule_P06_Default_Prepay"><text>false</text></outputEntry>
        <outputEntry id="Rule_P06_Default_Reason"><text>"balanced default policy"</text></outputEntry>
      </rule>
    </decisionTable>
  </decision>
</definitions>
