Using DCOPolis

From DCOPolis

Jump to: navigation, search

Using DCOPolis

In this tutorial you will learn how to use DCOPolis. You will run a simple sample problem on a single machine. This tutorial assumes that you have a basic understanding of Distributed Constraint Optimization (DCOP). If you are new to DCOP, you may want to familiarize yourself with the subject by reading the Wikipedia article.

The first step is to do is check out DCOPolis and build it: Compliing DCOPolis

[urlass@loki:svn_projects]$ svn co https://dcopolis.svn.sourceforge.net/svnroot/dcopolis dcopolis

... list of all the files in the project ...

[urlass@loki:svn_projects]$ cd dcopolis

[urlass@loki:dcopolis]$ ant jar

Buildfile: build.xml

init:

   [mkdir] Created dir: /home/urlass/Documents/svnroot/dcopolis/bin

compile:

   [javac] Compiling 154 source files to /home/urlass/Documents/svnroot/dcopolis/bin
   [javac] Note: Some input files use unchecked or unsafe operations.
   [javac] Note: Recompile with -Xlint:unchecked for details.

jar:

     [jar] Building jar: /home/urlass/Documents/svnroot/dcopolis/lib/dcopolis.jar

BUILD SUCCESSFUL Total time: 4 seconds [urlass@loki:dcopolis]$

For our first example, we will run DCOPolis on a single host without any command line options. Running DCOPolis

[urlass@loki:dcopolis]$ java -cp lib/sefirs.jar:bin/ org.dcopolis.DCOPolis

This should produce a setup window like this:

Image:Setup.png

There are three things to choose before you run DCOPolis: the problem, the algorithm, and the platform. The options for each of these is available from drop-down menus on this setup panel. If you hold the mouse over a problem in the problem drop-down, a tool tip will appear with information on that problem.

Let's select a Random Graph Coloring problem, the DPOP algorithm, and the TCP platform. We will use the default options for a random graph coloring problem. Here is what the setup looks like:

Image:Setup2.png

Click "Ok," and the hosts dialog will now appear. This dialog allows you to assign hosts to specific computers. There are six hosts in this example (one for each agent), but there is only one "real" computer, so all of the hosts are on one computer.

Image:Hosts.png

Now select "Ok," and DCOPolis will begin solving the problem. With some algorithms, the colors in the graph will continue changing as it executes, but DPOP is not one of them. Since this graph is randomly generated, you will see a slightly different graph when you run this on your machine.

Image:Solution.png