diff --git a/CHANGELOG.md b/CHANGELOG.md index 6f231ac..dbcdcfc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,10 @@ -### 0.1.8 (Upcoming release) +### 0.1.9 (Upcoming Release) + + +### 0.1.8 - pmedian now returns a PMedianResult object rather than a Dict{String, Any}. +- Implement knapsack() for solving the classical Knapsack problem using mathematical optimization. ### 0.1.7 diff --git a/Project.toml b/Project.toml index a9ae842..c72619c 100644 --- a/Project.toml +++ b/Project.toml @@ -1,7 +1,7 @@ name = "OperationsResearchModels" uuid = "8042aa49-e599-49ec-a8f7-b5b80cc82a88" authors = ["Mehmet Hakan Satman "] -version = "0.1.7" +version = "0.1.8" [deps] HiGHS = "87dc4568-4c63-4d18-b0c0-bb2238e4078b" diff --git a/README.md b/README.md index 443a3e7..60c8745 100644 --- a/README.md +++ b/README.md @@ -310,3 +310,26 @@ Status: CONVERGED! [ Info: Objective value: 183.33333333333334 ``` + + +## The Classical Knapsack Problem + +```julia +julia> using OperationsResearchModels + +julia> values = [1, 5, 89, 10]; + +julia> weights = [5, 6, 3, 5]; + +julia> result = knapsack(values, weights, 8); + +julia> result.selected +4-element Vector{Bool}: + 0 + 0 + 1 + 1 + +julia> result.objective +99.0 +``` \ No newline at end of file