70 likes | 83 Views
Example of Multi-Use Ontology: Units and Measures. Professor Richard Fikes. CS222 Winter 2001. Computer Science Department Stanford University. Knowledge Systems Laboratory, Stanford University. 2/7/01. Units and Measures. Mathematical models of engineered systems Physical-Quantities
E N D
Example of Multi-Use Ontology: Units and Measures Professor Richard Fikes CS222 Winter 2001 Computer Science Department Stanford University Knowledge Systems Laboratory, Stanford University 2/7/01
Units and Measures • Mathematical models of engineered systems • Physical-Quantities E.g., 3 meters, 80 kilometers/hour • Physical-Dimensions E.g., length, velocity, weight, time • Units-Of-Measure E.g., meters, kilometers/hour • Magnitudes E.g., scalars, vectors, tensors, and functions thereof
Magnitude of a Quantity in a Unit Physical-Dimension Instance-Of: Class *Standard-Unit Slot-Cardinality: 1 Value-Type: Unit-Of-Measure Unit-Of-Measure Instance-Of: Class *Unit-Dimension Slot-Cardinality: 1 Value-Type: Physical-Dimension Physical-Quantity Instance-Of: Class *Quantity-Dimension Slot-Cardinality: 1 Value-Type: Physical-Dimension Magnitude Instance-Of: Class
Unit* • (Deffunction Unit* “Unit* is an associative commutative mapping of all pairs of units to units” (and (=> (Instance-Of ?u1 Unit-Of-Measure) (Instance-Of ?u2 Unit-Of-Measure) (Unit-Of-Measure (Unit* ?u1 ?u2))) (= (Unit* ?u1 ?u2) (Unit* ?u2 ?u1)) (= (Unit* ?u1 (Unit* ?u2 ?u3)) (Unit* (Unit* ?u1 ?u2) ?u3))))
Unit^ • (Deffunction Unit^ “Unit^ is a mapping of reals to units that has the algebraic properties of exponentiation” (and (=> (Instance-Of ?u Unit-Of-Measure) (Instance-Of ?r Real-Number) (Unit-Of-Measure (Unit^ ?u ?r))) (= (Unit^ ?u 1) ?u) (= (Unit* (Unit^ ?u ?r1) (Unit^ ?u ?r2)) (Unit^ ?u (+ ?r1 ?r2))) (= (Unit^ (Unit* ?u1 ?u2) ?r) (Unit* (Unit^ ?u1 ?r) (Unit^ ?u2 ?r))))) • Example (Defobject Meter/Second (Unit* Meter (Unit^ Second –1)))
Magnitude of Physical Quantities • (Deffunction Quantity-Magnitude “The magnitude of a physical quantity in a given unit of measure” (=> (and (Quantity-Magnitude ?q ?u ?m) (/= ?m ^)) (and (Instance-Of ?q Physical-Quantity) (Instance-Of ?u Unit-Of-Measure) (Instance-Of ?m Magnitude) (= (Quantity-Dimension ?q) (Unit-Dimension ?u))) • (Deffunction The-Quantity “The physical quantity with a given magnitude in a given unit of measure” (<=> (The-Quantity ?m ?u ?q) (Quantity-Magnitude ?q ?u ?m)) E.g., (Debobject Real-Fast (The-Quantity 10000 Meter/Second)) • (=> (Instance-Of ?q1 Physical-Quantity) (Instance-Of ?q2 Physical-Quantity) (<=> (= ?q1 ?q2) (and (Quantity-Dimension ?q1 (Quantity-Dimension ?q2)) (=> (Instance-Of ?u Unit-Of-Measure) (Unit-Dimension ?u (Quantity-Dimension ?q1)) (Quantity-Magnitude ?q1 ?u (Quantity-Magnitude ?q2 ?u))))))
Example Definitions • Length-Dimension Instance-of: Physical-Dimension Standard-Unit: Meter • Length-Unit-Of-Measure Subclass-Of: Unit-Of-Measure *Unit-Dimension: Length-Dimension • Meter Instance-Of: Length-Unit-Of-Measure • Kilometer Instance-Of: Length-Unit-Of-Measure ============================================================ (=> (and (Instance-Of ?q1 Physical-Quantity) (Quantity-Dimension ?q1 Length-Dimension)) (= (Quantity-Magnitude ?q1 Kilometer) (/ (Quantity-Magnitude ?q1 Meter) 1000)))