12 struct CoppProfile3rd profile_lp1 = {{NULL, 0, 0}, {NULL, 0, 0}, 0, 0};
13 struct CoppProfile3rd profile_lp2 = {{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_lp(problem1, options_lp, &profile_lp1);
67 if (example_expect_ok(status,
"topp3_lp first iteration"))
72 double t_final1 = 0.0;
73 if (example_time_from_third_order(s,
EXAMPLE_NUM_POINTS, profile_lp1, &t_final1, &t_s1) ||
79 printf(
"TOPP3-LP done. (The first-iteration)\n");
81 printf(
"t_final = %.6f s\n", t_final1);
82 printf(
"a_profile.len() = %zu\n", profile_lp1.
a.
len);
83 printf(
"b_profile.len() = %zu\n", profile_lp1.
b.
len);
84 printf(
"s(t) samples = %zu\n", s_t1.
len);
102 status =
topp3_lp(problem2, options_lp, &profile_lp2);
103 if (example_expect_ok(status,
"topp3_lp second iteration"))
108 double t_final2 = 0.0;
109 if (example_time_from_third_order(s,
EXAMPLE_NUM_POINTS, profile_lp2, &t_final2, &t_s2) ||
115 printf(
"---------\nTOPP3-LP 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_lp2.
a.
len);
119 printf(
"b_profile.len() = %zu\n", profile_lp2.
b.
len);
120 printf(
"s(t) samples = %zu\n", s_t2.
len);
enum CoppStatus topp3_lp(struct Topp3Problem problem, struct CoppClarabelOptions options, struct CoppProfile3rd *out_profile)
Solve a TOPP3-LP problem.