14 static void clean_up_inner_problem();
15 static void init_inner_problem();
30 init_inner_problem(s, &p_in);
31 if (solve_ALM(s,&p_in) == -1){
32 ERROR(
"Error in solving solveALM()\n");
33 clean_up_inner_problem(&p_in);
37 clean_up_inner_problem(&p_in);
49 struct Array ds_array, pf_array;
59 real_t dual_value_new = 0.0;
66 clock_t tic, toc, tic_in, toc_in;
77 niter_inner +=
FGM(p_in);
92 real_t dual_value = dual_obj(s);
109 if (dual_value_diff < s->opt->eps_ds){
116 if (pf < s->opt->eps_pf)
150 niter_inner +=
FGM(p_in);
166 dual_value_new = dual_obj(s);
167 dual_value_diff =
abs_2(dual_value_new - dual_value);
168 dual_value = dual_value_new;
196 ERROR(
"Choose algorithm 5 or 6 when running ALM()\n");
233 ERROR(
"Choose algorithm 5 or 6 when running ALM()\n");
244 if (last_eps_ds == 1)
276 f_value += 0.5 * s->
opt->
rho * (nor*nor);
312 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)
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)
uint32_t niter_feasible_pf
real_t vector_norm_2(real_t *v, const uint32_t length)
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)
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)
int32_t ALM(struct Struct_ALM *s)