In
this section, we intend to provide a quick overview of how to use the
classes. We try to simplify the use of the JGDS v3.5 clases. Some of
this points are widely studied in the other sections.
Sequential Execution: The JGDS v3.5
classes must be copied in our home directory or inside of a subdirectory.
Then we configure the configuration file and we run the island inside
the directory where the classes are placed.
>
java Island 1 -o output.txt -c config.txt
For more information
see section 4.1
Parallel Execution:
Using one hosts: We execute every island
in the same host. The leader island is the last to execute. All IP
address are configurated to local host (127.0.0.1).
* Linux-Unix system: We open so many console windows
as islands. Then in each console one island is executed. The leader
island will be run when the others islands are ready.
console N: >
java Island N -o outputN.txt -c config.txt |
... |
console i:
> java Island i -o outputi.txt -c config.txt |
... |
console
1: > java
Island 1 -o output1.txt -c config.txt |
* Windows-Other systems: We open so many execution
windows as island in the java environment. Every island is executed
in a different execution window.
Using so many hosts as islands:
All the hosts IP addresses are put in the configuration file.
* Without remote method:The islands must
be executed in each hosts.
host N: >
java Island N -o outputN.txt -c config.txt |
... |
host i:
> java Island i -o outputi.txt -c config.txt |
... |
host
1: > java
Island 1 -o output1.txt -c config.txt |
* With remote method: First, we prepare the system
to work with remote method. We create a new file named .rhosts
where the hosts name to use and the user name are placed.
This file has permisions only for read and write. Then, JGDS v3.5
classes are copied in the home directory. Now, every island can
be executed in every host using only one host.
>
rsh hostN java Island N -o outputN.txt -c config.txt |
... |
>
rsh hosti java Island i -o outputi.txt -c config.txt |
... |
>
rsh host1 java Island 1 -o output1.txt -c config.txt
|
Also, we can create a script file which contains
all the remotes calls. So we only have to execute the script file
using the system shell. This file must be where the classes are placed.
>
sh script_file
For more information
see section 4.2
Results Representation:
When the
RND2 problem are being worked, we can execute the geografico class
which is a tool to represent the geographical area. The geografico.java
file must be copied into directorio_mapas, which cotains the text
files solution for RND2 problem.
> java geografico solution.txt solution.jpeg
For more information see section
6.3
Directory Structure:
File
|
Path
|
Description
|
Chromosome.java
Director.java
Clock.java
Cross_op.java
Algorithm.java
GA.java
Replacement_op.java
Constants.java
Server_interface.java
Immigration_thread.java
Individual.java
Island.java
Message.java
Operator.java
Population.java
Population_stats.java
Problem.java
RMI_server.java
RND.java
Onemax.java
RND2.java
SA.java
SAT.java
Selection_op.java |
Home directory (~)
|
The main classes must be placed in the home directory
in each island. |
confRND.txt
confRND2.txt
confSAT.txt
confONE.txt |
Home
directory (~) |
The
configuration files are placed in the same directory that the
main classes. |
geografico.java |
~/directorio_mapas
|
We recommend to
put this class inside the directory where the solution files are
stored. This directory is created during execution time. |
bestfitness.txt
ejecuciones.txt
time_h.txt
time_m.txt
time.s.txt
time_ms.txt
|
~/directorio_ejecuciones
|
In
this files are stored the execution times, in hours, minutes,
seconds and mseconds, the best fitness and the number of executions.
If this files don't exist will be created after the problem execution.
But if the files exist, it only append the new values into its. |
[Output
files] |
~/directorio_de_salida
|
This
directory contains the statistical file of each island. The directory
and the files are created during execution time. |
[Script
files] |
Home directory (~)
|
In the
case that we decide to create a script file to simplify the islands
execution it must be placed in the home directory. |
.rhosts |
Home directory (~)
|
If we
use remotes calls, the .rhosts file must be in the home directory
of each host. |