<?xml version="1.0" encoding="utf-8"?>
<ruleList functionFile="RuleFunctions.cs" namespace="SpaceTimeMain" class="RuleFunctions">
  <rule type="room" id="maxCapacity">
    <p type="priority">100</p>
    <p type="variables">
      <var name="BanquetCapacity"/>
      <var name="ClassroomCapacity"/>
      <var name="ConferenceCapacity"/>
      <var name="ReceptionCapacity"/>
      <var name="SquareCapacity"/>
      <var name="TheaterCapacity"/>
      <var name="UShapeCapacity"/>
    </p>
    <p type="defaults">
      <default type="maxCapacity">
	<computation id="mc">
	  <function name="max7">
	    <arg name="BanquetCapacity"/>
	    <arg name="ClassroomCapacity"/>
	    <arg name="ConferenceCapacity"/>
	    <arg name="ReceptionCapacity"/>
	    <arg name="SquareCapacity"/>
	    <arg name="TheaterCapacity"/>
	    <arg name="UShapeCapacity"/>
	  </function>	    
	</computation>
	<value>mc</value>
      </default>
    </p>
  </rule>
  <rule type="event" id="duration">
    <p type="priority">100</p>
    <p type="property" property="requestedDuration-Minutes">known</p>
    <p type="variables">
      <var name="requestedDuration-Minutes"/>
    </p>
    <p type="constants">
      <var name="minSeconds">60</var>
      <var name="minus45">-45</var>
      <var name="minus30">-30</var>
      <var name="minus15">-15</var>
      <var name="zero">0</var>
      <var name="plus15">15</var>
      <var name="plus30">30</var>
      <var name="plus45">45</var>
    </p>
    <p type="eventType">
      <event type="request"/>
    </p>
    <p type="defaults">
      <default type="durationPref">
        <computation id="approxZero1">
          <function name="dotProduct">
            <arg name="minSeconds"/>
            <arg name="requestedDuration-Minutes"/>
            <arg name="minSeconds"/>
            <arg name="minus30"/>	    
          </function>
        </computation>
        <computation id="approxZero">
          <function name="min2">
            <arg name="approxZero1"/>
            <arg name="zero"/>
          </function>
        </computation>
        <computation id="rMinus30">
          <function name="dotProduct">
            <arg name="minSeconds"/>
            <arg name="requestedDuration-Minutes"/>
            <arg name="minSeconds"/>
            <arg name="minus30"/>
          </function>
        </computation>
        <computation id="ScoreAtRMinus30">
          <function name="durScoreAtRMinus30">
            <arg name="requestedDuration-Minutes"/>
          </function>
        </computation>
        <computation id="rMinus15">
          <function name="dotProduct">
            <arg name="minSeconds"/>
            <arg name="requestedDuration-Minutes"/>
            <arg name="minSeconds"/>
            <arg name="minus15"/>
          </function>
        </computation>
        <computation id="rPlus15">
          <function name="dotProduct">
            <arg name="minSeconds"/>
            <arg name="requestedDuration-Minutes"/>
            <arg name="minSeconds"/>
            <arg name="plus15"/>
          </function>
        </computation>
        <computation id="rPlus30">
          <function name="dotProduct">
            <arg name="minSeconds"/>
            <arg name="requestedDuration-Minutes"/>
            <arg name="minSeconds"/>
            <arg name="plus30"/>
          </function>
        </computation>
        <computation id="ScoreAtRPlus30">
          <function name="durScoreAtRPlus30">
            <arg name="requestedDuration-Minutes"/>
          </function>
        </computation>
        <computation id="rPlus45">
          <function name="dotProduct">
            <arg name="minSeconds"/>
            <arg name="requestedDuration-Minutes"/>
            <arg name="minSeconds"/>
            <arg name="plus45"/>
          </function>
        </computation>
        <value>
          <plf>
            <v1>approxZero</v1>
            <v2>-5</v2>
            <v1>rMinus30</v1>
            <v2>ScoreAtRMinus30</v2>
            <v1>rMinus15</v1>
            <v2>1</v2>
            <v1>rPlus15</v1>
            <v2>1</v2>
            <v1>rPlus30</v1>
            <v2>ScoreAtRPlus30</v2>
            <v1>rPlus45</v1>
            <v2>-5</v2>
          </plf>
        </value>
      </default>
    </p>
  </rule>
  <rule type="event" id="regularMeals">
    <p type="priority">100</p>
    <p type="property" property="estimatedAttendance">known</p>
<!--
    <p type="property" property="requestedVegetarianMeals">known</p>
    <p type="property" property="requestedKosherMeals">known</p>
    <p type="property" property="requestedVeganMeals">known</p>
    <p type="property" property="requestedAtkinsMeals">known</p>
-->
    <p type="property" property="requestedCateringService">known</p>
    <p type="type">
      <request type="request"/>
    </p>
    <p type="variables">
      <var name="requestedCateringService"/>
      <var name="estimatedAttendance"/>
      <var name="requestedVegetarianMeals"/>
      <var name="requestedKosherMeals"/>
      <var name="requestedVeganMeals"/>
      <var name="requestedAtkinsMeals"/>
    </p>
    <p type="constants">
      <var name="zero">0</var>
      <var name="one">1</var>
      <var name="minus1">-1</var>
    </p>
    <p type="defaults">
      <default type="requestedRegularMeals">
	<computation id="indicator">
	  <function name="booleanIndicator">
	    <arg name="requestedCateringService"/>
	  </function>
	</computation>
	<computation id="irregularMeals">
	  <function name="sum4">
            <arg name="requestedVegetarianMeals"/>
            <arg name="requestedKosherMeals"/>
            <arg name="requestedVeganMeals"/>
            <arg name="requestedAtkinsMeals"/>
	  </function>
	</computation>
	<computation id="regularMeals">
	  <function name="dotProduct">
            <arg name="one"/>
            <arg name="estimatedAttendance"/>
            <arg name="minus1"/>
            <arg name="irregularMeals"/>
	  </function>
	</computation>
	<computation id="regularMeals2">
	  <function name="dotProduct">
            <arg name="indicator"/>
            <arg name="regularMeals"/>
	    <arg name="zero"/>
	    <arg name="zero"/>
	  </function>
	</computation>
        <computation id="requestedRegularMeals">
          <function name="max2">
            <arg name="regularMeals2"/>
            <arg name="zero"/>
          </function>
        </computation>
        <value>requestedRegularMeals</value>
      </default>
    </p>
  </rule>
  <rule type="event" id="maxCapacity">
    <p type="priority">100</p>
    <p type="property" property="estimatedAttendance">
      <range type="numeric">
        <interval low="1" high="9999"/>
      </range>
    </p>
    <p type="variables">
      <var name="estimatedAttendance"/>
    </p>
    <p type="constants">
      <var name="recip11">0.9090909</var> <!-- reciprocal of 1.1 -->
      <var name="recip09">1.111111</var> <!-- reciprocal of 0.9 -->
      <var name="one">1.0</var>
      <var name="two">2.0</var>
      <var name="minus1">-1</var>    
      <var name="plus1">1</var>    
      <var name="zero">0</var>    
    </p>
    <p type="eventType">
      <event type="request"/>
    </p>
    <p type="defaults">
      <default type="maxCapacityPref">
        <computation id="capMaxZeroScore">
          <function name="dotProductDouble">
            <arg name="recip11"/>
            <arg name="estimatedAttendance"/>
            <arg name="one"/>
            <arg name="minus1"/>
          </function>
        </computation>
        <computation id="capMinPosScore">
          <function name="dotProductDouble">
            <arg name="recip11"/>
            <arg name="estimatedAttendance"/>
            <arg name="zero"/>
            <arg name="zero"/>
          </function>
        </computation>
        <computation id="minPosScore">
          <function name="capScoreAtDiv11">
            <arg name="estimatedAttendance"/>
          </function>
        </computation>
        <computation id="capMinFullScore">
          <function name="dotProductDouble">
            <arg name="recip09"/>
            <arg name="estimatedAttendance"/>
            <arg name="zero"/>
            <arg name="zero"/>
          </function>
        </computation>
        <computation id="capMaxFullScore">
          <function name="dotProductDouble">
            <arg name="two"/>
            <arg name="estimatedAttendance"/>
            <arg name="zero"/>
            <arg name="zero"/>
          </function>
        </computation>
        <computation id="capMaxPlus1">
          <function name="dotProductDouble">
            <arg name="two"/>
            <arg name="estimatedAttendance"/>
            <arg name="one"/>
            <arg name="plus1"/>
          </function>
        </computation>
        <value>
          <plf>
            <v1>capMaxZeroScore</v1>
            <v2>-5</v2>
            <v1>capMinPosScore</v1>
            <v2>minPosScore</v2>
            <v1>capMinFullScore</v1>
            <v2>1</v2>
            <v1>capMaxFullScore</v1>
            <v2>1</v2>
            <v1>capMaxPlus1</v1>
            <v2>-0.8</v2>
          </plf>
        </value>
      </default>
    </p>
  </rule>
  <rule type="event" id="BanquetCapacity">
    <p type="priority">100</p>
    <p type="property" property="estimatedAttendance">
      <range type="numeric">
        <interval low="1" high="9999"/>
      </range>
    </p>
    <p type="property" property="capacityType">
      <range type="nominal">
        <value>banquet</value>
      </range>
    </p>
    <p type="variables">
      <var name="estimatedAttendance"/>
    </p>
    <p type="constants">
      <var name="recip11">0.9090909</var> <!-- reciprocal of 1.1 -->
      <var name="recip09">1.111111</var> <!-- reciprocal of 0.9 -->
      <var name="one">1.0</var>
      <var name="two">2.0</var>
      <var name="minus1">-1</var>    
      <var name="plus1">1</var>    
      <var name="zero">0</var>    
    </p>
    <p type="eventType">
      <event type="request"/>
    </p>
    <p type="defaults">
      <default type="BanquetCapacityPref">
        <computation id="capMaxZeroScore">
          <function name="dotProductDouble">
            <arg name="recip11"/>
            <arg name="estimatedAttendance"/>
            <arg name="one"/>
            <arg name="minus1"/>
          </function>
        </computation>
        <computation id="capMinPosScore">
          <function name="dotProductDouble">
            <arg name="recip11"/>
            <arg name="estimatedAttendance"/>
            <arg name="zero"/>
            <arg name="zero"/>
          </function>
        </computation>
        <computation id="minPosScore">
          <function name="capScoreAtDiv11">
            <arg name="estimatedAttendance"/>
          </function>
        </computation>
        <computation id="capMinFullScore">
          <function name="dotProductDouble">
            <arg name="recip09"/>
            <arg name="estimatedAttendance"/>
            <arg name="zero"/>
            <arg name="zero"/>
          </function>
        </computation>
        <computation id="capMaxFullScore">
          <function name="dotProductDouble">
            <arg name="two"/>
            <arg name="estimatedAttendance"/>
            <arg name="zero"/>
            <arg name="zero"/>
          </function>
        </computation>
        <computation id="capMaxPlus1">
          <function name="dotProductDouble">
            <arg name="two"/>
            <arg name="estimatedAttendance"/>
            <arg name="one"/>
            <arg name="plus1"/>
          </function>
        </computation>
        <value>
          <plf>
            <v1>capMaxZeroScore</v1>
            <v2>-5</v2>
            <v1>capMinPosScore</v1>
            <v2>minPosScore</v2>
            <v1>capMinFullScore</v1>
            <v2>1</v2>
            <v1>capMaxFullScore</v1>
            <v2>1</v2>
            <v1>capMaxPlus1</v1>
            <v2>-0.8</v2>
          </plf>
        </value>
      </default>
    </p>
  </rule>
  <rule type="event" id="ClassroomCapacity">
    <p type="priority">100</p>
    <p type="property" property="estimatedAttendance">
      <range type="numeric">
        <interval low="1" high="9999"/>
      </range>
    </p>
    <p type="property" property="capacityType">
      <range type="nominal">
        <value>classroom</value>
      </range>
    </p>
    <p type="variables">
      <var name="estimatedAttendance"/>
    </p>
    <p type="constants">
      <var name="recip11">0.9090909</var> <!-- reciprocal of 1.1 -->
      <var name="recip09">1.111111</var> <!-- reciprocal of 0.9 -->
      <var name="one">1.0</var>
      <var name="two">2.0</var>
      <var name="minus1">-1</var>    
      <var name="plus1">1</var>    
      <var name="zero">0</var>    
    </p>
    <p type="eventType">
      <event type="request"/>
    </p>
    <p type="defaults">
      <default type="ClassroomCapacityPref">
        <computation id="capMaxZeroScore">
          <function name="dotProductDouble">
            <arg name="recip11"/>
            <arg name="estimatedAttendance"/>
            <arg name="one"/>
            <arg name="minus1"/>
          </function>
        </computation>
        <computation id="capMinPosScore">
          <function name="dotProductDouble">
            <arg name="recip11"/>
            <arg name="estimatedAttendance"/>
            <arg name="zero"/>
            <arg name="zero"/>
          </function>
        </computation>
        <computation id="minPosScore">
          <function name="capScoreAtDiv11">
            <arg name="estimatedAttendance"/>
          </function>
        </computation>
        <computation id="capMinFullScore">
          <function name="dotProductDouble">
            <arg name="recip09"/>
            <arg name="estimatedAttendance"/>
            <arg name="zero"/>
            <arg name="zero"/>
          </function>
        </computation>
        <computation id="capMaxFullScore">
          <function name="dotProductDouble">
            <arg name="two"/>
            <arg name="estimatedAttendance"/>
            <arg name="zero"/>
            <arg name="zero"/>
          </function>
        </computation>
        <computation id="capMaxPlus1">
          <function name="dotProductDouble">
            <arg name="two"/>
            <arg name="estimatedAttendance"/>
            <arg name="one"/>
            <arg name="plus1"/>
          </function>
        </computation>
        <value>
          <plf>
            <v1>capMaxZeroScore</v1>
            <v2>-5</v2>
            <v1>capMinPosScore</v1>
            <v2>minPosScore</v2>
            <v1>capMinFullScore</v1>
            <v2>1</v2>
            <v1>capMaxFullScore</v1>
            <v2>1</v2>
            <v1>capMaxPlus1</v1>
            <v2>-0.8</v2>
          </plf>
        </value>
      </default>
    </p>
  </rule>
  <rule type="event" id="ConferenceCapacity">
    <p type="priority">100</p>
    <p type="property" property="estimatedAttendance">
      <range type="numeric">
        <interval low="1" high="9999"/>
      </range>
    </p>
    <p type="property" property="capacityType">
      <range type="nominal">
        <value>conference</value>
      </range>
    </p>
    <p type="variables">
      <var name="estimatedAttendance"/>
    </p>
    <p type="constants">
      <var name="recip11">0.9090909</var> <!-- reciprocal of 1.1 -->
      <var name="recip09">1.111111</var> <!-- reciprocal of 0.9 -->
      <var name="one">1.0</var>
      <var name="two">2.0</var>
      <var name="minus1">-1</var>    
      <var name="plus1">1</var>    
      <var name="zero">0</var>    
    </p>
    <p type="eventType">
      <event type="request"/>
    </p>
    <p type="defaults">
      <default type="ConferenceCapacityPref">
        <computation id="capMaxZeroScore">
          <function name="dotProductDouble">
            <arg name="recip11"/>
            <arg name="estimatedAttendance"/>
            <arg name="one"/>
            <arg name="minus1"/>
          </function>
        </computation>
        <computation id="capMinPosScore">
          <function name="dotProductDouble">
            <arg name="recip11"/>
            <arg name="estimatedAttendance"/>
            <arg name="zero"/>
            <arg name="zero"/>
          </function>
        </computation>
        <computation id="minPosScore">
          <function name="capScoreAtDiv11">
            <arg name="estimatedAttendance"/>
          </function>
        </computation>
        <computation id="capMinFullScore">
          <function name="dotProductDouble">
            <arg name="recip09"/>
            <arg name="estimatedAttendance"/>
            <arg name="zero"/>
            <arg name="zero"/>
          </function>
        </computation>
        <computation id="capMaxFullScore">
          <function name="dotProductDouble">
            <arg name="two"/>
            <arg name="estimatedAttendance"/>
            <arg name="zero"/>
            <arg name="zero"/>
          </function>
        </computation>
        <computation id="capMaxPlus1">
          <function name="dotProductDouble">
            <arg name="two"/>
            <arg name="estimatedAttendance"/>
            <arg name="one"/>
            <arg name="plus1"/>
          </function>
        </computation>
        <value>
          <plf>
            <v1>capMaxZeroScore</v1>
            <v2>-5</v2>
            <v1>capMinPosScore</v1>
            <v2>minPosScore</v2>
            <v1>capMinFullScore</v1>
            <v2>1</v2>
            <v1>capMaxFullScore</v1>
            <v2>1</v2>
            <v1>capMaxPlus1</v1>
            <v2>-0.8</v2>
          </plf>
        </value>
      </default>
    </p>
  </rule>
  <rule type="event" id="ReceptionCapacity">
    <p type="priority">100</p>
    <p type="property" property="estimatedAttendance">
      <range type="numeric">
        <interval low="1" high="9999"/>
      </range>
    </p>
    <p type="property" property="capacityType">
      <range type="nominal">
        <value>reception</value>
      </range>
    </p>
    <p type="variables">
      <var name="estimatedAttendance"/>
    </p>
    <p type="constants">
      <var name="recip11">0.9090909</var> <!-- reciprocal of 1.1 -->
      <var name="recip09">1.111111</var> <!-- reciprocal of 0.9 -->
      <var name="one">1.0</var>
      <var name="two">2.0</var>
      <var name="minus1">-1</var>    
      <var name="plus1">1</var>    
      <var name="zero">0</var>    
    </p>
    <p type="eventType">
      <event type="request"/>
    </p>
    <p type="defaults">
      <default type="ReceptionCapacityPref">
        <computation id="capMaxZeroScore">
          <function name="dotProductDouble">
            <arg name="recip11"/>
            <arg name="estimatedAttendance"/>
            <arg name="one"/>
            <arg name="minus1"/>
          </function>
        </computation>
        <computation id="capMinPosScore">
          <function name="dotProductDouble">
            <arg name="recip11"/>
            <arg name="estimatedAttendance"/>
            <arg name="zero"/>
            <arg name="zero"/>
          </function>
        </computation>
        <computation id="minPosScore">
          <function name="capScoreAtDiv11">
            <arg name="estimatedAttendance"/>
          </function>
        </computation>
        <computation id="capMinFullScore">
          <function name="dotProductDouble">
            <arg name="recip09"/>
            <arg name="estimatedAttendance"/>
            <arg name="zero"/>
            <arg name="zero"/>
          </function>
        </computation>
        <computation id="capMaxFullScore">
          <function name="dotProductDouble">
            <arg name="two"/>
            <arg name="estimatedAttendance"/>
            <arg name="zero"/>
            <arg name="zero"/>
          </function>
        </computation>
        <computation id="capMaxPlus1">
          <function name="dotProductDouble">
            <arg name="two"/>
            <arg name="estimatedAttendance"/>
            <arg name="one"/>
            <arg name="plus1"/>
          </function>
        </computation>
        <value>
          <plf>
            <v1>capMaxZeroScore</v1>
            <v2>-5</v2>
            <v1>capMinPosScore</v1>
            <v2>minPosScore</v2>
            <v1>capMinFullScore</v1>
            <v2>1</v2>
            <v1>capMaxFullScore</v1>
            <v2>1</v2>
            <v1>capMaxPlus1</v1>
            <v2>-0.8</v2>
          </plf>
        </value>
      </default>
    </p>
  </rule>
  <rule type="event" id="SquareCapacity">
    <p type="priority">100</p>
    <p type="property" property="estimatedAttendance">
      <range type="numeric">
        <interval low="1" high="9999"/>
      </range>
    </p>
    <p type="property" property="capacityType">
      <range type="nominal">
        <value>square</value>
      </range>
    </p>
    <p type="variables">
      <var name="estimatedAttendance"/>
    </p>
    <p type="constants">
      <var name="recip11">0.9090909</var> <!-- reciprocal of 1.1 -->
      <var name="recip09">1.111111</var> <!-- reciprocal of 0.9 -->
      <var name="one">1.0</var>
      <var name="two">2.0</var>
      <var name="minus1">-1</var>    
      <var name="plus1">1</var>    
      <var name="zero">0</var>    
    </p>
    <p type="eventType">
      <event type="request"/>
    </p>
    <p type="defaults">
      <default type="SquareCapacityPref">
        <computation id="capMaxZeroScore">
          <function name="dotProductDouble">
            <arg name="recip11"/>
            <arg name="estimatedAttendance"/>
            <arg name="one"/>
            <arg name="minus1"/>
          </function>
        </computation>
        <computation id="capMinPosScore">
          <function name="dotProductDouble">
            <arg name="recip11"/>
            <arg name="estimatedAttendance"/>
            <arg name="zero"/>
            <arg name="zero"/>
          </function>
        </computation>
        <computation id="minPosScore">
          <function name="capScoreAtDiv11">
            <arg name="estimatedAttendance"/>
          </function>
        </computation>
        <computation id="capMinFullScore">
          <function name="dotProductDouble">
            <arg name="recip09"/>
            <arg name="estimatedAttendance"/>
            <arg name="zero"/>
            <arg name="zero"/>
          </function>
        </computation>
        <computation id="capMaxFullScore">
          <function name="dotProductDouble">
            <arg name="two"/>
            <arg name="estimatedAttendance"/>
            <arg name="zero"/>
            <arg name="zero"/>
          </function>
        </computation>
        <computation id="capMaxPlus1">
          <function name="dotProductDouble">
            <arg name="two"/>
            <arg name="estimatedAttendance"/>
            <arg name="one"/>
            <arg name="plus1"/>
          </function>
        </computation>
        <value>
          <plf>
            <v1>capMaxZeroScore</v1>
            <v2>-5</v2>
            <v1>capMinPosScore</v1>
            <v2>minPosScore</v2>
            <v1>capMinFullScore</v1>
            <v2>1</v2>
            <v1>capMaxFullScore</v1>
            <v2>1</v2>
            <v1>capMaxPlus1</v1>
            <v2>-0.8</v2>
          </plf>
        </value>
      </default>
    </p>
  </rule>
  <rule type="event" id="TheaterCapacity">
    <p type="priority">100</p>
    <p type="property" property="estimatedAttendance">
      <range type="numeric">
        <interval low="1" high="9999"/>
      </range>
    </p>
    <p type="property" property="capacityType">
      <range type="nominal">
        <value>theater</value>
      </range>
    </p>
    <p type="variables">
      <var name="estimatedAttendance"/>
    </p>    
    <p type="constants">
      <var name="recip11">0.9090909</var> <!-- reciprocal of 1.1 -->
      <var name="recip09">1.111111</var> <!-- reciprocal of 0.9 -->
      <var name="one">1.0</var>
      <var name="two">2.0</var>
      <var name="minus1">-1</var>    
      <var name="plus1">1</var>    
      <var name="zero">0</var>    
    </p>
    <p type="eventType">
      <event type="request"/>
    </p>
    <p type="defaults">
      <default type="TheaterCapacityPref">
        <computation id="capMaxZeroScore">
          <function name="dotProductDouble">
            <arg name="recip11"/>
            <arg name="estimatedAttendance"/>
            <arg name="one"/>
            <arg name="minus1"/>
          </function>
        </computation>
        <computation id="capMinPosScore">
          <function name="dotProductDouble">
            <arg name="recip11"/>
            <arg name="estimatedAttendance"/>
            <arg name="zero"/>
            <arg name="zero"/>
          </function>
        </computation>
        <computation id="minPosScore">
          <function name="capScoreAtDiv11">
            <arg name="estimatedAttendance"/>
          </function>
        </computation>
        <computation id="capMinFullScore">
          <function name="dotProductDouble">
            <arg name="recip09"/>
            <arg name="estimatedAttendance"/>
            <arg name="zero"/>
            <arg name="zero"/>
          </function>
        </computation>
        <computation id="capMaxFullScore">
          <function name="dotProductDouble">
            <arg name="two"/>
            <arg name="estimatedAttendance"/>
            <arg name="zero"/>
            <arg name="zero"/>
          </function>
        </computation>
        <computation id="capMaxPlus1">
          <function name="dotProductDouble">
            <arg name="two"/>
            <arg name="estimatedAttendance"/>
            <arg name="one"/>
            <arg name="plus1"/>
          </function>
        </computation>
        <value>
          <plf>
            <v1>capMaxZeroScore</v1>
            <v2>-5</v2>
            <v1>capMinPosScore</v1>
            <v2>minPosScore</v2>
            <v1>capMinFullScore</v1>
            <v2>1</v2>
            <v1>capMaxFullScore</v1>
            <v2>1</v2>
            <v1>capMaxPlus1</v1>
            <v2>-0.8</v2>
          </plf>
        </value>
      </default>
    </p>
  </rule>
  <rule type="event" id="UShapeCapacity">
    <p type="priority">100</p>
    <p type="property" property="estimatedAttendance">
      <range type="numeric">
        <interval low="1" high="9999"/>
      </range>
    </p>
    <p type="property" property="capacityType">
      <range type="nominal">
        <value>ushape</value>
      </range>
    </p>
    <p type="variables">
      <var name="estimatedAttendance"/>
    </p>
    <p type="constants">
      <var name="recip11">0.9090909</var> <!-- reciprocal of 1.1 -->
      <var name="recip09">1.111111</var> <!-- reciprocal of 0.9 -->
      <var name="one">1.0</var>
      <var name="two">2.0</var>
      <var name="minus1">-1</var>    
      <var name="plus1">1</var>    
      <var name="zero">0</var>    
    </p>
    <p type="eventType">
      <event type="request"/>
    </p>
    <p type="defaults">
      <default type="UShapeCapacityPref">
        <computation id="capMaxZeroScore">
          <function name="dotProductDouble">
            <arg name="recip11"/>
            <arg name="estimatedAttendance"/>
            <arg name="one"/>
            <arg name="minus1"/>
          </function>
        </computation>
        <computation id="capMinPosScore">
          <function name="dotProductDouble">
            <arg name="recip11"/>
            <arg name="estimatedAttendance"/>
            <arg name="zero"/>
            <arg name="zero"/>
          </function>
        </computation>
        <computation id="minPosScore">
          <function name="capScoreAtDiv11">
            <arg name="estimatedAttendance"/>
          </function>
        </computation>
        <computation id="capMinFullScore">
          <function name="dotProductDouble">
            <arg name="recip09"/>
            <arg name="estimatedAttendance"/>
            <arg name="zero"/>
            <arg name="zero"/>
          </function>
        </computation>
        <computation id="capMaxFullScore">
          <function name="dotProductDouble">
            <arg name="two"/>
            <arg name="estimatedAttendance"/>
            <arg name="zero"/>
            <arg name="zero"/>
          </function>
        </computation>
        <computation id="capMaxPlus1">
          <function name="dotProductDouble">
            <arg name="two"/>
            <arg name="estimatedAttendance"/>
            <arg name="one"/>
            <arg name="plus1"/>
          </function>
        </computation>
        <value>
          <plf>
            <v1>capMaxZeroScore</v1>
            <v2>-5</v2>
            <v1>capMinPosScore</v1>
            <v2>minPosScore</v2>
            <v1>capMinFullScore</v1>
            <v2>1</v2>
            <v1>capMaxFullScore</v1>
            <v2>1</v2>
            <v1>capMaxPlus1</v1>
            <v2>-0.8</v2>
          </plf>
        </value>
      </default>
    </p>
  </rule>
  <rule type="cost" id="costFnFromBudget"> 
    <p type="priority">100</p> 
    <p type="conferenceProperty" property="totalBudget">known</p> 
    <p type="conferenceVariables">
      <var name="totalBudget"/>
    </p>
    <p type="constants">
      <var name="addConstant">3800000</var>
    </p>
    <p type="defaults">
      <default type="costPref">
	<computation id="c1">totalBudget</computation>
	<computation id="c2">
	  <function name="sum2">
	    <arg name="totalBudget"/>
	    <arg name="addConstant"/>
	  </function>	    
	</computation>
	<value>
	  <plf>
	    <v1>c1</v1>
	    <v2>0</v2>
	    <v1>c2</v1>
	    <v2>0.48</v2>
	  </plf>
	</value>
      </default>
    </p>
  </rule>
</ruleList>
