{"id":17662382,"url":"https://github.com/mehmetaliyuksel/multi-constraint-knapsack-problem","last_synced_at":"2025-03-30T11:27:50.210Z","repository":{"id":115735927,"uuid":"375886032","full_name":"mehmetaliyuksel/multi-constraint-knapsack-problem","owner":"mehmetaliyuksel","description":"A genetic algorithm based multi-constraint knapsack problem solver","archived":false,"fork":false,"pushed_at":"2021-06-16T20:51:36.000Z","size":146,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-05T13:24:31.454Z","etag":null,"topics":["knapsack-problem","knapsack-problem-genetic","knapsack-problem-greedy","knapsack-solver"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mehmetaliyuksel.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-06-11T02:48:03.000Z","updated_at":"2021-12-12T14:03:20.000Z","dependencies_parsed_at":null,"dependency_job_id":"e5a82749-50af-49ea-b137-efeda793ab8b","html_url":"https://github.com/mehmetaliyuksel/multi-constraint-knapsack-problem","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mehmetaliyuksel%2Fmulti-constraint-knapsack-problem","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mehmetaliyuksel%2Fmulti-constraint-knapsack-problem/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mehmetaliyuksel%2Fmulti-constraint-knapsack-problem/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mehmetaliyuksel%2Fmulti-constraint-knapsack-problem/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mehmetaliyuksel","download_url":"https://codeload.github.com/mehmetaliyuksel/multi-constraint-knapsack-problem/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246311577,"owners_count":20757161,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["knapsack-problem","knapsack-problem-genetic","knapsack-problem-greedy","knapsack-solver"],"created_at":"2024-10-23T18:22:18.962Z","updated_at":"2025-03-30T11:27:50.191Z","avatar_url":"https://github.com/mehmetaliyuksel.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Multi-Constraint Knapsack Solver\nA genetic algorithm based multi-constraint knapsack problem solver \n\n##  Compilation\n\n```bash\n$ javac Main.java\n```\n\n## Usage\n\n```bash\n$ java Main -i \u003cInput file name\u003e \n            -o \u003cOutput file name\u003e \n            -p \u003cPopulation size\u003e \n            -g \u003cNumber of generations\u003e \n            -m \u003cMutation rate\u003e \n            -c \u003cCross over rate\u003e\n```\n\n## Default Parameters\n\n```\nPOPULATION_SIZE = 200\nNUM_OF_GENERATIONS = 250000\nMUTATION_RATE = 0.05\nCROSS_OVER_RATE = 0.5\nINPUT_FILE = input.txt\nOUTPUT_FILE = output.txt\n```\n\n## Input Format\nInputs will always be given as a text file. Input file format, using 10 columns, whenever possible, should be as follows:\n```\n𝑚 𝑛 //\u003cm := #knapsacks\u003e \u003cn := #items\u003e\n𝑣1 𝑣2 ... 𝑣𝑛 //\u003cn values of items\u003e\n𝑊1 𝑊2 ... 𝑊𝑚 //\u003cm knapsack capacities\u003e\n𝑤1,1 𝑤2,1 ... 𝑤𝑛,1 //\u003cnxm matrix of constraints\u003e\n𝑤1,2 𝑤2,2 ... 𝑤𝑛,2\n................\n𝑤1,𝑚 𝑤2,𝑚 ... 𝑤𝑛,𝑚\n```\n\n## Output Format\nOutput is a text file including following:\n```\nTotal_Value \n𝑥1 \n𝑥2\n.\n.\n.\n𝑥𝑛\n```\nFirst line is Total_Value which is the sum of the values of the included items (Σ𝑣\u003csub\u003e𝑖\u003c/sub\u003e𝑥\u003csub\u003e𝑖\u003c/sub\u003e). Next lines include zeros and ones\n\n## Contributors\n- [Mehmet Ali Yüksel](https://github.com/mehmetaliyuksel)\n- [Eymen Topçuoğlu](https://github.com/eymentopcuoglu)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmehmetaliyuksel%2Fmulti-constraint-knapsack-problem","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmehmetaliyuksel%2Fmulti-constraint-knapsack-problem","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmehmetaliyuksel%2Fmulti-constraint-knapsack-problem/lists"}