Air examples
This include 3 examples in the air environment
collected in an "Air" Protege
project
(Air.pprj, Air.pont and Air.pins files) and demonstrates a
mixed
technique when scenario actions trigger rules
and alternatively firing rules start scenarios. Additionally a "Flight
Departures" example demonstrates creating "facts" from the map data
and
using them in rule-based reasoning. This demo also demonstrates
"task
execution" functionality.
"Global Air Traffic" example is a somewhat performance test. The
logic
of
terrorists movement in a "Terrorist Location Distribution"
example described in a Terrorist
Rules.
Running "Flight Departures" example
1. Start run_protege.sh (Linux, Mac OS X) or run_protege.bat
(Windows).
2. Open the project Air.pprj, go to the "Drools" Tab and compile
ontology. This
should be done only once for this project.
3. Create RuleBase and evaluate the "Create DroTimer from
RuNA" script.(Sometimes
creating RuleBase just
after compiling you can get an error message. In that case close
the
project and restart Protege. Don't recompile ontology but go straight to
creation of the Rule Base).
4. Go to the "OpenMap" Tab and click a "Play scenario" button (with
a
black
triangle), select a "f1.Flight Departures" scenario and click OK.
5. Start timer and set time scale to 32:1. After a time air planes
would begin to
departure in accordance with a timetable. The timetable consists of
instances of a Protege class
"Flight" (you will find them on the "Instances" Tab
and can add your own instances there for the next
run).
6. To see "task execution" first
execute a command "Task Button Support".
7. Next click a "Control object" button (with a steering wheel).
Select some object and click OK. "Navigating Object Frame" would
appear. With a help
of
this Frame you can change coordinates, course and speed of a "free
moving" object (not in this case where
planes are moving under control of the scenario).
8. Click a "Task" button on the NavOb Frame and select an "Info"
task.
You should see an information message of this flight. Tasks can be
connected to "types" of objects (see
IGIS ontology on the "Instances" Tab).
Running "Global Air Traffic" example
1. Go to the "Drools" Tab and assert an "Air Traffic" string.
Return to the "OpenMap" Tab. The GUI hang for a while depending on
your
machine performance. You can see
meanwhile in the Java Console how scenarios for different flights
would
start.
2. At last you will see The Global Air Traffic! You can get on board
of
any flight. To do so click
the "Play Scenario" button and select a "f1.Flight View"
scenario. In an
"Update Scenario Context" Dialog click a
button with a diamond and a plus sign. Select a NavOb with a name of
some
flight (a sign
"->" between two city names).
3. You will see that you are flying aboard this plane (if you don't
see an earth gliding under the plane lift yourself a bit with a help
of
a "Zoom Out" button (magnifier with a
minus sign). You can make movement more smooth by setting
a "Seconds on Timer Ticks" to, for example 0.1 or less on powerful
machines (stop timer previously).
4. To get on board of another plane before the first one comes to
its
destination city firstly get out of it. To do so you can crash down
first plane by setting
its speed to 0 with a help of its NavOb Frame. This will stop
the "f1.Flight View" scenario
automatically.
5. Enjoy flying in all conners of the world.
Running "Terrorist Location Distribution"
example
1. Stop timer and set time scale to 1:1.
2. Remove all objects from the map (Menu: Protege -> Remove
Objects
-> All Objects).
3. Go to the "Drools" Tab and clear the Expert System Working Memory
using
corresponding button. Evaluate the "Create DroTimer from
RuNA" script once more because clearing working memory have
destroyed
it.
4. Return back to the "OpenMap" Tab, start timer and set time to 0
using
a "Reset Time" command (button with megafone).
5. Start the "f1.Flight Departures" scenario once more.
6. Go to the "Drools" Tab, select "IN_TOWN" instance
from "assert-instances" list and click an "Assert Instances" button.
7. Return to the "OpenMap" Tab. Set time scale to 256:1 and watch
how
probable
location of terrorists spreads on the earth surface by air and
ground
transportation.
If something goes wrong send me the Java console output and
the problem description.
Ru (mailto:sorokin@oogis.ru)