3 #ifndef CONICBUNDLE_CB_CINTERFACE_H 4 #define CONICBUNDLE_CB_CINTERFACE_H 223 double *objective_value,
238 double *subgradients,
313 double* generating_primal,
318 int* variable_indices,
323 double* new_subgradient_values
599 int n_append,
double* lower_bound,
double* upper_bound);
649 int n_del,
int* delete_indices,
int* map_to_old);
697 int n_assign,
int* assign_new_from_old);
762 int cb_solve(cb_problemp p,
int maxsteps,
int stop_at_descent_steps);
1267 int* max_modelsize,
int* max_bundelsize);
void cb_clear_fail_counts(cb_problemp p)
clears all fail counts on numerical function oder model failures, may be useful if this caused premat...
double cb_get_last_weight(cb_problemp p)
Returns the current weight for the quadratic term in the augmented subproblem (may be interpreted as ...
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.
void cb_clear(cb_problemp p)
Clears all data structures and problem information but keeps ouptut settings and algorithmic paramete...
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.
bool no_bundle
if true, swith on the minimal sumbundle version
Definition: CB_CSolver.hxx:42
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.
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)...
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()...
double cb_get_objval(cb_problemp p)
Returns the objective value resulting from last descent step (initially undefined).
int cb_get_dim(cb_problemp p)
Returns the current dimension of the design space/argument or -1 if no dimension is set...
double cb_get_plus_infinity(void)
Returns the value "plus infinity", i.e., all bounds >= this value are set to this value and are regar...
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 ...
Definition: cb_cinterface.h:205
double cb_get_minus_infinity(void)
Returns the value "minus infinity", i.e., all bounds <= this value are set to this value and are rega...
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).
Interface class for implementing the language "C" interface.
Definition: CB_CSolver.hxx:38
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.
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 interp...
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 ...
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 th...
int cb_get_subgradient(cb_problemp p, double *subgradient)
Returns the latest aggregate subgradient.
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_b...
double cb_get_candidate_value(cb_problemp p)
Returns the objective value computed in the last step of do_descent_step(), independent of whether th...
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...
int cb_solve(cb_problemp p, int maxsteps, int stop_at_descent_steps)
solves or does a prescribed number of
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...
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.
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...
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 inf...
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 inf...
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...
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 probl...
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.
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 havi...
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...
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 ...
int cb_termination_code(cb_problemp p)
Returns the termination code of the bundle algorithm for the latest descent step. ...
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 havi...
int cb_print_termination_code(cb_problemp p)
Outputs a text version of termination code, see cb_termination_code().
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.)
int cb_destruct_problem(cb_problemp *p)
Destructs and frees the problem object.
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 fl...
Definition: cb_cinterface.h:306
double cb_get_sgnorm(cb_problemp p)
Returns Euclidean norm of the latest aggregate subgradient.
cb_problemp cb_construct_problem(int no_bundle)
Creates a a new problem object and returns a pointer to it.
int cb_get_n_functions(cb_problemp p)
Returns the current number of functions in the problem.
int cb_get_approximate_slacks(cb_problemp p, double *slacks)
Returns the multipliers for the bound constraints on the design variables; in Lagrangean relaxation t...
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.
int cb_set_term_relprec(cb_problemp p, double term_relprec)
Sets the relative precision requirements for successful termination (default 1e-5).
struct CB_CSolver * cb_problemp
pointer to a ConicBundle problem
Definition: cb_cinterface.h:99
int cb_delete_variables(cb_problemp p, int n_del, int *delete_indices, int *map_to_old)
Deletes variables corresponding to the specified indices.
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 t...
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.