Cuttlefish Evolution Format

From Cuttlefish Wiki
Jump to: navigation, search

Cuttlefish Evolution Format (.cef)[edit]

The evolution of a given network can be configured through a edition file that records the events taking place on the graph given certain process. The file is divided in instruction batches that are executed in an atomic way every time step of the process. A set of instruction between “[]” will be executed in one time step and a single instruction outside “[]” will be executed alone in one iteration. Example, three time steps, the first one with three instruction, the second one with one and the third with two:

   [ instrucion1
   instruction2
   instruction3 ]
   instruction4
   [ instruction5
   instruction6 ]

There are six types of instructions to modify the state of the network. These are:

  • Node addition: nodes are added using the same syntax as for the cxf format. Note that if the id of the node should not be repeated and if the node already existed in the network, this instruction will have no effect and cause a warning.
     addNode: (id) label{label} color{R,G,B} borderColor{R,G,B} size{size} shape{shape} width{width}
              position{x,y} var1{var1} var2{var2} hide
  • Node removal: the only necessary information for node removal is the identifier of the node. After this step the only node with identifier “id” will not be present in the network and all its edges will disappear. If no node like that existed before, the instruction will have no effect and cause a warning.
     removeNode: (id)
  • Node edition: node properties can be changed by means of a editNode instruction. Note that if the node with id didn't exist, the instruction will have no effect and it will cause a warning.
     editNode: (id) label{label} color{R,G,B} borderColor{R,G,B} size{size} shape{shape} width{width}
               position{x,y} var1{var1} var2{var2} hide
  • Edge addition: an edge can be added as they are defined in the cxf files. Note that the source and destination nodes need to exist when the instruction is executed (unlike in cxf files) and repeated edges will be warned.
     addEdge: (id_source, id_destination) label{label} weight{weight} width{width} color{R,G,B} var1{var1} var2{var2} hide
  • Edge removal: if an edge from the node of id_source to the node of id_destination existed, it will be removed and if not, the instruction will simply have no effect and warn. Note that in the case of an undirected network, id_source and id_destination can be swapped.
     removeEdge: (id_source, id_destination)
  • Edge edition: to change the parameters associated to an edge, we can use an editEdge instruction following the same rules as in the node edition.
     editEdge: (id_source, id_destination) label{label} weight{weight} width{width} color{R,G,B} var1{var1} var2{var2} hide
  • Frame options: to add a frame label, set the max number of optimization steps and a sleep time between optimization steps (e.g. if you want to have a slower transition between frames). Note that setting a maximum number of optimization steps and a timeout between optimization steps is currently supported only by the WeightedARF layout.
     options: label{name_of_label} sleepTime{sleep time in ms} maxUpdateSteps{number of steps}

Example file of Cuttlefish Evolution format for the network BA2.cxf:

Back to User documentation