DiaDes  0.1
DIAgnosis of Discrete-Event System
Functions
GenerateTopology.cc File Reference
#include <cstdlib>
#include <iostream>
#include <diades/utils/Random.hh>
#include <diades/automata/Topology.hh>
#include <diades/automata/TopologyGeneration.hh>

Go to the source code of this file.

Functions

void printUsage ()
 
template<typename T >
void getParameter (int argc, char **argv, int index, T &param, bool &alreadyRegistered)
 
int main (int argc, char **argv)
 

Detailed Description

This file is the main file of the command GenerateTopology

Usage: GenerateTopology  
    --nodes nbNode 
        --connectivity nbConn
        --commonConnectionMax nbConn
        --cliqueSizeMax cliqueSize
        --seed randomSeed
        --output fileName
        
        Generate a topology of 'nbNode' nodes (default = 3). A connection
        between a set of nodes corresponds to a set of synchronised events
        between the nodes. Any node is directly or indirectly connected
        to the other nodes. The connectivity of a node is the set of connections
        in which the node is involved (default = 2). The parameter
        'connectivity' sets the maximal number of connections that a node can
        have. A connection involves a set of nodes (that is then called a clique).
        'cliqueSizeMax' sets the maximal size of a clique (default = 2). Two nodes
        may have several connections in common, 'commonConnectionMax' sets the
        maximal number of connections involving two components (default = 2).
        The generation is random and require a seed
        (default = depends on the time). Two runs with the same seed and parameters
        generate the same topology. The topology is then saved in the 'fileName'
        (default = "generatedTopology+Params.topo")
Author
Yannick Pencole - LAAS CNRS
Version
0.1

Definition in file GenerateTopology.cc.

Function Documentation

◆ getParameter()

template<typename T >
void getParameter ( int  argc,
char **  argv,
int  index,
T &  param,
bool &  alreadyRegistered 
)

Definition at line 211 of file GenerateTopology.cc.

References printUsage().

◆ main()

int main ( int  argc,
char **  argv 
)

◆ printUsage()

void printUsage ( )

Definition at line 182 of file GenerateTopology.cc.

Referenced by getParameter(), and main().