Skip to content

Commit 8656152

Browse files
committed
export JuMP model in assignment problems
1 parent deac85a commit 8656152

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/assignment.jl

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ end
3838
- `problem::AssignmentProblem`: The original assignment problem.
3939
- `solution::Matrix`: The solution matrix of the assignment problem.
4040
- `cost::Real`: The optimal cost of the assignment.
41+
- `model::JuMP.Model`: The JuMP model used to solve the problem.
4142
4243
# Description
4344
@@ -48,6 +49,7 @@ struct AssignmentResult
4849
problem::AssignmentProblem
4950
solution::Matrix
5051
cost::Real
52+
model::JuMP.Model
5153
end
5254

5355

@@ -162,7 +164,7 @@ function solve(a::AssignmentProblem)::AssignmentResult
162164
solution = value.(x)
163165
cost = JuMP.objective_value(model)
164166

165-
result = AssignmentResult(a, solution, cost)
167+
result = AssignmentResult(a, solution, cost, model)
166168
return result
167169
end
168170

0 commit comments

Comments
 (0)