decogo.solver.results

Stores the results obtained by the solver

Classes

Results()

A class which stores and makes some manipulations with the results.

SubProblemData()

A class which stores direction and columns

class decogo.solver.results.Results[source]

A class which stores and makes some manipulations with the results. The results are: primal/dual bound, primal solution point, timings, gap

__init__()[source]

Constructor method

set_new_primal_bound(primal_bound, point)[source]

Sets new primal bound and primal point.

Parameters:
  • primal_bound (float) – Primal bound

  • point (BlockVector) – Point which corresponds to the primal bound

get_gap(primal_bound, dual_bound)[source]

Computes the gap in percentage between primal and dual bound

Parameters:
  • primal_bound (float) – Primal bound

  • dual_bound (float) – Dual bound

Returns:

Gap

Return type:

float

print_results()[source]

Prints summary of results at the end of the logging process depending on the strategy

print_decomp_time_and_total_time()[source]

Prints total time and decomposition time

print_oa_stats()[source]

Prints OA stats

print_col_gen_stats()[source]

Print Column Generation stats

add_sub_problem_time(time)[source]

Accumulates sub-problem time

Parameters:

time (float) – Time to add

calculate_total_time()[source]

Calculates total time

add_sub_problem_data(block_id, dir_im_space, dir_orig_space, column, point, ia_sol)[source]

“Add sub-problem data by calling SubProblemData.add_data()

class decogo.solver.results.SubProblemData[source]

A class which stores direction and columns

__init__()[source]

Constructor method

__getitem__(item)[source]

Index operator

Parameters:

item (tuple) – Given index as tuple (block_id, index)

Returns:

tuple (point, column), i.e point and corresponding column

Return type:

tuple

add_data_im_space(block_id, dir_im_space, column)[source]

Add sub-problem data

Parameters:
  • block_id (int) – Block identifier

  • dir_im_space (ndarray) – Given direction

  • column (ndarray) – Given column

Returns:

Tuple which containes direction, column

Return type:

tuple

add_data_orig_space(block_id, dir_orig_space, point, ia_sol=None)[source]

Add sub-problem data

Parameters:
  • block_id (int) – Block identifier

  • dir_orig_space (ndarray) – Given direction

  • point (ndarray) – Given point

Returns:

Tuple which containes direction, point

Return type:

tuple

export_data(folder_name='data', exact_solver=False)[source]