# Representation of temporal constraint network in GraphML format GraphML is an XML application for representing graphs of different types in a very flexible way. In consists of two parts: a language core to describe the structural properties of a graph, and a flexible extension mechanism to add application-specific data. In the language core, there are the elements `graph, node`, and `edge` by which it is possible to describe the topology of a graph. The `GraphML-Attributes` extension allows the definition of node/edge attributes in the same XML document where the graph is defined. In the CSTNU Tool library, it is assumed that a GraphML document describing a temporal constraint network uses the following attributes (we report here the most significant): ```xml Proposition Observed. Value specification: [a-zA-F] Label. Format: [¬[a-zA-F]|[a-zA-F]]+|⊡ Labeled Potential Values. Format: {[('node name', 'integer', 'label') ]+}|{} Type: Possible values: contingent|requirement|derived|internal. normal Labeled Lower-Case Values. Format: {[('node name', 'integer', 'label') ]+}|{} Labeled Upper-Case Values. Format: {[('node name', 'integer', 'label') ]+}|{} Value for STN edge. Format: 'integer' Labeled Values. Format: {[('integer', 'label') ]+}|{} Edge routing. Format: t,offset[;t,offset] with 0 ``` The `Route` key holds the manual routing of an edge (added by the edge-routing prototype): a path from source to destination made of up to two control points, expressed in coordinates relative to the source→destination chord. Each control point is a pair `t,offset`: - `t` is the fraction along the chord (0 < t < 1); - `offset` is the perpendicular displacement as a *factor* of the chord length (positive on the left of the source→destination direction, negative on the right). Points are separated by `;`. One point renders a quadratic Bézier, two points a cubic Bézier. The key is optional: a file without it, or an edge without this data, opens as before with automatic routing. An edge with an explicit route ignores both the explicit curvature and the automatic curvature policy. ```xml 0.33,0.2;0.67,-0.15 ``` Therefore, for example, to assign the labeled values $\langle 8, p\rangle$ and $\langle 6, q\rangle$ to the edge from node $C0$ to node $X$, it is sufficient to add the attribute "LabeledValues" as shown in the following listing: ```xml {(8, p), (6, q) } ```