Skip to content

Commit

Permalink
constraint_values is renamed in CTs 0.9
Browse files Browse the repository at this point in the history
  • Loading branch information
exaexa committed Jan 5, 2024
1 parent f813347 commit 59e2f35
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions docs/src/examples/03-parsimonious-flux-balance.jl
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ J.optimize!(opt_model) # JuMP is called J in COBREXA
is_solved(opt_model) # check if solved
vt = C.constraint_values(ctmodel, J.value.(opt_model[:x])) # ConstraintTrees.jl is called C in COBREXA
vt = C.substitute_values(ctmodel, J.value.(opt_model[:x])) # ConstraintTrees.jl is called C in COBREXA
@test isapprox(vt.l2objective, ?; atol = QP_TEST_TOLERANCE) #src # TODO will break until mutable bounds
Expand Down Expand Up @@ -107,7 +107,7 @@ J.optimize!(opt_model) # JuMP is called J in COBREXA
is_solved(opt_model) # check if solved
vt = C.constraint_values(ctmodel, J.value.(opt_model[:x])) # ConstraintTrees.jl is called C in COBREXA
vt = C.substitute_values(ctmodel, J.value.(opt_model[:x])) # ConstraintTrees.jl is called C in COBREXA
@test isapprox(vt.l2objective, ?; atol = QP_TEST_TOLERANCE) #src # TODO will break until mutable bounds
Expand Down
2 changes: 1 addition & 1 deletion src/frontend/parsimonious.jl
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ function parsimonious_optimized_constraints(
)

J.optimize!(om)
is_solved(om) && return C.constraint_values(output, J.value.(om[:x]))
is_solved(om) && return C.substitute_values(output, J.value.(om[:x]))

J.delete(om, pfba_tolerance_constraint)
J.unregister(om, :pfba_tolerance_constraint)
Expand Down
2 changes: 1 addition & 1 deletion src/solver.jl
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ function optimized_constraints(
m(om)
end
J.optimize!(om)
is_solved(om) ? C.constraint_values(output, J.value.(om[:x])) : nothing
is_solved(om) ? C.substitute_values(output, J.value.(om[:x])) : nothing
end

export optimized_constraints

0 comments on commit 59e2f35

Please sign in to comment.