Skip to content
James Edmondson edited this page Mar 19, 2019 · 6 revisions

Introduction

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.


Table of Contents


Syntax

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 arrays. In this example, a vertex of the region.0 entity is defined.

MADARA variables can be either local or global. A key that start with a period marks a variable as local (e.g., .id).


See Also

MADARA Wiki on Github

Clone this wiki locally