ConicBundle
Typedefs | Functions
cb_cinterface.h File Reference

Header declaring Interface to ConicBundle for language C. More...

Go to the source code of this file.

Typedefs

typedef struct CB_CSolvercb_problemp
 pointer to a ConicBundle problem
 
typedef int(* cb_functionp) (void *function_key, double *arg, double relprec, int max_subg, double *objective_value, int *n_subgrads, double *subg_values, double *subgradients, double *primal)
 function oracle; describe your function as a function of this type to pass it to the solver More...
 
typedef int(* cb_subgextp) (void *function_key, double *generating_primal, int n_indices, int *variable_indices, double *new_subgradient_values)
 This routine is not needed unless variabls (constraints in Lagrangean relaxation) are added on the fly. More...
 

Functions

cb_problemp cb_construct_problem (int no_bundle)
 Creates a a new problem object and returns a pointer to it. More...
 
int cb_destruct_problem (cb_problemp *p)
 Destructs and frees the problem object. More...
 
void cb_clear (cb_problemp p)
 Clears all data structures and problem information but keeps ouptut settings and algorithmic parameter settings. More...
 
void cb_set_defaults (cb_problemp p)
 Sets default values for algorithmic parameters that are not function specific (e.g., relative precision, weight and weight bounds for the augmentedproblem, etc.) More...
 
int cb_init_problem (cb_problemp p, int m, double *lowerb, double *upperb)
 Initializes the problem by setting the design space (the dimension and possible box constraints of the variables) More...
 
int cb_add_function (cb_problemp p, void *function_key, cb_functionp f, cb_subgextp se, int primaldim)
 Adds the function, the sum of which should be minimized, to the problem description. More...
 
int cb_set_lower_bound (cb_problemp p, int i, double lower_bound)
 set lower bound for variable i, use cb_get_minus_infinity() for unbounded from below. More...
 
int cb_set_upper_bound (cb_problemp p, int i, double upper_bound)
 set upper bound for variable i, use cb_get_plus_infinity() for unbounded above. More...
 
int cb_append_variables (cb_problemp p, int n_append, double *lower_bound, double *upper_bound)
 Append new variables (always in last postions in this order). More...
 
int cb_delete_variables (cb_problemp p, int n_del, int *delete_indices, int *map_to_old)
 Deletes variables corresponding to the specified indices. More...
 
int cb_reassign_variables (cb_problemp p, int n_assign, int *assign_new_from_old)
 Reassigns variables to new index positions by mapping to position i the variable that previously had index assign_new_from_old[i]. More...
 
int cb_solve (cb_problemp p, int maxsteps, int stop_at_descent_steps)
 solves or does a prescribed number of More...
 
int cb_termination_code (cb_problemp p)
 Returns the termination code of the bundle algorithm for the latest descent step. More...
 
int cb_print_termination_code (cb_problemp p)
 Outputs a text version of termination code, see cb_termination_code(). More...
 
double cb_get_objval (cb_problemp p)
 Returns the objective value resulting from last descent step (initially undefined). More...
 
int cb_get_center (cb_problemp p, double *center)
 Returns the next center point that was produced by the last call to cb_do_descent_step (in some problem modification routines the center point may be updated immediately, in others the center point will be corrected automatically directly before starting the next descent step and its values may be infeasible till then). More...
 
double cb_get_sgnorm (cb_problemp p)
 Returns Euclidean norm of the latest aggregate subgradient. More...
 
int cb_get_subgradient (cb_problemp p, double *subgradient)
 Returns the latest aggregate subgradient. More...
 
double cb_get_candidate_value (cb_problemp p)
 Returns the objective value computed in the last step of do_descent_step(), independent of whether this was a descent step or a null step (initially undefined). More...
 
int cb_get_candidate (cb_problemp p, double *candidate)
 Returns the last point, the "candidate", at which the function was evaluated in cb_do_descent_step(). More...
 
int cb_set_term_relprec (cb_problemp p, double term_relprec)
 Sets the relative precision requirements for successful termination (default 1e-5). More...
 
int cb_set_new_center_point (cb_problemp p, double *center)
 Set the starting point/center that will be used in the next call to cb_do_descent_step(). Each call to this routine causes an immediate evaluation of all oracles. More...
 
int cb_get_function_status (cb_problemp p, void *function_key)
 Returns the return value of the latest evaluation call to the function with this function_key. More...
 
int cb_get_approximate_slacks (cb_problemp p, double *slacks)
 Returns the multipliers for the bound constraints on the design variables; in Lagrangean relaxation they may be interpreted as primal slacks for inequality constraints. More...
 
int cb_get_approximate_primal (cb_problemp p, void *function_key, double *primal)
 Returns the current approximate primal solution for the function having this function_key. More...
 
int cb_get_center_primal (cb_problemp p, void *function_key, double *primal)
 Returns the best primal solution obtained in the current center point in evaluating the function having this function_key. More...
 
int cb_get_candidate_primal (cb_problemp p, void *function_key, double *primal)
 Returns the best primal solution returned by the last evaluation of the function having this function_key in the point cb_get_candidate(). More...
 
int cb_set_max_modelsize (cb_problemp p, void *function_key, int modelsize)
 Sets the maximum number of subgradients used in forming the cutting model of the function having this function_key. More...
 
int cb_set_max_bundlesize (cb_problemp p, void *function_key, int bundlesize)
 Sets the maximum number of subgradients stored for use in forming the model or determining metric information of the function having this function_key. it must be as least as large as max_modelsize (and is increased to this if not) More...
 
int cb_set_max_new_subgradients (cb_problemp p, void *function_key, int max_new_subg)
 Sets the maximum number of epsilon subgradients that can be returned in one call to the function having this function_key. More...
 
int cb_get_bundle_parameters (cb_problemp p, void *function_key, int *max_modelsize, int *max_bundelsize)
 Retrieves the two bundle parameters specified in the routines cb_set_max_modelsize() and cb_set_max_bundlesize(). for the function having this function_key. More...
 
int cb_reinit_function_model (cb_problemp p, void *function_key)
 Clears cutting model, subgradients and stored function values for the function with this function_key. More...
 
double cb_get_last_weight (cb_problemp p)
 Returns the current weight for the quadratic term in the augmented subproblem (may be interpreted as 1./step_size or 1./trustregion-radius). More...
 
int cb_set_next_weight (cb_problemp p, double weight)
 Sets the weight (>0) to be used in the quadratic term of the next augmented subproblem (may be interpreted as 1./step_size or 1./trustregion-radius). More...
 
int cb_set_min_weight (cb_problemp p, double min_weight)
 Sets a lower bound on the weight for the quadratic term of the augmented subproblem. More...
 
int cb_set_max_weight (cb_problemp p, double max_weight)
 Sets an upper bound on the weight for the quadratic term of the augmented subproblem. More...
 
int cb_set_variable_metric (cb_problemp p, int do_variable_metric)
 Use a variable metric heuristic or switch it off alltogether. (the variable metric heuristic resets the quadratic term to some diagonal or low rank matrix, switching it off resets the proximal term to the identity) More...
 
int cb_get_dim (cb_problemp p)
 Returns the current dimension of the design space/argument or -1 if no dimension is set.
 
int cb_get_n_functions (cb_problemp p)
 Returns the current number of functions in the problem.
 
double cb_get_minus_infinity (void)
 Returns the value "minus infinity", i.e., all bounds <= this value are set to this value and are regarded as minus infinity.
 
double cb_get_plus_infinity (void)
 Returns the value "plus infinity", i.e., all bounds >= this value are set to this value and are regarded as plus infinity.
 
void cb_clear_fail_counts (cb_problemp p)
 clears all fail counts on numerical function oder model failures, may be useful if this caused premature termination. More...
 
void cb_set_eval_limit (cb_problemp p, int eval_limit)
 Sets an upper bound on the number of calls to the oracle (use negative numbers for no limit). More...
 
void cb_set_inner_update_limit (cb_problemp p, int update_limit)
 Set an upper bound on the number of inner updates for the cutting model with primal slacks within one null step (use negative numbers for no limit). More...
 
void cb_set_active_bounds_fixing (cb_problemp p, int allow_fixing)
 If set to true (the default is false), some variables will be fixed automatically to the center value if their bounds are strongly active (i.e., the corresponding multipliers are big). More...
 
int cb_get_fixed_active_bounds (cb_problemp p, int *indicator)
 Returns the indicator vector of variables temporarily fixed to the center value due to significantly positive multipliers for the box constraints, see cb_set_active_bounds_fixing(). More...
 
void cb_set_print_level (cb_problemp p, int pril)
 Specifies the output level (<0 no output at all, =0 errors and warnings, >0 increasingly detailed information) More...
 

Detailed Description

Header declaring Interface to ConicBundle for language C.

Version
1.0
Date
2005-03-01
Author
Christoph Helmberg

indices start at 0!

solves min_{y in R^m} f_0(y) + f_1(y) + ... + f_k(y)

for convex functions f_i, the y-variables may be bounded or box constrained