File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1- ## Assignment Problem
1+ ## Assignment Problem Solver
2+
23``` @docs
34OperationsResearchModels.solve(a::AssignmentProblem)
45```
56
7+ ## Assignment Problem
68``` @docs
79OperationsResearchModels.AssignmentProblem
810```
911
12+ ## Assignment Result
13+
1014``` @docs
1115OperationsResearchModels.AssignmentResult
1216```
Original file line number Diff line number Diff line change 1- # Zero-Sum Games
1+ ## Zero-Sum Games
22
33``` @docs
44OperationsResearchModels.game
Original file line number Diff line number Diff line change 1- # The Classical Knapsack Problem
1+ # The Classical Knapsack Problem Solver
22
33``` @docs
44OperationsResearchModels.solve(p::KnapsackProblem)
5- ```
5+ ```
6+
7+
8+ ``` @docs
9+ OperationsResearchModels.KnapsackProblem
10+ ```
11+
12+ ``` @docs
13+ OperationsResearchModels.KnapsackResult
14+ ```
15+
Original file line number Diff line number Diff line change 66OperationsResearchModels.johnsons
77```
88
9- ### Genetic Algorithm for the problems that cannot be solved with using Johnson's Rule
9+ ## Genetic Algorithm for the problems that cannot be solved with using Johnson's Rule
1010
1111``` @docs
1212OperationsResearchModels.johnsons_ga
1313```
1414
15- ### Makespan
15+ ## Makespan
1616
1717``` @docs
1818OperationsResearchModels.makespan
Original file line number Diff line number Diff line change @@ -7,12 +7,44 @@ export KnapsackResult
77
88using JuMP, HiGHS
99
10+
11+ """
12+ KnapsackResult
13+
14+ # Description
15+
16+ A structure to hold the result of the knapsack problem.
17+
18+ # Fields
19+
20+ - `selected`: A vector of booleans indicating which items are selected.
21+ - `model`: The JuMP model used to solve the problem.
22+ - `objective`: The objective value of the model.
23+ """
1024struct KnapsackResult
1125 selected:: Vector{Bool}
1226 model:: JuMP.Model
1327 objective:: Float64
1428end
1529
30+
31+
32+ """
33+ knapsack(values::Vector{Float64}, weights::Vector{Float64}, capacity::Float64)::KnapsackResult
34+
35+ # Description
36+
37+ Defines the knapsack problem.
38+
39+ # Fields
40+
41+ - `values::Vector{Float64}`: The values of the items.
42+ - `weights::Vector{Float64}`: The weights of the items.
43+ - `capacity::Float64`: The maximum capacity of the knapsack.
44+
45+ # Output
46+ - `KnapsackResult`: The custom data type that holds selected items, model, and objective value.
47+ """
1648struct KnapsackProblem
1749 values:: Vector{Float64}
1850 weights:: Vector{Float64}
You can’t perform that action at this time.
0 commit comments