/* dtf.kb */ low( days_to_flight, 0 ). high( days_to_flight, 62 ). scale( days_to_flight, 'days' ). fuzzy_set( days_to_flight, few_days , down(0, 32) ). % Less than half the timeline remaining. fuzzy_set( days_to_flight, many_days, up(30, 62) ). % 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.