-
Notifications
You must be signed in to change notification settings - Fork 20
MADARA
MADARA is the distributed knowledge base middleware used for communication and collaboration in GAMS. This page provides a brief description of syntax used when discussing MADARA in the rest of this wiki.
The wiki pages discussing algorithms and platforms will often show something like the following:
var1 = 2;
var1.x = 3;
var1.y = 4;
This represents three different MADARA keys (var1, var1.x, and var1.y) to three
different MADARA values (2, 3, and 4).
MADARA variable keys are read as strings and as such can take many different forms. The encouraged style is to use heirarchical naming with '.' to split the different levels. Using the Regions as an example:
region.0.type=0; // type 0 is a polygon, currently the only defined type
region.0.priority=0; // the priority of the region, if supported by the algorithm
region.0.size=4; // four vertices define this polygon
region.0 is an entity with three different attributes (type, priority, and size). The double
forward slash denotes comments as in C or Java.
region.0.0[0]=40.443237; // latitude of point 0
region.0.0[1]=-79.940570; // longitude of point 0
MADARA keys can also map to map-like variables. In this example, a vertex is defined for the
region.0 entity.