This example, taken from the AAAI-17 tutorial, Rulelog: Deep KRR for Cognitive Computing (available at http://benjamingrosof.com/wp-content/uploads/2017/02/aaai17-rulelog-tutorial-slides-final.pdf) illustrates how Ergo's defeasibility feature can be used in the e-commerce domain. We also give an example of the \date method for creating a date range.
In the scenario, a manufacturer, supplierCo, is selling widgets to a buyer, airplaneCo. The manufacturer offers a volume discount if the buyer orders between 100 and 1000 widgets.
Two rules, one for the usual (not discounted) price and one for the discounted price are created. When a quantity within the 100 to 1000 widget range is ordered, the discounted price takes priority over the usual price. Both the \overrides and \opposes commands are used to accomplish this.
Please download the annotated and executable file, pricing-example.ergo to work through the example. See the comments in the file for a full explanation of the example.