Exemples d'exécution du projet genetik

1) Voyageur de commerce

1.1) Option help

$ java -jar boubakermathus.jar VDC -help
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Usage: java -jar boubakermathus.jar VDC [options]
If there are no options, the program is launched with the default parameters
The eventual options are:
-help:           help on-line
-dm:             launches the default matrix (you can not change -nbCities, -maxCost and -probaLink)
-nbCities:       integer>1 representing the number of cities
-maxCost:        integer >=1 representing the maximum distance between 2 cities
-nbIter:         integer >=1 representing the number of cycles reproduction-mutation-selection
-nbIndividual:   integer >=1 representing the population' s size
-probaLink:      0<=double<1 representing the probability 2 cities are linked
-reproduction:   0<=double<1 representing the reproduction' s percentage
-mutation:       0<=double<1 representing the mutation' s percentage
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

1.2) Lancement sans paramètres

$ java -jar boubakermathus.jar VDC
The program is launched with the default parameters.

PARAMETERS:
-nbIter:        100
-nbIndividual:  100
-reproduction:  0.6
-mutation:      0.4
-nbCities:      10
-maxCost:       9
-probaLink:     0.5

***********
* RESULTS *
***********
Average score : -30.04
2-5-7-0-9-3-4-8-1-6 : 28

MATRIX OF CITIES:
        0       1       2       3       4       5       6       7       8       9
0       2       90      4       90      90      90      90      5       4       2
1       90      2       90      90      8       90      2       2       90      6
2       90      90      90      90      90      2       3       90      6       7
3       2       90      90      6       0       90      90      90      6       90
4       90      3       4       90      90      90      90      2       3       90
5       6       90      6       90      6       90      4       1       4       8
6       90      9       90      90      2       6       90      90      90      90
7       7       5       90      90      5       4       3       5       9       90
8       4       3       90      90      4       9       8       90      90      90
9       90      90      90      8       7       90      6       90      2       0

1.3) Lancement avec paramètres

$ java -jar boubakermathus.jar VDC -nbCities 2 -reproduction 0.1
PARAMETERS:
-nbIter:        100
-nbIndividual:  100
-reproduction:  0.1
-mutation:      0.4
-nbCities:      2
-maxCost:       9
-probaLink:     0.5

***********
* RESULTS *
***********
Average score : -11.02
0-1 : 9

MATRIX OF CITIES:
        0       1
0       18      9
1       18      18

1.4) Option -dm (sans paramètres)

$ java -jar boubakermathus.jar VDC -dm
The program launched the default matrix with the default parameters.

PARAMETERS:
-nbIter:        100
-nbIndividual:  100
-reproduction:  0.6
-mutation:      0.4

***********
* RESULTS *
***********
Average score : -31.09
1-9-4-2-5-0-3-7-8-6 : 30

MATRIX OF CITIES:
        0       1       2       3       4       5       6       7       8       9
0       100     100     3       4       7       100     100     100     100     100
1       100     100     1       100     5       100     1       100     100     4
2       4       6       100     100     100     6       0       9       6       100
3       6       9       1       100     1       9       100     7       100     100
4       6       100     1       100     100     7       7       100     100     100
5       1       100     4       1       100     100     5       100     100     4
6       100     9       2       100     100     100     100     100     100     100
7       100     10      100     4       8       100     100     100     1       9
8       10      100     100     100     9       100     3       100     100     100
9       100     100     100     100     3       8       10      10      100     100

2) Sac à dos

2.1) Option help

$ java -jar boubakermathus.jar SAD -help                       
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Usage: java -jar boubakermathus.jar SAD [options]
If there are no options, the program is launched with the default parameters
The eventual options are:
-help:           help on-line
-nbIter:         integer >=1 representing the number of cycles reproduction-mutation-selection
-nbIndividual:   integer >=1 representing the population' s size
-reproduction:   0<=double<1 representing the reproduction' s percentage
-mutation:       0<=double<1 representing the mutation' s percentage
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

2.2) Lancement sans paramètres

$ java -jar boubakermathus.jar SAD
The program is launched with the default parameters.

PARAMETERS:
-nbIter:        100
-nbIndividual:  100
-reproduction:  0.6
-mutation:      0.4

Please, enter the P' s elements (integers) separated by a space, and validate by the key Enter:
2 3 6 5 45 6 32 58 75 45 63

Please, enter the backpack's volume (integer) (sum of the P's elements entered:340) and 
validate by the key Enter:
156

Here are the Q' s elements: 45 58 45 2 6 -> 156

2.3) Lancement avec paramètres

$ java -jar boubakermathus.jar SAD -nbIter 25 -reproduction 0.6
PARAMETERS:
-nbIter:        25
-nbIndividual:  100
-reproduction:  0.6
-mutation:      0.4

Please, enter the P' s elements (integers) separated by a space, and validate by the key Enter:
2 3 5 6 2 4

Please, enter the backpack's volume (integer) (sum of the P's elements entered:22) and 
validate by the key Enter:
22

Warning: the sum of the P's elements is lower than the backPack' s volume or equal to it! 
Here are the Q' s elements (Q contains the P' s elements): 2 3 5 6 2 4 -> 22

Page valide XHTML 1.0 Strict