Skip to content
No description, website, or topics provided.
C++ Shell Makefile
Branch: adaptive
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
Resources
.gitignore
Alignment.cpp
Alignment.h
Colors.cpp
Colors.h
FastAN
FastAN.cpp
GOC.cpp
GOC.h
Graph.cpp
Graph.h
Makefile
fastNA-02-22.rar
new.zip
readme.md

readme.md

Adaptive large neighborhood search applied in NA problem

My Bachelor thesis source code

Getting started

Script FastAN to run the algorithm

Customize the input parameters in FastAN script

Parameters used
  1. -i1: Name of network 1. Should be ce.ga, dm.ga, hs.ga, sc.ga. These networks located in Resources/Dataset/Networks_2

  2. -i2: Name of network 2. should be ce.ga, dm.ga, hs.ga, sc.ga. These networks located in Resources/Dataset/Networks_2

  3. -alpha: Balance factor between edges correctness and Bit_score, in range [0, 1], default 0.3

  4. -dmin, -dmax: range of degree of destruction, [0.01, 0.99], default [0.01, 0.1]

  5. -N_RUN: Number of iterations that Local Search algorithm runs, default 100

  6. -PERIOD: Period of reweighting heuristics, default 5

  7. -rho: Balance factor of reward and penalty of heuristic after --PERIOD, default 0.1

  8. -rw1, -rw2, -rw3: Reward for G_BEST found, Better, Accepted heuristic respectively, , default 0.5, 0.3, 0

  9. -N_TEST: The algorithm is randomize, so that it should be examined a number of executions and calculate average result, , default 10

  10. --AC_DIFF: Acceptance function is being used, limits the diff between G_BEST and new_sol

  11. -version: Different FastAN version, default new

    *fastAN: Legacy FastAN version

    *fastAN_d: Legacy FastAN + random d

    *fastAN_adaptive: Legacy fastAN + reweighting destroy and repair heuristics

    *fastAN_2regret: Legacy fastAN + 2_regret repair heuristic

    *fastAN_random_removal: Legacy fastAN + random_removal destroy heuristic

    *new: new FastAN, which uses all strategies

Note important

-i1 and -i2 order should manually sorted due to size of networks.

For example:

-i1 dm.ga -i2 ce.ga is wrong. dm.ga 7500 nodes > ce.ga 2800 nodes
-i1 ce.ga -i2 dm.ga is correct.

Example make && Build/app -alpha 0.3 -dmin 0.01 -dmax 0.1 -N_RUN 100 -PERIOD 5 \ -rho 0.1 -rw1 0.5 -rw2 0.3 -rw3 0 -N_TEST 10 -AC_DIFF 10 -version fastAN_random_removal -i1 ce.ga -i2 dm.ga

Folder Structure

  1. Build: for compiled executable file
  2. Resources: Dataset, detail written in Resources/readme.md
  3. Output: for output generated file, including log, result, solution, score, etc.

Prerequisites

  1. Linux environment
  2. C++11 compiler or higher

Author

You can’t perform that action at this time.