The ENDOR library is a C++ library for the creation and navigation of AND-OR graphs. By describing a procedure (e.g., an assembly) as an AND-OR graph, the library can identify the optimal sequence of operations (a-priori and at run-time) and suggest the next operation to perform. As the user signals the successful execution of operations, the library automatically updates the optimal sequence and the suggested operations.
The ENDOR library uses the following tools:
CMake
for building the executabledoxygen
for generating the documentation
To build the ENDOR library, open a Terminal window and:
- browse into the
<endor>
folder cmake .
make
To run the sample program for the ENDOR library, open a terminal window and:
- browse into the
<endor>
folder ./endor
To test the functionalities of the library, you can load ./assemblies/pencil_assembly.txt
.
To include the library in your program, include "aograph.h"
.
During initialization, the first thing to do is to create a graph:
AOgraph::AOgraph("DEFAULT");
and load a description from a file using:
string description = "./assemblies/pencil_assembly.txt";
AOgraph::loadFromFile(description);
The loading function automatically sets up the graph, by calling setupGraph()
, which:
- defines whether a node is feasible
- generates all paths navigating the graph
- identifies the optimal path
- suggests the first node to solve
At run-time, set a node as solved with:
AOgraph::solveByName("[name_of_node]");
The library implements two alternative strategies for suggesting the next node to solve:
- the long-sighted strategy suggests a node along the path which minimizes the overall cost to reach the head node of the graph;
- the short-sighted strategy suggests a node along the path which most benefitted from the solving of the last node;
The long-sighted strategy is associated with code 0 and the long-sighted strategy with code 1. Ask for a suggestion with:
AOgraph::suggestNext([1/0]);
which displays the name of the node suggested by the system to solve.
Up-to-date documentation for this release is accessible from ./docs/html/index.xhtml
.
The rules for the generation of the documentation are specified in ./doxygen_config.txt
.
To re-generate the documentation, open a Terminal window and:
- browse into the
<endor>
folder doxygen doxygen_config
This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY, including the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. The authors allow the users of the ENDOR library to use and modify it for their own research. Any commercial application, redistribution, etc... has to be arranged between users and authors individually.
For further license information, please contact the authors.
If you want to be informed about library updates and new releases, obtain further information about the provided code, or contribute to its development please write to:
Barbara Bruno - [email protected]
Fulvio Mastrogiovanni - [email protected]
Barbara Bruno and Fulvio Mastrogiovanni are with the dept. DIBRIS at the University of Genoa, Italy.