26 const size_t model_size = 0;
27 const void*
model = NULL;
29 const int solver_type = 3;
30 void* solve_result = NULL;
31 size_t solve_result_size = 0;
32 char* status_msg = NULL;
33 const int error =
MathOptSolve(
model, model_size, solver_type, NULL, &solve_result,
34 &solve_result_size, &status_msg);
36 printf(
"error on MathOptSolve, status code: %d, status message: %s", error, status_msg);
46 const size_t model_size = 0;
47 const void*
model = NULL;
49 const int solver_type = 3;
50 void* solve_result = NULL;
51 size_t solve_result_size = 0;
52 char* status_msg = NULL;
55 const int error =
MathOptSolve(
model, model_size, solver_type, NULL, &solve_result,
56 &solve_result_size, &status_msg);
58 printf(
"error on MathOptSolve, status code: %d, status message: %s", error, status_msg);
63 printf(
"interrupter should be interrupted");
71int main(
int argc,
char** argv) {
void MathOptFree(void *ptr)
int MathOptIsInterrupted(const MathOptInterrupter *interrupter)
void MathOptInterrupt(MathOptInterrupter *interrupter)
int MathOptSolve(const void *model, const size_t model_size, const int solver_type, MathOptInterrupter *const interrupter, void **solve_result, size_t *solve_result_size, char **status_msg)
MathOptInterrupter * MathOptNewInterrupter()
void MathOptFreeInterrupter(MathOptInterrupter *interrupter)
Frees interrupter, has no effect when interrupter is NULL.
int main(int argc, char **argv)
void TestSolveEmptyModel()
void TestInterruptSolveEmptyModel()