Skip to content
Michael Iatauro edited this page Dec 5, 2014 · 2 revisions

One-sentence summary of this page.

Overview

The PSEngine interface is the official interface for EUROPA clients, it is the recommended way to use EUROPA. This interface is very straightforward and allows you to run the entire application cycle described here. This abstraction layer will isolate your client code from most changes in the internals of the EUROPA implementation, it is also designed for easy mapping to other languages using SWIG, if you're planning to write your application in a language other than C++ this interface should be either already available in the EUROPA distribution, or relatively easy to add (currently only Java bindings are bundled with the EUROPA distribution, but we have plans to add Python and any other languages that are popular with the EUROPA user community).

The EuropaEngine interface gives access to the internal modules of EUROPA. You will have to spend more time understanding the different classes, probably write more code to extract information from the Plan Database and be more careful about the calls that you make. !EuropaEngine is a base class to the PSEngine instances that you get from PSEngine::makeInstance() calls, so you can always dynamic_cast a PSEngine instance to a !EuropaEngine one. By using !EuropaEngine you will not be isolated from changes in the EUROPA internals, therefore you should be ensure that your needs are not met by the PSEngine API before using this interface.

You will probably want to start with the PSEngine interface and if it is doesn't give you sufficient low-level access (this should be rare, except for very advanced applications) for your purpose switch to the !EuropaEngine interface (just do a dynamic cast as described above).

Eventually the PSEngine interface will be extended to expose all the extension points in EUROPA and external clients should never have to use !EuropaEngine.

TODO: provide high level overview of the different parts of the API here

Configuring an Engine

The following will work on either !PSEngine or !EuropaEngine:

PSEngine* engine = PSEngine::makeInstance();
std::string myIncludePath = "/home/javier:/home/javier/mymodels";
engine->getConfig()->setProperty("nddl.includePath",myIncludePath);

There is an open tkt to add functionality so that an engine's config can be read from an persistent source, like an XML file.

These are the config properties that can be specified on an engine :

|Property|Description| |nddl.includePath|list of directories (separated by ':') that constitute include path for nddl parser| | !TemporalNetwork.useTemporalPropagator | 'Y' or 'N', to indicate whether the temporal propagator should be used for temporal constraints (precedes,concurrent). If set to 'N' the default propagator will be used instead, this is useful when you want the constraint engine to report violations and not fail at the first inconsistency, it may also be faster in some contexts|

Clone this wiki locally