Knapsack Problem solver implementation in PHP.
Run with command:
php ScriptRunner.php --file=<file_path - string> --weight=<int> --algorithm=<int>
Example (if script is run from main directory):
php ScriptRunner.php --file=file.csv --weight=50 --algorithm=1
php ScriptRunner.php --file=file.csv --weight=20.12
- file - text, CSV file path, required
- weight - int/float, maximum weight of knapsack, required
- algorithm - int, algorithm type value, optional, default: 1
- GreedyAlgorithm - value: 1