[Document new graph representation, added clicks solvable examples. bringert@cs.chalmers.se**20041213230624] < > { hunk ./doc/map-agent.html 20 -MapAgent is an OAA agent which displays a map. The agent has solvables -for drawing labelled edges on the map and for getting user clicks. +MapAgent is an OAA agent which displays a map showing a graph +on top of a bakground image. +The agent has solvables for drawing labelled edges on the map +and for getting user clicks on nodes. hunk ./doc/map-agent.html 35 -

MapAgent is currently feared towards transport networks and other +

MapAgent is currently geared towards transport networks and other hunk ./doc/map-agent.html 38 -

The agent is configured by a properties file. Here is and +

The agent is configured by a properties file. Here is an hunk ./doc/map-agent.html 42 -stops: /stops-gbg.txt -lines: /lines-gbg.txt -stopNames: /stops-gbg-sv.txt +graph: /gbg.dot hunk ./doc/map-agent.html 49 -

stops
-
Java resource name for a file with node descriptions. Each line -describes a node on the format "label x y", e.g.: - -
-Angered                 750     1000
-AxelDahlstromsTorg      200     70
-Biskopsgarden           50      950
-Bergsjon                1000    1000
-
- -
- -
lines
-
Java resource name for a file with weighted directed edge -descriptions. The file consists of a number of edge groups. All -edges in a group share the same label. The format of an edge group is: - -
-edge_label  number_of_rows_in_group
-node_label 
-node_label weight_from_previous
-node_label weight_from_previous
-...
-
+

These are the properties used by MapAgent:

hunk ./doc/map-agent.html 51 -

Example:

+
graph
+
Java resource name for a file with the graph description. +The graph description uses a subset of the +DOT language, +e.g.: hunk ./doc/map-agent.html 58 -62 7 -Redbergsplatsen -Karralundsgatan 3 -SanktSigfridsplan 5 -Kalleback 8 -SanktSigfridsplan 8 -Karralundsgatan 5 -Redbergsplatsen 3 - - -

-Edge groups are separated by an empty line. -

-
+digraph +{ + Harlanda [label = "Härlanda", pos = "900,720"]; + Harlanda -> Redbergsplatsen [label = "1", dist = 2.0]; + Harlanda -> OstraSjukhuset [label = "1", dist = 6.0]; hunk ./doc/map-agent.html 64 -
stopNames
-
Java resource name for a file giving human-reable names to -nodes. Format: "node_label: human-readable name", e.g.: + Redbergsplatsen [label = "Redbergsplatsen", pos = "750,680"]; + Redbergsplatsen -> Centralstationen [label = "1", dist = 6.0]; + Redbergsplatsen -> Harlanda [label = "1", dist = 2.0]; hunk ./doc/map-agent.html 68 -
-Angered:                Angered
-AxelDahlstromsTorg:     Axel Dahlströms torg
-Biskopsgarden:          Biskopsgården
-Bergsjon:               Bergsjön
+  ...
+}
hunk ./doc/map-agent.html 103
-$ java -cp $CLASSPATH:tramdemo.jar:. se.chalmers.cs.gf.tramdemo.MapAgent /gbg.properties -oaa_connect "tcp('${FAC_HOST}',${FAC_PORT})"
+$ java -cp $CLASSPATH:tramdemo.jar se.chalmers.cs.gf.tramdemo.MapAgent /gbg.properties -oaa_connect "tcp('${FAC_HOST}',${FAC_PORT})"
hunk ./doc/map-agent.html 123
-
  • The Trindikit Java library (for the OAAAgent class)
  • hunk ./doc/map-agent.html 147 -
    A string which consists of a number of drawing instructions. Each +
    A string which consists of a number of drawing instructions. Must +be instantiated. Each hunk ./doc/map-agent.html 171 -draw('clear; drawEdge (1, [Gronsakstorget, Hagakyrkan, Jarntorget]); drawEdge (6, [Chalmers, Korsvagen]);') +draw('clear; drawEdge (1, [Gronsakstorget, Hagakyrkan, Jarntorget]); drawEdge (6, [Jarntorget, Olivedalsgatan]);') hunk ./doc/map-agent.html 173 -draw('clear; drawEdge (1, [Gronsakstorget, Hagakyrkan, Jarntorget]); drawEdge (6, [Chalmers, Korsvagen]);') +draw('clear; drawEdge (1, [Gronsakstorget, Hagakyrkan, Jarntorget]); drawEdge (6, [Jarntorget, Olivedalsgatan]);') hunk ./doc/map-agent.html 189 -
    - - - +
    A cronologically ordered list of clicks that have occured since the last time +this solvable was called. Must not be instantiated. Each click is represented by +a struct: click(Nodes), where Nodes is a list of +node labels that the click was close to. +
    hunk ./doc/map-agent.html 200 +
  • +

    No clicks available:

    +
    +clicks(Clicks)
    +=>
    +clicks([])
    +
    +
  • + +
  • +

    A single unambiguous click:

    +
    +clicks(Clicks)
    +=>
    +clicks([click(['Frihamnen'])])
    +
    +
  • + +
  • +

    An ambiguous click:

    +
    +clicks(Clicks)
    +=>
    +clicks([click(['Klareberg','Tagene'])])
    +
    +
  • + hunk ./doc/map-agent.html 228 -

    Language given:

    +

    Two unambigious clicks:

    hunk ./doc/map-agent.html 230 -linearize(numerals, english, num(pot2as3(pot1as2(pot0as1(pot0(n3))))), Str) +clicks(Clicks) hunk ./doc/map-agent.html 232 -linearize(numerals, english, num(pot2as3(pot1as2(pot0as1(pot0(n3))))), three) +clicks([click(['Ullevi']),click(['Centralstationen'])]) }