Skip to content

Latest commit

 

History

History
17 lines (11 loc) · 739 Bytes

README.md

File metadata and controls

17 lines (11 loc) · 739 Bytes

knapsack-ga

Multiple Constraint Knapsack Solver using Genetic Algorithm

This is an application of Genetic Algorithm to solve 0-1 Knapsack Problems with multiple contraints.

This can be a decision making tool, that can decide the (approximately) most optimal choice among a set of choices, each with different contraints and each constraints having a limit.

Practically, this can be used in business where each decision might have some constraints or resource limits to execute, and the most optimal decision is required.

Instructions

Put your input in the input.txt file.

Compile with g++ -std=c++17 -O2 main.cpp

Then run the compiled executable. For windows: a.exe <in >out For Linux/macOS: a.out <in >out