Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix wrong declaration of highsCompilationDate(), some compiler warnings, and a comment header #1798

Merged
merged 5 commits into from
Jun 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/Highs.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ HighsInt highsVersionMajor();
HighsInt highsVersionMinor();
HighsInt highsVersionPatch();
const char* highsGithash();
const char* highsCompilationDate();

/**
* @brief Class to set parameters and run HiGHS
Expand Down Expand Up @@ -1216,7 +1217,6 @@ class Highs {
* @brief Return compilation date
*/
std::string compilationDate() const { return "deprecated"; }
const char* highsCompilationDate();

HighsStatus setLogCallback(void (*user_log_callback)(HighsLogType,
const char*, void*),
Expand Down
12 changes: 6 additions & 6 deletions src/lp_data/Highs.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2320,12 +2320,12 @@ HighsStatus Highs::changeColsIntegrality(const HighsInt from_col,
return returnFromHighs(return_status);
}

HighsStatus analyseSetCreateError(HighsLogOptions log_options,
const std::string method,
const HighsInt create_error,
const bool ordered,
const HighsInt num_set_entries,
const HighsInt dimension) {
static HighsStatus analyseSetCreateError(HighsLogOptions log_options,
const std::string method,
const HighsInt create_error,
const bool ordered,
const HighsInt num_set_entries,
const HighsInt dimension) {
if (create_error == kIndexCollectionCreateIllegalSetSize) {
highsLogUser(log_options, HighsLogType::kError,
"Set supplied to Highs::%s has illegal size of %d\n",
Expand Down
1 change: 1 addition & 0 deletions src/lp_data/HighsCallbackStruct.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/* */
/* This file is part of the HiGHS linear optimization suite */
/* */
Expand Down
2 changes: 1 addition & 1 deletion src/qpsolver/a_quass.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
#include "qpsolver/feasibility_highs.hpp"
#include "qpsolver/feasibility_bounded.hpp"

QpAsmStatus quass2highs(Instance& instance,
static QpAsmStatus quass2highs(Instance& instance,
Settings& settings,
Statistics& stats,
QpModelStatus& qp_model_status,
Expand Down
4 changes: 2 additions & 2 deletions src/qpsolver/feasibility_bounded.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ static void computeStartingPointBounded(Instance& instance,
L.resize(instance.num_var * instance.num_var);

// compute cholesky factorization of Q
for (size_t col = 0; col < instance.num_var; col++) {
for (size_t idx = instance.Q.mat.start[col]; idx < instance.Q.mat.start[col+1]; idx++) {
for (size_t col = 0; col < (size_t)instance.num_var; col++) {
for (size_t idx = instance.Q.mat.start[col]; idx < (size_t)instance.Q.mat.start[col+1]; idx++) {
double sum = 0;
size_t row = instance.Q.mat.index[idx];
if (row == col) {
Expand Down
4 changes: 2 additions & 2 deletions src/qpsolver/quass.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -266,12 +266,12 @@ static double compute_dual_violation(Instance& instance, QpVector& primal, QpVec
}
#endif

bool check_reinvert_due(Basis& basis) {
static bool check_reinvert_due(Basis& basis) {
// reinvert can be triggered by basis
return basis.getreinversionhint();
}

void reinvert(Basis& basis, CholeskyFactor& factor, Gradient& grad, ReducedCosts& rc, ReducedGradient& rg, std::unique_ptr<Pricing>& pricing) {
static void reinvert(Basis& basis, CholeskyFactor& factor, Gradient& grad, ReducedCosts& rc, ReducedGradient& rg, std::unique_ptr<Pricing>& pricing) {
basis.rebuild();
factor.recompute();
grad.recompute();
Expand Down
4 changes: 2 additions & 2 deletions src/qpsolver/runtime.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,13 @@ struct Runtime {

Runtime(Instance& inst, Statistics& stats)
: instance(inst),
statistics(stats),
primal(QpVector(instance.num_var)),
rowactivity(QpVector(instance.num_con)),
dualvar(instance.num_var),
dualcon(instance.num_con),
status_var(instance.num_var),
status_con(instance.num_con),
statistics(stats) {}
status_con(instance.num_con) {}
};

#endif
Loading