Skip to content

Commit

Permalink
add fields to ClarabelRs julia wrapper
Browse files Browse the repository at this point in the history
  • Loading branch information
goulart-paul committed Feb 22, 2024
1 parent ce3a854 commit 4212fc6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/julia/ClarabelRs/src/types.jl
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ struct SolutionJLRS
s::VectorJLRS{Float64}
status::UInt32 #0 indexed enum in RS/JL
obj_val::Float64
obj_val_dual::Float64
solve_time::Float64
iterations::UInt32
r_prim::Float64
Expand All @@ -81,6 +82,7 @@ function DefaultSolution(sol::SolutionJLRS)
Vector(sol.s),
Clarabel.SolverStatus(sol.status),
sol.obj_val,
sol.obj_val_dual,
sol.solve_time,
sol.iterations,
sol.r_prim,
Expand Down
2 changes: 2 additions & 0 deletions src/julia/types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@ pub(crate) struct SolutionJLRS {
pub s: VectorJLRS<f64>,
pub status: u32, //0 indexed enum in RS/JL
pub obj_val: f64,
pub obj_val_dual: f64,
pub solve_time: f64,
pub iterations: u32,
pub r_prim: f64,
Expand All @@ -124,6 +125,7 @@ impl From<&DefaultSolution<f64>> for SolutionJLRS {
s: VectorJLRS::<f64>::from(&sol.s),
status: sol.status as u32,
obj_val: sol.obj_val,
obj_val_dual: sol.obj_val_dual,
solve_time: sol.solve_time,
iterations: sol.iterations,
r_prim: sol.r_prim,
Expand Down

0 comments on commit 4212fc6

Please sign in to comment.