solver
IPSolver.hpp
Go to the documentation of this file.
1 
12 #pragma once
13 
19 
20 namespace solver {
21 
22  class Model;
23  class BnBSolver;
24  class NcvxBnBSolver;
25 
32  {
33  public:
36 
37  ExitCode optimize();
38  const OptimizationVector& optimalVector() const { return opt_; }
39  void initialize(SolverStorage& stg, Cone& cone, SolverSetting& stgs);
40 
41  private:
42  inline Cone& getCone() { return *cone_; }
43  inline SolverStorage& getStorage() { return *storage_; }
44  inline SolverSetting& getSetting() { return *setting_; }
45  inline CvxInfoPrinter& getPrinter() { return printer_; }
46  inline OptimizationVector& optimalVector() { return opt_; }
47  inline LinSolver& getLinSolver() { return linear_solver_; }
48  inline OptimizationInfo& getInfo() { return optimization_info_; }
49  inline EqRoutine& getEqRoutine() { return equilibration_routine_; }
50  inline OptimizationInfo& getBestInfo() { return best_optimization_info_; }
51 
52  void rhsAffineStep();
53  void computeResiduals();
54  void updateStatistics();
55  void saveIterateAsBest();
56  void restoreBestIterate();
57  void internalInitialization();
58  ExitCode initializeVariables();
59  void rhsCenteringPredictorStep();
60  void updateEquilH(int id, double value);
61  ExitCode convergenceCheck(const PrecisionConvergence& mode);
62  double lineSearch(const Eigen::Ref<const Eigen::VectorXd>& dsvec,
63  const Eigen::Ref<const Eigen::VectorXd>& dzvec,
64  double tau, double dtau, double kappa, double dkappa);
65 
66  friend class Model;
67  friend class BnBSolver;
68  friend class ConicProblem;
69  friend class NcvxBnBSolver;
70 
71  private:
72  Vector res_;
73  ExitCode exitcode_;
74  ExtendedVector rhs1_, rhs2_;
75  OptimizationVector opt_, best_opt_, dopt1_, dopt2_;
76  ConicVector lambda_, rho_, sigma_, lbar_, ds_affine_by_W_, W_times_dz_affine_, ds_combined_, dz_combined_;
77  double dk_combined_, dt_affine_, dk_affine_, inires_x_, inires_y_, inires_z_, dt_denom_,
78  residual_t_, residual_x_, residual_y_, residual_z_, cx_, by_, hz_, prev_pres_;
79 
80  Cone* cone_;
81  SolverStorage* storage_;
82  SolverSetting* setting_;
83  CvxInfoPrinter printer_;
84  LinSolver linear_solver_;
85  EqRoutine equilibration_routine_;
86  OptimizationInfo optimization_info_, best_optimization_info_;
87  };
88 }
Definition: Model.hpp:16
ECOS - Embedded Conic Solver.
ECOS - Embedded Conic Solver.
ECOS - Embedded Conic Solver.
ECOS - Embedded Conic Solver.
Class that provides storage space for the optimization matrices, vectors and variables.
Definition: Cone.hpp:380
Helper class to define an optimization vector, including primal and dual variables, and variables to render the optimization problem homogeneous.
Definition: Cone.hpp:322
Helper class to work with optimization variables, lay down in normal order.
Definition: Cone.hpp:190
Main class to construct a second-order cone optimization problem.
Definition: ConicProblem.hpp:26
Main class that implements an Interior Point Solver for Second-Order Cones.
Definition: IPSolver.hpp:31
Class that provides functionality for handling solution of linear systems in optimization problems...
Definition: LinSolver.hpp:26
Definition: CvxInfoPrinter.hpp:60
Class that provides access to all environment variables required by the solver.
Definition: SolverSetting.hpp:43
Definition: Cone.hpp:20
This class contains all information about the conic optimization problem, and provides functionality ...
Definition: Cone.hpp:87
Definition: NcvxBnBSolver.hpp:18
Helper class that contains information about the status of the optimization problem.
Definition: CvxInfoPrinter.hpp:35
Definition: BnBSolver.hpp:28
Helper class to work with variables, which are members of a proper convex cone.
Definition: Cone.hpp:232
Helper class to work with optimization variables, lay down in an extended order.
Definition: Cone.hpp:280
ECOS - Embedded Conic Solver.
Definition: EqRoutine.hpp:25