A small utility to generate a knowledge base and algorithm to use in SWI-Prolog, for optimization of the project schedules (.xer files) output by the scheduling software "Oracle Primavera".
Imperative programming-language options (C, C++, Go, V) for optimization of schedules are relatively error-prone and considerable length/complexity. Functional programming however can lay out the "state" of optimization wherein the interpretter can seek the solution, and do the hard work.
XERpro is a small utility written in the V programming language that will parse a .xer file for the relationships and activity information and generate a corresponding .pl (Prolog) script to consult.
As part of this code-generation it also generates some predicates that can be queried to find optimal paths between two activities.
XERpro is written in the V programming language and will compile under Windows, Linux, and MacOS.
V is syntactically similar to Go, while equally fast as C. You can read about V here.
XERpro source is in xerpro.v
, so after installing the latest V compiler, it's as easy as executing the below. Be sure that the V compiler root directory is part of your PATH environment.
git clone https://github.com/chipnetics/xerpro
cd src
v build xerpro.v
Alternatively, if you don't have git installed:
- Download the bundled source here
- Unzip to a local directory
- Navigate to src directory and run
v build xerpro.v
Please see the V language documentation for further help if required.
Input: A .xer file from Oracle Primavera
Output: A corresponding .pl (Prolog) script. If the name of the schedule is foo.xer, the Prolog script will be named foo.pl.
Command Line Arguments
Options:
-f, --xer <string> specify the XER for analysis
-h, --help display this help and exit
--version output version information and exit
Example usage
./xerpro -f foo.xer
| or if uncompiled, v run xerpro.v -f foo.xer
named_path(Start,Finish,Path) will find the path between Start and Finish, where Start and Finish are the activity IDs.
This utility is a heavy WIP, and is largely experimental. Prolog is a rather difficult language (for myself) and a whole different way of thinking. The Prolog script has only been tested in SWI-Prolog. This project is a combination of self-learning augmented with a real-world purpose. Contributions are very welcome to progress it along faster.