14 static void clean_up_inner_problem();
15 static void init_inner_problem();
33 init_inner_problem(s, &p_in);
34 if (solve_FALM(s,&p_in) == -1){
35 ERROR(
"Error in solving solveFALM()\n");
36 clean_up_inner_problem(&p_in);
39 clean_up_inner_problem(&p_in);
50 struct Array ds_array, pf_array;
61 real_t dual_value_new = 0.0;
73 clock_t tic, toc, tic_in, toc_in;
83 niter_inner +=
FGM(p_in);
99 real_t dual_value = dual_obj(s);
115 if (dual_value_diff < s->opt->eps_ds){
122 if (pf < s->opt->eps_pf)
148 theta_new = 0.5 * (1.0 + sqrt(1.0 + 4.0*(theta*theta)));
149 beta = (theta-1.0)/theta_new;
175 niter_inner +=
FGM(p_in);
204 niter_inner +=
FGM(p_in);
216 dual_value_new = dual_obj(s);
217 dual_value_diff =
abs_2(dual_value_new - dual_value);
218 dual_value = dual_value_new;
250 ERROR(
"Choose algorithm 7 or 8 when running FALM()\n");
293 ERROR(
"Choose algorithm 7 or 8 when running FALM()\n");
304 if (last_eps_ds == 1)
336 f_value += 0.5 * s->
opt->
rho * (nor*nor);
370 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)
int32_t FALM(struct Struct_FALM *s)
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)