/* dtflm.kb */ 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, 12, 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) ). % Highest increase in price. if days_to_flight be many_days then price_increase := low. if days_to_flight be few_days then price_increase := moderate. if days_to_flight be last_minute then price_increase := high.