decogo.solver.oa

Implements OA algorithm for convex problems

Classes

OaSolver(problem, settings, result)

A class which implements OA method for convex problems

class decogo.solver.oa.OaSolver(problem, settings, result)[source]

A class which implements OA method for convex problems

Parameters:
  • problem (DecomposedProblem) – Decomposed problem class, which stores all input data

  • settings (Settings) – Settings class

  • result (Results) – Class which stores the results

  • x_center (BlockVector or None) – Point inside of the feasible nonlinear set, which is used for the line search

Note

If there are any numerical instability (infeasible OA after some iterations, no improvement of OA etc), the following things should be checked:

  • Do all variables have the bounds? If not, at least try to estimate them;

  • Are the linearization cuts added using the points from local optimization? If yes, then don’t add them;

  • Check the sign of new constraints of the reformulation, i.e. switch from \(==\) to \(\leq\) in decomposer.

__init__(problem, settings, result)[source]

Constructor method

solve()[source]

Main method which calls all necessary methods for the OA algorithm. See papers for more info

init_oa()[source]

Initial phase of OA algorithm, which solves only LP OA master problems

solve_oa()[source]

Solves MIPOA master problem

Returns:

Solution point

Return type:

BlockVector

local_solve(hat_x)[source]

Solves NLP master problem with fixed integer variables

Parameters:

hat_x (BlockVector) – Pint for fixing integer variables and starting point

Returns:

Solution point, objective value and flag if the solution point is infeasible

Return type:

tuple

project(hat_x, block_id=None)[source]

Solves projection sub-problems

Parameters:
  • hat_x (BlockVector) – Point to project

  • block_id (int or None) – If it is not None, then it performs projection for one blocks, otherwise - for all

Returns:

Solution of projection sub-problems

Return type:

BlockVector

cut_refine(hat_x)[source]

Calls methods for refinement of OA with projection and line search

Parameters:

hat_x (BlockVector) – Infeasible point regarding nonlinear set

solve_lp_oa()[source]

Solves intger relaxation of MIPOA master problem

Returns:

Solution point

Return type:

BlockVector

solve_nlp_const_obj(hat_x)[source]

Solve the NLP problem with zero objective vector in order to get the interior point for performing the line search

Parameters:

hat_x (BlockVector) – Starting point

fix_and_refine(tilde_x)[source]

Performs fix-and-refine procedure, which solves fixed MIPOA sub-problems with slacks and projection sub-problems. See paper for more info

Parameters:

tilde_x (BlockVector) – Point to fix

Returns:

Solution point from MIPOA sub-problems and slacks

Return type:

tuple

int_changed(point1, point2)[source]

Checks if the values of integer variables between two points are changed

Parameters:
Returns:

True if changed, False - otherwise

Return type:

bool

add_line_search_cuts(hat_x, star_x)[source]

Performs line-search between two points. At resulting point it adds linearization cuts

Parameters:
  • hat_x (BlockVector) – Point outside of the feasible nonlinear set

  • star_x (BlockVector) – Point inside of the feasible nonlinear set

add_unfixed_nlp_cuts(hat_x)[source]

Solve NLP problem without fixing the integer variables and adds cuts at the result

Parameters:

hat_x (BlockVector) – Starting point

__abstractmethods__ = frozenset({})
_abc_impl = <_abc_data object>