14 static void clean_up_inner_problem();
15 static void init_inner_problem();
32 init_inner_problem(s, &p_in);
33 if (solve_DGM(s,&p_in) == -1){
34 ERROR(
"Error in solving solveDGM()\n");
35 clean_up_inner_problem(&p_in);
38 clean_up_inner_problem(&p_in);
49 _DEBUG(
"alpha %f\n", alpha);
68 ERROR(
"Error deciding the problem case\n");
77 struct Array ds_array, pf_array;
88 real_t dual_value_new = 0.0;
95 clock_t tic, toc, tic_in, toc_in;
106 niter_inner +=
FGM(p_in);
121 real_t dual_value = dual_obj(s,prob_case);
139 if (dual_value_diff < s->opt->eps_ds){
146 if (pf < s->opt->eps_pf)
193 ERROR(
"Error deciding the problem case\n");
228 ERROR(
"Error deciding the problem case\n");
236 niter_inner +=
FGM(p_in);
252 dual_value_new = dual_obj(s,prob_case);
253 dual_value_diff =
abs_2(dual_value_new - dual_value);
254 dual_value = dual_value_new;
286 ERROR(
"Error deciding the problem case\n");
316 ERROR(
"Error deciding the problem case\n");
321 ERROR(
"Choose algorithm 1 or 2 when running DGM()\n");
358 ERROR(
"Choose algorithm 1 or 2 when running DGM()\n");
369 if (last_eps_ds == 1)
421 ERROR(
"Error deciding the problem case\n");
459 static void clean_up_inner_problem(
struct Struct_FGM *s)
void vector_add(const real_t *v1, const real_t *v2, real_t *res, const uint32_t length)
void free_pointer(real_t *pointer)
void insertArray(struct Array *a, real_t element)
real_t abs_2(const real_t a)
#define _DEBUG(fmt, args...)
real_t obj(const real_t *z, const real_t *H, const real_t *c, real_t *temp)
void vector_min(const real_t *v1, const real_t *v2, real_t *res, const uint32_t length)
void initArray(struct Array *a, uint32_t initialSize)
real_t * vector_alloc(uint32_t size)
uint32_t iterations_inner_tot
uint32_t flag_last_satisfied
void vector_sub(const real_t *v1, const real_t *v2, real_t *res, const uint32_t length)
uint32_t FGM(struct Struct_FGM *s)
void vector_max_with_zero(real_t *v, const uint32_t length)
uint32_t niter_feasible_pf
real_t vector_norm_2(real_t *v, const uint32_t length)
int32_t DGM(struct Struct_DGM *s)
uint32_t num_exceeded_max_niter_inner
void vector_copy(const real_t *v1, real_t *v2, const uint32_t length)
void vector_scalar_mul(const real_t *v1, const real_t scalar, real_t *res, const uint32_t length)
void mtx_vec_mul(const real_t *mtx, const real_t *v, real_t *res, const uint32_t rows, const uint32_t cols)
void vector_max(const real_t *v1, const real_t *v2, real_t *res, const uint32_t length)
#define _DEBUG2(fmt, args...)
uint32_t niter_feasible_ds
void freeArray(struct Array *a)
real_t vector_mul(const real_t *v1, const real_t *v2, const uint32_t length)