;;;; -*- Mode: LISP; Syntax: Common-Lisp; Base: 10 -*- ;;;; --------------------------------------------------------------------------- ;;;; File name: drag-force-example.lsp ;;;; System: FIRE/Solve ;;;; Author: Praveen Paritosh ;;;; Created: March 31, 2003 16:45:19 ;;;; Purpose: Estimating the drag force ;;;; --------------------------------------------------------------------------- ;;;; Modified: Tuesday, January 13, 2004 at 14:11:21 by paritosh ;;;; --------------------------------------------------------------------------- (in-package :data) ;; Example 2 (defparameter *cycle-drag-force-query* '(dragForce CyclingEvent01 ?force)) (defparameter *cycle-drag-force-facts* '((isa CyclingEvent01 CyclingEvent) (objectMoving CyclingEvent01 Cycle01) (providerOfMotiveForce CyclingEvent01 Cyclist01) (powerRating HumanBeing (Watt 200)) (poweredBy Cyclist01 Cycle01) (velocityOfObject Cyclist01 (MetersPerSec 9)) (isa Cyclist01 HumanBeing))) (defparameter *cycle-drag-force-suggestions* ;; If you want to know the total dragForce in a CyclingEvent ;; (which is the drag force on both the bike and the rider, just ;; as frictionalForce is defined), it is equal to all the force ;; that the rider (providerOfMotiveForce) is applying. It is not ;; exact, as some of that force is countering, e.g., the rolling ;; friction. '((defSuggestion ComputeDragForceViaBalance (dragForce ?CyclingEvent ?force) ;; minor problem with ask-isa since both args are ;; constants, the latter should be a cyc-defined ;; collection, which CyclingEvent isnt, and hence ;; commented out for a while. ;; :test (isa ?CyclingEvent CyclingEvent) :subgoals ((providerOfMotiveForce ?CyclingEvent ?provider) (forceCapacity ?provider ?force))) ;; If you want to know the force capacity of an agent -- if we know ;; its power rating (how much power it can produce), and how fast it ;; can go -- the power/vel gives us an estimate of the force that it ;; can apply. There is a sweeping assumption that all these numbers ;; are average estimates, and not peak figures. (defSuggestion PowerStrategyForForceCapacity (forceCapacity ?agent ?force) :subgoals ((powerRating ?agent ?power) (poweredBy ?agent ?device) ;;(maxSpeed ?device ?vel)) (velocityOfObject ?device ?vel)) :result-step ((evaluate ?force (QuotientFn ?power ?vel)))))) ;;; (defSuggestion ComputeDragForceViaFormula ;;; (dragForceActingOnObject ?object ?drag-force) ;;; :answer-variables (?drag-force) ;;; :subgoals ((objectMoving ?movement-event ?object) ;;; (areaOfObject ?object ?area) ;;; (velocityOfObject ?object ?velocity) ;;; (ambientDensity ?movement-event ?density) ;;; (dragCoefficient ?object ?c-drag)) ;;; :result-steps ((evaluate ?drag-force (TimesFn 0.5 ?c-drag ?density ?area ;;; (ExponentFn ?velocity 2))))) ;;; ;;; ;; The idea here is that we can compute the drag coefficient from another ;;; ;; example where the same object is involved, as its a property of ;;; ;; the geometry of the object. ;;; ;;; ;(defSuggestion ComputeDragCoefficient ;;; ; (dragCoefficient ?object ?c-drag) ;;; ; :subgoals (( ;;; )) ;;;(defparameter *cycle-drag-force-example* ;;; `(:assumptions ,*cycle-drag-force-facts* ;;; :suggestions ,*cycle-drag-force-suggestions* ;;; :query ,*cycle-drag-force-query*)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; End of Code