12 struct CoppProfile3rd profile_qp1 = {{NULL, 0, 0}, {NULL, 0, 0}, 0, 0};
13 struct CoppProfile3rd profile_qp2 = {{NULL, 0, 0}, {NULL, 0, 0}, 0, 0};
21 if (example_create_analytic_path_3rd(&path))
48 if (example_expect_ok(status,
"copp_clarabel_default_options"))
66 status =
topp3_socp(problem1, options_socp, &profile_qp1);
67 if (example_expect_ok(status,
"topp3_socp first iteration"))
72 double t_final1 = 0.0;
73 if (example_time_from_third_order(s,
EXAMPLE_NUM_POINTS, profile_qp1, &t_final1, &t_s1) ||
79 printf(
"TOPP3-SOCP done. (The first-iteration)\n");
81 printf(
"t_final = %.6f s\n", t_final1);
82 printf(
"a_profile.len() = %zu\n", profile_qp1.
a.
len);
83 printf(
"b_profile.len() = %zu\n", profile_qp1.
b.
len);
84 printf(
"s(t) samples = %zu\n", s_t1.
len);
102 status =
topp3_socp(problem2, options_socp, &profile_qp2);
103 if (example_expect_ok(status,
"topp3_socp second iteration"))
108 double t_final2 = 0.0;
109 if (example_time_from_third_order(s,
EXAMPLE_NUM_POINTS, profile_qp2, &t_final2, &t_s2) ||
115 printf(
"---------\nTOPP3-SOCP done. (The second-iteration)\n");
117 printf(
"t_final = %.6f s <= %.6f s\n", t_final2, t_final1);
118 printf(
"a_profile.len() = %zu\n", profile_qp2.
a.
len);
119 printf(
"b_profile.len() = %zu\n", profile_qp2.
b.
len);
120 printf(
"s(t) samples = %zu\n", s_t2.
len);
enum CoppStatus topp3_socp(struct Topp3Problem problem, struct CoppClarabelOptions options, struct CoppProfile3rd *out_profile)
Solve a TOPP3-SOCP problem.