Sea examples

This include 2 examples  in  the sea environment collected in a "Sea" Protege project (Sea.pprj, Sea.pont and Sea.pins files). "Collision" example demonstrates a base DroolsTab technique - scenarios. It demonstrates also the using of the DroolsTab as a KML server for the displaying spatial scenario simulation on the GoogleEath program. "Sea Traffic Control" example demonstrates techniques based on rule sets. This is a simple expert system for avoiding collisions at sea.

    Running "Collision" example

1. Start run_protege.sh (Linux, Mac OS X) or run_protege.bat (Windows). Sea project should open automatically.

2. When Protege open go to a "Drools" Tab. You should see a "Rule Base Instance" with a "Collision Rule Base" title.

3. Click a "Compile Ontology" button. This should be done only once for this project.
   
4. Click a "Create Rule Base" button.(Sometimes creating the 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).

5. When the Rule Base created select a script "Create DroTimer from RuNA" and click "Evaluate Scripts" button.

6. When the script is evaluated select "Start scenario s1.Collision" from the "assert-strings" list and click "Assert strings" button.

7. Go to the "OpenMap" Tab. If you do not see the map (Open Street Map layer), probably, because of not working Internet connection, you can connect the local map layers using the menu "Layers".

8. Check a "Run Timer" check box (to the left of "1:1" label on a tool buttons panel) and click OK on an appearing panel. Time should start and a ship - tanker "Exxon" - turn on and go to the right.
   
9. Make time go faster with a "Time Scale Up" button. Set 32:1 time scale.

10. After the "Exxon" have came to a port, got loaded with oil and went back, another ship "Valdes" will come towards her (about 15:00). Slow time down to 4:1 when they are near each other. They should collide.

11. Enjoy performance of an ecological disaster and rescue operation when they collide at last. You can click a string in an "Expert System recommendations" window to get detailed descriptions of events.

12. To display the scenario replaying on a virtual earth surface with the "GoogleEarth" program download it from the site http://earth.google.com and install as appropriately (if not yet).

13. On the "Drools" Tab evaluate a script "Compile Scripts" and select in appearing list a "MapObs to KML" script. This action creates an auxiliary class for a following action.

14. On the "Drools" Tab evaluate a script "RuNA KML Server". You should get this message: "RuNA KML Server started on address: http://localhost: 8080/runa ..." in the Java console.

15. Start the "GoogleEarth" program and open with it <DroolsTabScene-Home>/LinkToRuNA.kml file.

16. In the GoogleEarth "Places" panel check a "RuNA KML Server" folder and go to Finnish bay near Saint-Peterburg, Russia.

17. Enjoy the "Collision" scenario replaying on the virtual earth surface.

    Running "Sea Traffic Control" example

1. Stop the previous scenario if it is running. To do this on the "OpenMap" Tab:
    1.1 Click an "Execute command" button (with a megaphone icon).
    1.2 Select a "Set Activity Status" command and click OK.
    1.3 Select a "Scenario s1.Collision .." string from a list and click OK.

2. Remove all objects from the Map by menu actions: Protege > Remove Objects > ..

3. Go to the "Drool" Tab, select "TrafficControl" string in "Assert-strings" list and click an "Assert Strings" button. This activate a set of rules governing sea traffic control.

4. Return to the "OpenMap" Tab, click a "Play scenario" button (with a black rotated triangle) and select in a list:
    - "Start scenario ru0.Danger Approach"
    Click OK.

5. Set time scale to 32:1.

6. Enjoy a spectacle of two ships approaching and missing each other by inches. They would do it two times - on crossing courses and on opposite courses - patiently wait when they turn towards each other near Latitude 60 7.92. Also watch attentively the "Expert System recommendations".


If something goes wrong send me the Java console output and the problem description.

    Ru (mailto:sorokin@oogis.ru)