This repo contains the implementation of the Genetic Algorithm (GA) on the Forest Planning problems. For the introduction to Forest Planning problem, see Potter, W. D., Drucker, E., Bettinger, P., Maier, F., Martin, M., Luper, D., ... & Hayes, C. (2009). Diagnosis, configuration, planning, and pathfinding: Experiments in nature-inspired optimization. In Natural Intelligence for Scheduling, Planning and Packing Problems (pp. 267-294). Springer Berlin Heidelberg. For the report of this application, see here.
- fixedInput.py --- Get the input data for fitness calculation and verification
- simpleGA.py --- Implementation of GA (fitness calculation not included)
- fitnessMDF.py --- Fitness calculation and adjacency issue fix scheme
- wrapperGA.py --- Combination of other essential elements of GA, generational fitness calculation and adjacency issue fix scheme
Note: The source of data is Dr. Potter from University of Georgia
- West_73_units_adjacency.txt --- The adjacency table
- West_73_units_volumes.txt --- The production volumes of each field on three time periods
Keep the file structure. In python set your local working environment to the folder "ga-pso-mfd >>Genetic_Algorithm". Run wrapperGA.py firstly, then use the classes. An example is shown as the following:
# assuming you have run wrapperGA.py
test = WrapperGa(100000, 1, 0.8, 0.02)
test.evolution()
# Check the results mentioned in the above paper and report
If you have a customized fitness function, you can easily plug in your code to replace what is currently in FitnessCalc class.