Assignment Problem
AssignmentProblem
OperationsResearchModels.Assignment.AssignmentProblem
— TypeAssignmentProblem
Fields
costs::Matrix{T}
: The cost matrix of the assignment problem.
Description
The AssignmentProblem
struct represents an assignment problem with a cost matrix.
Assignment Problem Solver
OperationsResearchModels.solve
— Methodsolve(a)
Arguments
a::AssignmentProblem
: The problem in type of AssignmentProblem
Output
AssignmentResult
: The custom data type that holds problem, solution, and optimum cost.
Description
Solves an assignment problem given by an object of in type AssignmentProblem
.
Example
julia> mat = [
4 8 1;
3 1 9;
1 6 7;
];
julia> problem = AssignmentProblem(mat);
julia> result = solve(problem);
julia> result.solution
3×3 Matrix{Float64}:
0.0 0.0 1.0
0.0 1.0 0.0
1.0 0.0 0.0
julia> result.cost
3.0
AssignmentResult
OperationsResearchModels.Assignment.AssignmentResult
— TypeAssignmentResult
Fields
problem::AssignmentProblem
: The original assignment problem.solution::Matrix
: The solution matrix of the assignment problem.cost::Real
: The optimal cost of the assignment.model::JuMP.Model
: The JuMP model used to solve the problem.
Description
The AssignmentResult
struct represents the result of solving an assignment problem. It contains the original problem, the solution matrix, and the optimal cost.