1515#include " pdlp/hipdlp/pdhg.hpp"
1616#include " pdlp/hipdlp/restart.hpp"
1717
18- void getHiPpdlpParamsFromOptions (const HighsOptions& options, HighsTimer& timer,
19- PrimalDualParams& params);
20-
2118HighsStatus solveLpHiPdlp (HighsLpSolverObject& solver_object) {
2219 return solveLpHiPdlp (solver_object.options_ , solver_object.timer_ ,
2320 solver_object.lp_ , solver_object.basis_ ,
@@ -33,23 +30,11 @@ HighsStatus solveLpHiPdlp(const HighsOptions& options, HighsTimer& timer,
3330 // Indicate that no imprecise solution has (yet) been found
3431 resetModelStatusAndHighsInfo (model_status, highs_info);
3532
36- std::string log_filename = " " ;
37- LogLevel log_level;
38- if (options.log_dev_level == kHighsLogDevLevelInfo ) {
39- log_level = LogLevel::kInfo ;
40- } else if (options.log_dev_level == kHighsLogDevLevelDetailed ) {
41- log_level = LogLevel::kVerbose ;
42- } else if (options.log_dev_level == kHighsLogDevLevelVerbose ) {
43- log_level = LogLevel::kDebug ;
44- } else {
45- log_level = LogLevel::kNone ;
46- }
47- // --- Initialize Logger ---
48- Logger logger (log_level);
49- if (!log_filename.empty ()) logger.set_log_file (log_filename);
33+ Logger logger;
34+ logger.setLevel (options.log_dev_level );
35+ logger.passHighsLogOptions (options.log_options );
5036 logger.print_header ();
5137
52- Timer total_timer;
5338 /* ** Order of operations
5439 * Preprocess with HiPdlp
5540 * Scale with HiPdlp
@@ -62,7 +47,6 @@ HighsStatus solveLpHiPdlp(const HighsOptions& options, HighsTimer& timer,
6247 pdlp.setParams (options, timer);
6348 HighsLp preprocessed_lp;
6449 pdlp.passLp (&lp);
65- // logger_.info("Preprocessing LP to handle ranged constraints...");
6650 pdlp.preprocessLp ();
6751
6852 // 3. Scale with HiPdlp
@@ -81,16 +65,15 @@ HighsStatus solveLpHiPdlp(const HighsOptions& options, HighsTimer& timer,
8165 // return x, y
8266
8367 // --- Print Summary ---
84- logger.print_summary (pdlp.getResults (), pdlp.getIterationCount (),
85- total_timer.read ());
68+ pdlp.logSummary ();
8669
8770 highs_info.pdlp_iteration_count = pdlp.getIterationCount ();
8871
8972 model_status = HighsModelStatus::kUnknown ;
9073 highs_solution.clear ();
9174 highs_basis.valid = false ;
9275
93- const TerminationStatus termination_status = pdlp.getResults (). term_code ;
76+ const TerminationStatus termination_status = pdlp.getTerminationCode () ;
9477 switch (termination_status) {
9578 case TerminationStatus::OPTIMAL: {
9679 model_status = HighsModelStatus::kOptimal ;
@@ -142,35 +125,3 @@ HighsStatus solveLpHiPdlp(const HighsOptions& options, HighsTimer& timer,
142125 return HighsStatus::kOk ;
143126}
144127
145- void PrimalDualParams::initialise () {
146- this ->eta = 0 ;
147- this ->omega = 0 ;
148- this ->tolerance = 0 ;
149- this ->max_iterations = 0 ;
150- this ->device_type = Device::CPU;
151- this ->time_limit = 3600.0 ;
152- this ->restart_strategy = RestartStrategy::NO_RESTART;
153- this ->fixed_restart_interval = 0 ;
154- this ->use_halpern_restart = false ;
155- this ->scaling_method = ScalingMethod::NONE;
156- this ->use_ruiz_scaling = false ;
157- this ->use_pc_scaling = false ;
158- this ->use_l2_scaling = false ;
159- this ->ruiz_iterations = 10 ;
160- this ->ruiz_norm = INFINITY;
161- this ->pc_alpha = 1.0 ;
162- this ->step_size_strategy = StepSizeStrategy::FIXED;
163- this ->malitsky_pock_params .initialise ();
164- this ->adaptive_linesearch_params .initialise ();
165- }
166-
167- void MalitskyPockParams::initialise () {
168- this ->step_size_interpolation = 0.5 ; // Between 0 and 1
169- this ->step_size_downscaling_factor = 0.7 ;
170- this ->linesearch_contraction_factor = 0.99 ;
171- }
172-
173- void AdaptiveLinesearchParams::initialise () {
174- this ->step_size_reduction_exponent = 0.3 ;
175- this ->step_size_growth_exponent = 0.6 ;
176- }
0 commit comments