Skip to content

Commit

Permalink
Merge branch 'main' into transient
Browse files Browse the repository at this point in the history
  • Loading branch information
marekpetrik authored Sep 10, 2024
2 parents 41b7c03 + 3eac75f commit 58a696a
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/algorithms/linprogsolve.jl
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ using JuMP
"""
lp_solve(model, γ, lpmf, [silent = true])
Implements the linear program primal problem for an MDP `model` with a discount factor `γ`.
It uses the JuMP model `lpm` as the linear program solver and returns the state values
found by `lpmf`. The `lpmf` is a factory that can be passed to `JuMP.Model`.
Expand Down Expand Up @@ -48,6 +49,7 @@ function lp_solve(model::TabMDP, obj::InfiniteH, lpmf; silent = true)
end

optimize!(lpm)

is_solved_and_feasible(lpm; dual = true) ||
error("Failed to solve the MDP linear program")

Expand All @@ -59,3 +61,4 @@ lp_solve(model::TabMDP, γ::Number, lpm; args...) =
lp_solve(model, InfiniteH(γ), lpm; args...)



0 comments on commit 58a696a

Please sign in to comment.