[cells-devel] Question about families and kids

Josip Gracin gracin at tel.fer.hr
Wed Apr 25 07:31:35 UTC 2007


Thomas F. Burdick wrote:
> you need a suite of tree- or net-searching utilities to really enable
> the declarative style that makes Cells such a win.

This is what I don't actually understand.  I'm writing a simple aircraft 
simulator and I have a bunch of defmodel definitions for various 
systems, a bunch of input and output cells and I expect output cells to 
provide new values whenever their dependencies are changed.  Currently, 
this all works beautifully for me and I haven't used any explicit 
network modeling/searching.  I'm wondering if I am missing something.

As an example, I have something like the following:

=================================================================

(defmodel flight-parameters ()
   ((speed :initarg :speed
	  :cell t :initform (c-in 0) :accessor aircraft-speed)
    (altitude :initarg :altitude
	     :cell t :initform (c-in 0) :accessor aircraft-altitude)
    (heading :initarg :heading
	    :cell t :initform (c-in 0) :accessor aircraft-heading)))

=================================================================

(defclass aircraft ()
    (flight-parameters :initarg :flight-parameters
		      :accessor aircraft-flight-parameters)
    (lights :initarg :lights
	   :accessor aircraft-lights
	   :documentation "Light system.")
    (light-switches :initarg :light-switches
		   :accessor aircraft-light-switches)
    (flaps :initarg :flaps
	  :accessor aircraft-flaps)
    (gear :initarg :gear
	 :accessor aircraft-gear)))


=================================================================

(defmodel b777-flaps (flaps)
   ((lever-position :cell t
		   :initarg :lever-position
		   :accessor flaps-lever-position)
    (real-position :cell t
		  :initarg :real-position
		  :accessor flaps-real-position)
    (transit-start-time :cell nil
		       :initarg :transit-start-time
		       :accessor flaps-transit-start-time
		       :initform 0.0)
    (transit-start-position :cell nil
			   :initarg :transit-start-position
			   :accessor flaps-transit-start-position
			   :initform 0)
   (:default-initargs
       :lever-position (c-in 0)
     :real-position (c? (flaps-real-position-fn self))))

==================================================================



More information about the cells-devel mailing list