Skip to content

XDSMjs JSON format

Rémi Lafage edited this page Jan 16, 2019 · 6 revisions

XDSM diagrams are described as follows:

{
  <xdsm-id> :
    {
      "nodes": [<node>, ...],
      "edges": [<edge>, ...],
      "workflow": <workflow-struct>,
      "optpb": <string>
    },
  ...
}

xdsm-id : XDSM reference string

  • It can be used in a node of type mdo to reference a sub-xdsm diagram.
  • If there is just one xdsm, the structure level { xdsm-id: } can be omitted.
  • If there is an xdsm-id key, one named 'root' key must exist as the entry point of the possible nested XDSMs
  • If an xdsm-id is not referenced in a another xdsm structure the corresponding diagram will not be drawn.

Nodes

{
  "id": <string>,
  "type": <type-enum>,
  "name": <string>,
}
  • id has to be a unique string within the nodes list.
  • type-enum is a string choosen within: "analysis", "optimization", "mdo", "function", "metamodel"
  • name label of the node

Edges

{
  "from": <node-id>,
  "to": <node-id>,
  "name": <string>
}
  • node-id has to correspond to a node identifier string,
  • name is the string to be displayed (generally comma separated list of variables names)

Workflow

The workflow structure is a nested structure where A, B, C denotes node ids

  • [A, B, C] corresponds to the serial execution of A, B and C
  • [A, [B, C]] corresponds to a loop controlled by A containing the serial execution of B and C
  • [A, [{"parallel": [B, C]}]] corresponds to a loop controlled by A containing the parallel execution of B and C. To some extent, A, B and C might be nested structures to express more complex workflow, such as:
["Opt", 
   ["MDA",
    [
      "Dis1",
      { parallel: ["Dis2", "Dis3"] }
    ],
    "ObjCstr"
   ] 
]

meaning the optimizer Opt loops on:

  • the call to an MDA consisting of a loop on: Discipline1 execution then the parallel execution of Discipline2 and Discipline3
  • then the call to objective and constraint function.

Optimization Problem description

The optpb key exists to pass a description of the optimization problem to be used to be displayed in tooltip-like window when optimization node is clicked (Note: a fixed-width font is used to allow basic formatting).

Names basic typesetting

Names consists of characters [a-zA-Z0-9,:]. Depending on the configuration (to be described), a basic typesetting can be applied to node and edge names: '' character is used to subscript and '^' is used to superscript following text. Greek letters and others unicode characters can used in names but have to be specified as HTML unicode numeric references (e.g. &#955; for λ)

Clone this wiki locally