Methodology
Methodology
As mentioned in the introduction section, the aim of this project is to provide high-level modelling support for HAL. There are two ways to achieve this aim. First, is by extending HAL's existing libraries to support high-level modelling. The second method is to create a compiler that compiles OPL models to HAL programs. In fact, both methods are implemented in this project. This is because both methods have orthogonal strengths and complement each other.
The library extension solution enables HAL to support direct modelling to the user. However, this solution still requires the user to posses some programming skills. The OPL-to-HAL++ compiler, on the other hand, enables novice users with no programming skills to use HAL indirectly. The only problem with this solution is HAL itself is still unchanged, and therefore do not support direct modelling to its users. From this points onwards, the HAL library extension will be referred as HAL++. (For more details, please read my thesis in the download section)
Below is the list of actual features that are implemented in each method:
HAL++
- arrays, including one to multi-dimensional arrays
- arbitrary data types for array indexing
- 5 types of iterations
- sum
- min
- max
- forall
- tryall
OPL-to-HAL++ Compiler
- data structures representation, including complex recursive data structures like arrays of struct
- constraints translation
- search procedure specification translation
The hardest part in the OPL-to-HAL++ compiler translation is the complex recursive data structures and the iterative application of iterations, such as forall and sum.
Page last updated : November 10, 2002