diff --git a/highs/CMakeLists.txt b/highs/CMakeLists.txt index 6b1b26f36f..cd2f343098 100644 --- a/highs/CMakeLists.txt +++ b/highs/CMakeLists.txt @@ -121,7 +121,7 @@ if(NOT FAST_BUILD) "${HIGHS_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/highs.pc" @ONLY) # Install the targets of the highs export group, the config file so that other - # cmake-projects can link easily against highs, and the pkg-config flie so that + # cmake-projects can link easily against highs, and the pkg-config file so that # other projects can easily build against highs install(EXPORT highs-targets FILE highs-targets.cmake DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/highs) diff --git a/highs/ipm/ipx/lp_solver.h b/highs/ipm/ipx/lp_solver.h index 438d903013..8470530713 100644 --- a/highs/ipm/ipx/lp_solver.h +++ b/highs/ipm/ipx/lp_solver.h @@ -47,9 +47,9 @@ class LpSolver { // @y: size num_constr array, must satisfy // y[i] >= 0 if constr_type[i] == '>' // y[i] <= 0 if constr_type[i] == '<' - // @zl: size num_var array, must satsify zl[j] >= 0 for all j and + // @zl: size num_var array, must satisfy zl[j] >= 0 for all j and // zl[j] == 0 if lb[j] == -INFINITY - // @zu: size num_var array, must satsify zu[j] >= 0 for all j and + // @zu: size num_var array, must satisfy zu[j] >= 0 for all j and // zu[j] == 0 if ub[j] == INFINITY // When a starting point was loading successfully (return value 0), then // the next call to Solve() will start the IPM from that point, except that @@ -138,7 +138,7 @@ class LpSolver { // Returns the current basis postsolved. // - If crossover terminated successfully, this is the basis returned by // GetBasicSolution(). - // - If crossover failed, this is the basis at which failure occured. + // - If crossover failed, this is the basis at which failure occurred. // - If crossover was not called, this is the basis from the IPM // preconditioner. // - If no basis is available, the method does nothing. diff --git a/highs/ipm/ipx/lu_update.h b/highs/ipm/ipx/lu_update.h index 299ec4d8c0..f36cc08d20 100644 --- a/highs/ipm/ipx/lu_update.h +++ b/highs/ipm/ipx/lu_update.h @@ -33,7 +33,7 @@ class LuUpdate { // 0 OK // 1 OK, but the factorization is numerically unstable; suggests tightening // the pivot tolerance (see below) and to refactorize. - // 2 OK, but singularities occured and were replaced by unit columns. + // 2 OK, but singularities occurred and were replaced by unit columns. // 3 = 1 and 2 Int Factorize(const Int* Bbegin, const Int* Bend, const Int* Bi, const double* Bx, bool strict_abs_pivottol); diff --git a/highs/ipm/ipx/maxvolume.h b/highs/ipm/ipx/maxvolume.h index e31d41387d..576fbd4069 100644 --- a/highs/ipm/ipx/maxvolume.h +++ b/highs/ipm/ipx/maxvolume.h @@ -21,7 +21,7 @@ class Maxvolume { // The remaining statistics are only set by RunSequential() and count the // final pass over the tableau matrix. They are meaningful only if no - // updates occured in the final pass; this is guaranteed if parameter + // updates occurred in the final pass; this is guaranteed if parameter // max_passes was larger than passes(). Int tblnnz() const; // nnz of tableau matrix diff --git a/highs/ipm/ipx/model.h b/highs/ipm/ipx/model.h index a06dec3ec0..5a511e35ff 100644 --- a/highs/ipm/ipx/model.h +++ b/highs/ipm/ipx/model.h @@ -60,7 +60,7 @@ class Model { const Int* Ap, const Int* Ai, const double* Ax, const double* rhs, const char* constr_type, const double offset, const double* obj, const double* lbuser, const double* ubuser); - // Performs Flippo's test for deciding dualization + // Performs Filippo's test for deciding dualization bool filippoDualizationTest() const; // Writes statistics of input data and preprocessing to @info. void GetInfo(Info* info) const; diff --git a/highs/lp_data/Highs.cpp b/highs/lp_data/Highs.cpp index 859a897a87..bbbfe8984f 100644 --- a/highs/lp_data/Highs.cpp +++ b/highs/lp_data/Highs.cpp @@ -974,7 +974,7 @@ HighsStatus Highs::run() { // and user_bound_scale assessExcessiveObjectiveBoundScaling(this->options_.log_options, this->model_, user_scale_data); - // Used when deveoping unit tests in TestUserScale.cpp + // Used when developing unit tests in TestUserScale.cpp // this->writeModel(""); HighsStatus status; if (!this->multi_linear_objective_.size()) { @@ -1027,7 +1027,7 @@ HighsStatus Highs::run() { highsLogUser( this->options_.log_options, HighsLogType::kWarning, "User scaled problem solved to optimality, but unscaled solution " - "does not satisfy feasibilty and optimality tolerances\n"); + "does not satisfy feasibility and optimality tolerances\n"); status = HighsStatus::kWarning; } } @@ -1419,7 +1419,7 @@ HighsStatus Highs::optimizeModel() { } } else { // One of unconstrained_lp, has_basis and without_presolve must - // be true, and the first two anren't + // be true, and the first two aren't assert(without_presolve); lp_solve_ss << "Solving LP without presolve or useful basis"; } diff --git a/highs/lp_data/HighsInterface.cpp b/highs/lp_data/HighsInterface.cpp index fa21bc74c1..5e03100f0f 100644 --- a/highs/lp_data/HighsInterface.cpp +++ b/highs/lp_data/HighsInterface.cpp @@ -2918,7 +2918,7 @@ HighsStatus Highs::lpKktCheck(const HighsLp& lp, const std::string& message) { info.dual_solution_status = kSolutionStatusFeasible; } // Overrule feasibility if large relative tolerance failures have - // ocurred - pretty inconceivable since absolute residuals should + // occurred - pretty inconceivable since absolute residuals should // be small with a basis if (max_primal_tolerance_relative_violation > max_allowed_tolerance_relative_violation) diff --git a/highs/lp_data/HighsSolution.cpp b/highs/lp_data/HighsSolution.cpp index f2019a31a0..1b715bab1a 100644 --- a/highs/lp_data/HighsSolution.cpp +++ b/highs/lp_data/HighsSolution.cpp @@ -305,14 +305,14 @@ void getKktFailures(const HighsOptions& options, const bool is_qp, max_primal_infeasibility = primal_infeasibility; sum_primal_infeasibility += primal_infeasibility; // Determine the denominator for the relative primal - // infeasiblilty + // infeasibility double relative_bound_measure = highs_norm_bounds; if (at_status == kHighsSolutionNo) { // Primal value is infeasible, but not close to a bound: - // unusual, but possible if absolute primal infeasiblities + // unusual, but possible if absolute primal infeasibilities // are not small. Bound has not been included in // highs_norm_bounds, but should be used for local - // relative infeasiblility + // relative infeasibility if (mid_status == kHighsSolutionNo || mid_status == kHighsSolutionLo) { // Bound interval is short, or variable is below the @@ -345,14 +345,14 @@ void getKktFailures(const HighsOptions& options, const bool is_qp, sum_dual_infeasibility += dual_infeasibility; // Determine the denominator for the relative dual - // infeasiblilty + // infeasibility double relative_cost_measure = highs_norm_costs; if (is_col && cost && dual * dual >= dual_feasibility_tolerance) { // Dual value is infeasible, but not close to zero: - // unusual, but possible if absolute dual infeasiblities + // unusual, but possible if absolute dual infeasibilities // are not small. Hence the cost has not been included in // highs_norm_costs, but should be used for local relative - // infeasiblility. + // infeasibility. // // updateRelativeMeasure(cost, relative_cost_measure); relative_cost_measure = @@ -589,12 +589,12 @@ void getVariableKktFailures(const double primal_feasibility_tolerance, const double middle = (lower + upper) * 0.5; if (value < middle) { // Below the mid-point, so use lower bound optimality condition: - // feasiblity is dual >= -tolerance + // feasibility is dual >= -tolerance mid_status = kHighsSolutionLo; dual_infeasibility = std::max(-dual, 0.); } else { // Below the mid-point, so use upper bound optimality condition: - // feasiblity is dual <= tolerance + // feasibility is dual <= tolerance mid_status = kHighsSolutionUp; dual_infeasibility = std::max(dual, 0.); } @@ -654,7 +654,7 @@ void getPrimalDualGlpsolErrors(const HighsOptions& options, const HighsLp& lp, HighsInt& max_dual_infeasibility_index = primal_dual_errors.glpsol_max_dual_infeasibility.absolute_index; // clang-format on - // Relative dual infeasiblities are same as absolute + // Relative dual infeasibilities are same as absolute primal_dual_errors.glpsol_max_primal_infeasibility.invalidate(); primal_dual_errors.glpsol_max_dual_infeasibility.invalidate(); @@ -817,7 +817,7 @@ void getPrimalDualGlpsolErrors(const HighsOptions& options, const HighsLp& lp, } } - // Relative dual infeasiblities are same as absolute + // Relative dual infeasibilities are same as absolute primal_dual_errors.glpsol_max_dual_infeasibility.relative_value = primal_dual_errors.glpsol_max_dual_infeasibility.absolute_value; diff --git a/highs/mip/HighsLpRelaxation.cpp b/highs/mip/HighsLpRelaxation.cpp index d95f409b9b..932640940b 100644 --- a/highs/mip/HighsLpRelaxation.cpp +++ b/highs/mip/HighsLpRelaxation.cpp @@ -173,7 +173,7 @@ HighsLpRelaxation::HighsLpRelaxation(const HighsMipSolver& mipsolver) : mipsolver(mipsolver) { lpsolver.setOptionValue("output_flag", false); lpsolver.setOptionValue("random_seed", mipsolver.options_mip_->random_seed); - // Set primal feasiblity tolerance for LP solves according to + // Set primal feasibility tolerance for LP solves according to // mip_feasibility_tolerance, and smaller tolerance for dual // feasibility double mip_primal_feasibility_tolerance = diff --git a/highs/mip/HighsMipSolverData.cpp b/highs/mip/HighsMipSolverData.cpp index 35a676907c..5f17756859 100644 --- a/highs/mip/HighsMipSolverData.cpp +++ b/highs/mip/HighsMipSolverData.cpp @@ -1147,7 +1147,7 @@ double HighsMipSolverData::transformNewIntegerFeasibleSolution( // tmpSolver.setOptionValue("simplex_scale_strategy", 0); // tmpSolver.setOptionValue("presolve", kHighsOffString); tmpSolver.setOptionValue("time_limit", time_available); - // Set primal feasiblity tolerance for LP solves according to + // Set primal feasibility tolerance for LP solves according to // mip_feasibility_tolerance. Interestingly, dual feasibility // tolerance not set to smaller tolerance as in // HighsLpRelaxationconstructor. diff --git a/highs/mip/feasibilityjump.hh b/highs/mip/feasibilityjump.hh index a431590575..a0fecae58d 100644 --- a/highs/mip/feasibilityjump.hh +++ b/highs/mip/feasibilityjump.hh @@ -82,7 +82,7 @@ struct Constraint { } }; -// A potential new value for a varaiable, including its score. +// A potential new value for a variable, including its score. struct Move { double value; double score; diff --git a/highs/presolve/HighsSymmetry.cpp b/highs/presolve/HighsSymmetry.cpp index 1c8d00bd37..dc625ca7c0 100644 --- a/highs/presolve/HighsSymmetry.cpp +++ b/highs/presolve/HighsSymmetry.cpp @@ -474,7 +474,7 @@ HighsInt HighsOrbitopeMatrix::orbitalFixingForPackingOrbitope( // as long as the entry is fixed to zero // the frontier stays at the same column - // if we ecounter an entry that is not fixed to zero + // if we encounter an entry that is not fixed to zero // we need to proceed with the next column and found a frontier step if (notZeroFixed) { // found a frontier step. Now we first check for the current column diff --git a/highs/qpsolver/matrix.hpp b/highs/qpsolver/matrix.hpp index 88226b8ec5..4c5b522d7a 100644 --- a/highs/qpsolver/matrix.hpp +++ b/highs/qpsolver/matrix.hpp @@ -105,7 +105,7 @@ struct MatrixBase { return vec_mat(other, result); } - // computes this * mat, where "this" is a tranposed matrix + // computes this * mat, where "this" is a transposed matrix MatrixBase tran_mat_(const MatrixBase& other) { MatrixBase res; res.num_row = num_col; diff --git a/highs/simplex/HEkkDual.cpp b/highs/simplex/HEkkDual.cpp index cb31fdadfc..acee6687f8 100644 --- a/highs/simplex/HEkkDual.cpp +++ b/highs/simplex/HEkkDual.cpp @@ -2281,7 +2281,7 @@ void HEkkDual::initialiseDevexFramework() { // summing the squares of the its entries over the indices in the // reference set. This is achieved by summing over all indices, but // multiplying the entry by the value in devex_index before - // equaring. Thus devex_index contains 1 for indices in the + // equating. Thus devex_index contains 1 for indices in the // reference set, and 0 otherwise. This is achieved by setting the // values of devex_index to be 1-nonbasicFlag^2, ASSUMING // |nonbasicFlag|=1 iff the corresponding variable is nonbasic