Re: Demo: Modelling Cost of Travel Paths Between Towns

From: Neo <neo55592_at_hotmail.com>
Date: 8 Nov 2004 22:43:30 -0800
Message-ID: <4b45d3ad.0411082243.624f22db_at_posting.google.com>


> There is no such time as 24:00 Hrs; read ISO-8601.

You are correct (but XDb2 has nothing to do with ISO-8601).

> ... SQL Script ....

Thanks for posting the script to model the data in RM. Below is XDb2's script to model it in approximately the same manner. A view of the data in a tree and grid is shown at www.xdb2.com/Example/Ex112b.asp

// Create base classes/verbs
CREATE2 *trip.cls = thing;

CREATE2 *city.cls = thing;
CREATE2 *a.cls = city;
CREATE2 *b.cls = city;
CREATE2 *c.cls = city;
CREATE2 *d.cls = city;

CREATE2 *src.cls = verb;
CREATE2 *dest.cls = verb;
CREATE2 *weekday.cls = thing;
CREATE2 *start.cls = thing;

CREATE2 *end.cls = thing;
CREATE2 *cost.cls = thing;

// Create trip from a to b
// on monday from 00:00 to 24:00 costs 1.00 CREATE2 *;

CREATE2 it.cls = trip;
CREATE2 it.src = a;
CREATE2 it.dest = b;
CREATE2 it.weekday = +monday;
CREATE2 it.start = +00:00;  // inclusive
CREATE2 it.end =  +24:00;   // exclusive
CREATE2 it.cost = +1.00

// Create trip from b to a
// on monday from 00:00 to 24:00 costs 1.00 CREATE2 *;

CREATE2 it.cls = trip;
CREATE2 it.src = b;
CREATE2 it.dest = a;
CREATE2 it.weekday = +monday;
CREATE2 it.start = +00:00;  // inclusive
CREATE2 it.end =  +24:00;   // exclusive
CREATE2 it.cost = +1.00;
Received on Tue Nov 09 2004 - 07:43:30 CET

Original text of this message