Skip to content

bzantium/HGA-RPMX

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Hybrid Genetic Algorithm with RPMX

This is java implementation of promising paper "Finding profitable product assignment plans with weighted product associations in retail using hybrid genetic algorithm". In this paper, we propose rectangular partially mapped crossover (RPMX) which adapt original PMX to rectangular format to efficiently solve product assignment problem.

Figure 1. Flowchart of proposed HGA



We also proposed a new crossover method, Rectangular Partially Matched Crossover, which is modified version of PMX. This crossover method shows better performance on the given retail situations with the proposed procedure.

Figure 2. Rectangular PMX



1. run code for QAPLIB examples

You can run HGA-RPMX to solve an example tai40a from QAPLIB following code:

$ cd ~/src
$ mkdir "../bin"
$ javac -cp "../jars/argparse4j.jar"; -d "../bin" main.java
$ java -cp "../jars/argparse4j.jar";"../bin" main -f "../qapdata/tai40a.dat"

arguments

-----------------------------------------------------------------------------------------------------------------
usage: main [-h] [-f FILE] [-npop NPOP] [-r {true,false}]

Test proposed hybrid genetic algorithm

named arguments:
  -h, --help             show this help message and exit
  -f FILE, --file FILE   Specify path to file (default: None)
  -npop NPOP             Specify size of population (default: 20)
  -r {true,false}, --rect {true,false}
                         Convert to Rectangle Format (default: true)
-----------------------------------------------------------------------------------------------------------------



2. run code for synthetic datasets

$ javac -cp "../jars/argparse4j.jar"; -d "../bin" test.java
$ java -cp "../jars/argparse4j.jar";"../bin" test -nrow 5 -ncol 5

arguments

-----------------------------------------------------------------------------------------------------------------
usage: main [-h] [-npop NPOP] [-nrow NROW] [-ncol NCOL]

Test proposed hybrid genetic algorithm

named arguments:
  -h, --help             show this help message and exit
  -npop NPOP             Specify size of population (default: 20)
  -nrow NROW             Specify number of rows (default: 5)
  -ncol NCOL             Specify number of cols (default: 5)
-----------------------------------------------------------------------------------------------------------------



3. experimental results

Figure 3. Experimental results on QAPLIB

Figure 4. Experimental results on synthetic datasets



4. Requirement

  • JDK 8

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages