Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mehmetaliyuksel/multi-constraint-knapsack-problem
A genetic algorithm based multi-constraint knapsack problem solver
https://github.com/mehmetaliyuksel/multi-constraint-knapsack-problem
knapsack-problem knapsack-problem-genetic knapsack-problem-greedy knapsack-solver
Last synced: 14 days ago
JSON representation
A genetic algorithm based multi-constraint knapsack problem solver
- Host: GitHub
- URL: https://github.com/mehmetaliyuksel/multi-constraint-knapsack-problem
- Owner: mehmetaliyuksel
- Created: 2021-06-11T02:48:03.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2021-06-16T20:51:36.000Z (over 3 years ago)
- Last Synced: 2024-12-11T15:08:16.245Z (22 days ago)
- Topics: knapsack-problem, knapsack-problem-genetic, knapsack-problem-greedy, knapsack-solver
- Language: Java
- Homepage:
- Size: 143 KB
- Stars: 1
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Multi-Constraint Knapsack Solver
A genetic algorithm based multi-constraint knapsack problem solver## Compilation
```bash
$ javac Main.java
```## Usage
```bash
$ java Main -i
-o
-p
-g
-m
-c
```## Default Parameters
```
POPULATION_SIZE = 200
NUM_OF_GENERATIONS = 250000
MUTATION_RATE = 0.05
CROSS_OVER_RATE = 0.5
INPUT_FILE = input.txt
OUTPUT_FILE = output.txt
```## Input Format
Inputs will always be given as a text file. Input file format, using 10 columns, whenever possible, should be as follows:
```
π π //
π£1 π£2 ... π£π //
π1 π2 ... ππ //
π€1,1 π€2,1 ... π€π,1 //
π€1,2 π€2,2 ... π€π,2
................
π€1,π π€2,π ... π€π,π
```## Output Format
Output is a text file including following:
```
Total_Value
π₯1
π₯2
.
.
.
π₯π
```
First line is Total_Value which is the sum of the values of the included items (Ξ£π£ππ₯π). Next lines include zeros and ones## Contributors
- [Mehmet Ali YΓΌksel](https://github.com/mehmetaliyuksel)
- [Eymen TopΓ§uoΔlu](https://github.com/eymentopcuoglu)