IBM ILOG Dispatcher User's Manual > Welcome to IBM ILOG Dispatcher

This chapter introduces IBM® ILOG® Dispatcher. In it, you will learn:

If you are already familiar with Solver, then you know first-hand the advantages of that generic tool for object-oriented constraint programming. It provides a library of re-usable and maintainable C++ classes that can be exploited just as they are or extended to meet special needs.

What is Dispatcher?

So, what exactly is Dispatcher? It's a C++ library based on Solver, so it exploits all the facilities of object-orientation and constraint programming, too. One product is meant to work in combination with the other, and this manual aims to show you, through programming examples, exactly how to exploit this powerful combination.

Dispatcher offers features especially adapted to solving problems in vehicle routing and maintenance-technician dispatching. There are, for example, classes of objects particularly designed to represent such aspects as routing plans themselves, their visits, their vehicles, and their constraints, such as capacity or time-window constraints. Dispatcher offers you a workbench of tools that tackle the issues inherent in vehicle routing and maintenance-technician dispatching in a straightforward manner.

One of the main advantages of constraint programming is that it enables you to represent your problem explicitly, so that your problem representation serves simultaneously as a declarative specification. This congruence between the problem specification and the problem representation guarantees that the resolution of the constraints does, indeed, solve the problem as defined. In other words, there is no "slip" between the model of the problem and the implementation of its solution. Dispatcher, like Solver, embodies this advantage of modeling and solving in a ready-to-use library of tools.

How to Use Dispatcher with Solver

We mentioned that Dispatcher is based on Solver. What does this mean in practice? On the whole, in Dispatcher, you'll find predefined classes of objects that will adequately and accurately represent aspects of your vehicle routing or technician dispatching problem. For special purposes, however, you can easily extend Dispatcher by defining additional classes yourself to represent objects particular to your problem.

In addition, if your routing problem includes unusual constraints not adequately represented by the standard Solver routing constraints described in this manual, you can define additional constraints that are specific to your problem.

Then with your problem well represented in the object model, you will use the control primitives of Dispatcher to solve the problem. In other words, you will implement a heuristic search procedure using the predefined features of Dispatcher. Throughout this manual, you will find examples of how to use the control primitives of Dispatcher to search for a solution.

About this manual

This is the IBM ILOG Dispatcher User's Manual. It is composed of lessons that use a procedural-based learning strategy. Each lesson is built around a sample problem, and a user works on a partially completed code example. As you follow the steps in the lesson, you complete the code and learn about concepts. Then, you compile and run the code and analyze the results. At the end of each lesson, there are review exercises.

The manual is designed to be used by C++ programmers who may or may not have any knowledge of constraint programming. The ideal usage context for this manual is sitting in front of your computer, with Dispatcher installed. You work through the lessons and exercises.

If you are a novice Dispatcher user, start at the beginning of this manual, since the lessons build on each other. If you are a more experienced Dispatcher user, you can jump ahead to a later part of the manual, focusing on more advanced topics.

How this manual is organized

This manual is divided into four parts:

Prerequisites

Dispatcher requires a working knowledge of C++. However, it does not require you to learn a new language since it does not impose any syntactic extensions on C++.

If you are experienced in constraint programming or operations research, you are probably already familiar with many concepts used in this manual. However, no experience in constraint programming or operations research IBM ILOGis required to use this manual.

You should have IBM ILOG Dispatcher, IBM ILOG Solver and IBM ILOG Concert Technology installed in your development environment before starting to use this manual. You should be able to compile, link, and execute a sample program provided with Dispatcher before starting to use this manual. For more information, see the sections Installing IBM ILOG Dispatcher and Linking IBM ILOG Dispatcher.

Related documentation

The following documentation ships with IBM ILOG Dispatcher and will be useful for you to refer to as you complete the lessons and exercises:

Installing IBM ILOG Dispatcher

In this manual, it is assumed that you have already successfully installed the Dispatcher, Solver, and Concert Technology libraries on your platform (that is, the combination of hardware and software you are using). If this is not the case, you will find installation instructions in the jacket of the CD-ROM of the standard distribution of Dispatcher. The instructions cover all the details you need to know to install Dispatcher, Concert Technology and Solver on your system.

Linking IBM ILOG Dispatcher

When you use Dispatcher, you link the Dispatcher, Solver, and Concert Technology libraries to your application. The command that you use for linking depends on your platform. In the standard distribution of the product, you will find a file that contains details appropriate to your platform and that points you toward a subdirectory containing a suitable makefile or project. If you are using UNIX, you will find the information in YourDispatcherHome/README; on a PC, you will find comparable information in YourDispatcherHome/readme.htm

Typographic and naming conventions

The names of types, classes, and functions defined in the library begin with Ilo or Ilc. Those beginning with Ilo are predefined modeling and solving classes, functions, and types provided with Dispatcher, Solver, and Concert Technology. You can use classes, functions, and types in the Solver library that begin with Ilc to customize your code and extend the library.

The name of a class is written as concatenated words with the first letter of each word in upper case. For example,

IloIntVar

A lower case letter begins the first word in names of arguments, instances, and member functions. Other words in the identifier begin with an upper case letter. For example,

IloIntVar aVar;
IloIntVarArray::add;

Names of data members begin with an underscore, like this:

class Bin {
public:
  IloIntVar       _type;
  IloIntVar       _capacity;
  IloIntVarArray  _contents;
  Bin (IloModel    mod,
       IloIntArray Capacity,
       IloInt      nTypes,
       IloInt      nComponents);
  void display(const IloSolver sol);
};

Generally, accessors begin with the key word get. Accessors for Boolean members begin with is. Modifiers begin with set.

To make porting easier from platform to platform, Concert Technology isolates characteristics that vary from system to system. For that reason, use the following names for basic types in C++:

You are not obliged to use these identifiers, but it is highly recommended if you plan to port your application to other platforms.

Important ideas are italicized the first time they appear.

Include Files

In an effort to minimize the number of include files (that is, header files) that you have to cope with, Dispatcher provides the basic file ilodispatcher.h. If you include it in your application, you can exploit all the functions, classes, and member functions documented in the IBM ILOG Dispatcher Reference Manual.

If you prefer to include only some of Dispatcher's header files in your application, a list of the individual files and an explanation of each one's purpose follows:

This guide contains important information on the procedures and practices followed in the service and support of your IBM products. It does not replace the contractual terms and conditions under which you acquired specific IBM Products or Services. Please review it carefully. You may want to bookmark the site so you can refer back as required to the latest information. We are interested in continuing to improve your IBM support experience, and encourage you to provide feedback by clicking the Feedback link in the left navigation bar on any page. The "IBM Software Support Handbook" can be found on the web at

http://www14.software.ibm.com/webapp/set2/sas/f/handbook/home.html

System Service Request (SSR) tool is similar to Electronic Service request in providing online problem management capability for clients with support offerings in place on System i, System p, System z, TotalStorage products, Linux, Windows, Dynix/PTX, Retail, OS/2, Isogon, Candle on OS/390 and Consul z/OS legacy products.

IBMLink - SoftwareXcel support contracts offer clients on the System z platform the IBMLink online problem management tool to open problem records and ask usage questions on System z software products. You can open, track, update, and close a defect or problem record; order corrective/preventive/toleration maintenance; search for known problems or technical support information: track applicable problem reports: receive alerts on high impact problems and fixes in error; and view planning information for new releases and preventive maintenance.