The library is written in C++.

 

C++ base classes interface with the library to define the problem and how to solve it. These classes include the activities to be solved, alternative plans for solving an activity, and the truth maintenance system (TMS) necessary for non-monotonic search.

 

There are single threaded and multithreaded versions of the library. The multithreaded library allows computers with multiple CPUs to be effectively used, although writing an application for it is more complex.

 

 

Library Classes

 

 

This describes some of the structure, C++ classes, and operation of the library.

 

Truth Maintenance System (TMS)

 

The TMS is the subsystem that allows objects to be true in some contexts and not in others.

 

Contexts (nodes) in the search graph are defined by the C++ base class CContext.

 

Each context may have any number of child contexts, but only a single parent. The CContext objects provide access to:

o       the hypothetic actions asserted and retracted (no longer true) in the context

o       the value of the context. The value is computed by the application

o       information for the library

o       application defined data. This is typically used for hypothesis generation

o       for multithreaded applications, thread and locking data

 

The base C++ class CSObject (Context Sensitive Object) provides the ability to define objects that are true in some contexts and not in others. An object is created or asserted in a context and remains true in all descendant contexts until the object is retracted in a context or an ancestor context.

 

The TMS provides a set of collection classes, iterators, and test methods to allow the application to examine data objects that are true in a specific context.

 

Search Base Classes

 

There are two primary base classes used by the search:

CActivityToPlan defines what needs to be planned to achieve a solution. In the vehicle routing problems, an instance of this class is created for each city to be visited. This object is not context sensitive it is true everywhere. These may be created dynamically during the search. (In the CVRP benchmark application, trucks are created dynamically. Each time this is done, a CActivityToPlan instance is added to return the truck to the depot.). Multiple classes can be derived for a problem the job shop scheduler has CActivityToPlan classes for machines, tooling, and machine operators.

CSPlannedAction is the solution for a specific CActivityToPlan instance. It is context sensitive. In the benchmark application, these have the routing from one city to another. There may be many CSPlannedAction instances to solve a single CActivityToPlan. This occurs in the job shop scheduling system when an operation is split across multiple machines

 

 

 

 

 

To use the library for a simple application, a user would: