Files | |
| file | bindings/c/include/copp/topp3.h |
| TOPP3-LP and TOPP3-SOCP APIs. | |
Functions | |
| enum CoppStatus | topp3_lp (struct Topp3Problem problem, struct CoppClarabelOptions options, struct CoppProfile3rd *out_profile) |
| Solve a TOPP3-LP problem. | |
| enum CoppStatus | topp3_lp_expert (struct Topp3Problem problem, struct CoppClarabelOptions options, struct Copp3SocpResult *out_result) |
| Solve a TOPP3-LP problem and always return Clarabel diagnostics. | |
| enum CoppStatus | topp3_socp (struct Topp3Problem problem, struct CoppClarabelOptions options, struct CoppProfile3rd *out_profile) |
| Solve a TOPP3-SOCP problem. | |
| enum CoppStatus | topp3_socp_expert (struct Topp3Problem problem, struct CoppClarabelOptions options, struct Copp3SocpResult *out_result) |
| Solve a TOPP3-SOCP problem and always return Clarabel diagnostics. | |
| enum CoppStatus topp3_lp | ( | struct Topp3Problem | problem, |
| struct CoppClarabelOptions | options, | ||
| struct CoppProfile3rd * | out_profile ) |
Solve a TOPP3-LP problem.
This C ABI builds an internal TOPP3 problem from the borrowed Topp3Problem, forwards options to the Clarabel backend, and returns only the accepted third-order profile.
On success, out_profile owns COPP-allocated a and b vectors and must be released with copp_profile_3rd_free.
The example below solves TOPP3-LP and releases the accepted third-order profile.
| enum CoppStatus topp3_lp_expert | ( | struct Topp3Problem | problem, |
| struct CoppClarabelOptions | options, | ||
| struct Copp3SocpResult * | out_result ) |
Solve a TOPP3-LP problem and always return Clarabel diagnostics.
This expert entry follows the advanced-diagnostics convention: true runtime failures still return a non-OK CoppStatus, but non-accepted Clarabel statuses are reported inside out_result with has_profile == false and the function returns COPP_STATUS_OK.
TOPP3-LP has no user-provided COPP objective list, so out_result.objective_value is NaN and out_result.objective_terms is an empty vector. Raw Clarabel objective values and solver diagnostics are still populated.
Use the same advanced-diagnostics pattern as copp2_socp_expert. The result type is Copp3SocpResult, and has_profile replaces has_a.
| enum CoppStatus topp3_socp | ( | struct Topp3Problem | problem, |
| struct CoppClarabelOptions | options, | ||
| struct CoppProfile3rd * | out_profile ) |
Solve a TOPP3-SOCP problem.
This C ABI builds an internal TOPP3 problem from the borrowed Topp3Problem, forwards options to the Clarabel backend, and returns only the accepted third-order profile.
On success, out_profile owns COPP-allocated a and b vectors and must be released with copp_profile_3rd_free.
The example below solves TOPP3-SOCP and releases the accepted third-order profile.
| enum CoppStatus topp3_socp_expert | ( | struct Topp3Problem | problem, |
| struct CoppClarabelOptions | options, | ||
| struct Copp3SocpResult * | out_result ) |
Solve a TOPP3-SOCP problem and always return Clarabel diagnostics.
This expert entry follows the advanced-diagnostics convention: true runtime failures still return a non-OK CoppStatus, but non-accepted Clarabel statuses are reported inside out_result with has_profile == false and the function returns COPP_STATUS_OK.
TOPP3-SOCP has no user-provided COPP objective list, so out_result.objective_value is NaN and out_result.objective_terms is an empty vector. Raw Clarabel objective values and solver diagnostics are still populated.
Use the same advanced-diagnostics pattern as copp2_socp_expert. The result type is Copp3SocpResult, and has_profile replaces has_a.