/* dtftorbcu.kb */


low( capacity_utilisation, 0 ).
high( capacity_utilisation, 100 ).
scale( capacity_utilisation, 'percent' ).
fuzzy_set( capacity_utilisation, low_cu      , down(0,65) ).           % Low.
fuzzy_set( capacity_utilisation, moderate_cu , trap(20, 25, 75, 95) ). % Moderate.
fuzzy_set( capacity_utilisation, high_cu     , up(85,100) ).           % Very close to fully utilised.

low( days_to_flight, 0 ).
high( days_to_flight, 62 ).
scale( days_to_flight, 'days' ).
fuzzy_set( days_to_flight, last_minute, down(0, 10) ).         % Very close to the flight date.
fuzzy_set( days_to_flight, few_days   , trap(1, 5, 22, 40) ). % Around less than half the timeline but not last-minute.
fuzzy_set( days_to_flight, many_days  , up(20,62) ).           % Around more than half the timeline remaining.

low( price_increase, 0 ).
high( price_increase, 100 ).
scale( price_increase, 'percent' ).
fuzzy_set( price_increase, low     , down(0, 25) ).     % Minimal increase in price.
fuzzy_set( price_increase, moderate, tri(20, 50, 75) ). % Noticeable increase but not extreme.
fuzzy_set( price_increase, high    , up(70, 100) ).     % High increase in price.
fuzzy_set( price_increase, highest , up(90, 100) ).     % Highest increase in price.


/* Business */

if class="business" and (days_to_flight be many_days and capacity_utilisation be low_cu)
then
   price_increase := low.

if class="business" and (days_to_flight be many_days and capacity_utilisation be moderate_cu)
then
   price_increase := low.

if class="business" and (days_to_flight be many_days and capacity_utilisation be high_cu)
then
   price_increase := high.
   
if class="business" and (days_to_flight be few_days and capacity_utilisation be low_cu)
then
   price_increase := low.

if class="business" and (days_to_flight be few_days and capacity_utilisation be moderate_cu)
then
   price_increase := moderate.

if class="business" and (days_to_flight be few_days and capacity_utilisation be high_cu)
then
   price_increase := high.
   
if class="business" and (days_to_flight be last_minute and capacity_utilisation be low_cu)
then
   price_increase := high.

if class="business" and (days_to_flight be last_minute and capacity_utilisation be moderate_cu)
then
   price_increase := high.

if class="business" and (days_to_flight be last_minute and capacity_utilisation be high_cu)
then
   price_increase := highest.

/* Tourist */

if class="tourist" and (days_to_flight be many_days and capacity_utilisation be low_cu)
then
   price_increase := low.

if class="tourist" and (days_to_flight be many_days and capacity_utilisation be moderate_cu)
then
   price_increase := low.

if class="tourist" and (days_to_flight be many_days and capacity_utilisation be high_cu)
then
   price_increase := moderate.
   
if class="tourist" and (days_to_flight be few_days and capacity_utilisation be low_cu)
then
   price_increase := low.

if class="tourist" and (days_to_flight be few_days and capacity_utilisation be moderate_cu)
then
   price_increase := moderate.

if class="tourist" and (days_to_flight be few_days and capacity_utilisation be high_cu)
then
   price_increase := moderate.
   
if class="tourist" and (days_to_flight be last_minute and capacity_utilisation be low_cu)
then
   price_increase := moderate.

if class="tourist" and (days_to_flight be last_minute and capacity_utilisation be moderate_cu)
then
   price_increase := moderate.

if class="tourist" and (days_to_flight be last_minute and capacity_utilisation be high_cu)
then
   price_increase := high.