Skip to content

Commit

Permalink
Removed references to getHighsOptions
Browse files Browse the repository at this point in the history
  • Loading branch information
jajhall committed Apr 12, 2021
1 parent dedf1ea commit a0ae156
Show file tree
Hide file tree
Showing 4 changed files with 100 additions and 6 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ local.properties
[Rr]elease/
x64/
build/
build64/
buildDebug/
[Bb]in/
[Oo]bj/
Expand Down
93 changes: 93 additions & 0 deletions src/lp_data/HighsDeprecated.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/* */
/* This file is part of the HiGHS linear optimization suite */
/* */
/* Written and engineered 2008-2021 at the University of Edinburgh */
/* */
/* Available as open-source under the MIT License */
/* */
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/**@file lp_data/HighsDeprecated.cpp
* @brief
* @author Julian Hall, Ivet Galabova, Qi Huangfu and Michael Feldmeier
*/
#include "HConfig.h"
#include "Highs.h"

HighsStatus Highs::setHighsOptionValue(const std::string& option,
const bool value) {
return setOptionValue(option, value);
}

HighsStatus Highs::setHighsOptionValue(const std::string& option,
const HighsInt value) {
return setOptionValue(option, value);
}

HighsStatus Highs::setHighsOptionValue(const std::string& option,
const double value) {
return setOptionValue(option, value);
}

HighsStatus Highs::setHighsOptionValue(const std::string& option,
const std::string value) {
return setOptionValue(option, value);
}

HighsStatus Highs::setHighsOptionValue(const std::string& option,
const char* value) {
return setOptionValue(option, value);
}

HighsStatus Highs::readHighsOptions(const std::string filename) {
return readOptions(filename);
}

HighsStatus Highs::passHighsOptions(const HighsOptions& options) {
return passOptions(options);
}

HighsStatus Highs::getHighsOptionValue(const std::string& option, bool& value) {
return getOptionValue(option, value);
}

HighsStatus Highs::getHighsOptionValue(const std::string& option,
HighsInt& value) {
return getOptionValue(option, value);
}

HighsStatus Highs::getHighsOptionValue(const std::string& option,
double& value) {
return getOptionValue(option, value);
}

HighsStatus Highs::getHighsOptionValue(const std::string& option,
std::string& value) {
return getOptionValue(option, value);
}

HighsStatus Highs::getHighsOptionType(const std::string& option,
HighsOptionType& type) {
return getOptionType(option, type);
}

HighsStatus Highs::resetHighsOptions() {
return resetOptions();
}

HighsStatus Highs::writeHighsOptions(
const std::string filename, const bool report_only_non_default_values) {
return writeOptions(filename, report_only_non_default_values);
}

const HighsOptions& Highs::getHighsOptions() const { return getOptions(); }

HighsStatus Highs::setHighsLogfile(FILE* logfile) {
options_.output_flag = false;
return HighsStatus::OK;
}

HighsStatus Highs::setHighsOutput(FILE* output) {
options_.output_flag = false;
return HighsStatus::OK;
}
10 changes: 5 additions & 5 deletions src/mip/HighsLpRelaxation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ HighsLpRelaxation::HighsLpRelaxation(const HighsLpRelaxation& other)
basischeckpoint(other.basischeckpoint),
currentbasisstored(other.currentbasisstored) {
lpsolver.setHighsOptionValue("output_flag", false);
lpsolver.passHighsOptions(other.lpsolver.getHighsOptions());
lpsolver.passHighsOptions(other.lpsolver.getOptions());
lpsolver.passModel(other.lpsolver.getLp());
lpsolver.setBasis(other.lpsolver.getBasis());
mask.resize(mipsolver.numCol());
Expand Down Expand Up @@ -563,7 +563,7 @@ void HighsLpRelaxation::storeDualUBProof() {
assert(scale == 1.0);

HighsCDouble upper =
lpsolver.getHighsOptions().dual_objective_value_upper_bound;
lpsolver.getOptions().dual_objective_value_upper_bound;
for (HighsInt i = 0; i != lp.numRow_; ++i) {
if (dualray[i] == 0.0) continue;

Expand Down Expand Up @@ -686,7 +686,7 @@ HighsLpRelaxation::Status HighsLpRelaxation::run(bool resolve_on_error) {
lpsolver.clearSolver();
#if 0
// first try to use the primal simplex solver starting from the last basis
if (lpsolver.getHighsOptions().simplex_strategy == SIMPLEX_STRATEGY_DUAL) {
if (lpsolver.getOptions().simplex_strategy == SIMPLEX_STRATEGY_DUAL) {
lpsolver.setHighsOptionValue("simplex_strategy", SIMPLEX_STRATEGY_PRIMAL);
recoverBasis();
auto retval = run(resolve_on_error);
Expand Down Expand Up @@ -728,7 +728,7 @@ HighsLpRelaxation::Status HighsLpRelaxation::run(bool resolve_on_error) {
hasdualproof = false;

HighsInt scalestrategy =
lpsolver.getHighsOptions().simplex_scale_strategy;
lpsolver.getOptions().simplex_scale_strategy;
if (scalestrategy != SIMPLEX_SCALE_STRATEGY_OFF) {
lpsolver.setHighsOptionValue("simplex_scale_strategy",
SIMPLEX_SCALE_STRATEGY_OFF);
Expand Down Expand Up @@ -774,7 +774,7 @@ HighsLpRelaxation::Status HighsLpRelaxation::run(bool resolve_on_error) {
// "dual:%g)\n",
// info.max_primal_infeasibility, info.max_dual_infeasibility);
HighsInt scalestrategy =
lpsolver.getHighsOptions().simplex_scale_strategy;
lpsolver.getOptions().simplex_scale_strategy;
if (scalestrategy != SIMPLEX_SCALE_STRATEGY_OFF) {
lpsolver.setHighsOptionValue("simplex_scale_strategy",
SIMPLEX_SCALE_STRATEGY_OFF);
Expand Down
2 changes: 1 addition & 1 deletion src/mip/HighsPrimalHeuristics.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ void HighsPrimalHeuristics::RENS(const std::vector<double>& tmp) {
bool stop = false;
// heurlp.setIterationLimit(2 * mipsolver.mipdata_->maxrootlpiters);
// printf("iterlimit: %" HIGHSINT_FORMAT "\n",
// heurlp.getLpSolver().getHighsOptions().simplex_iteration_limit);
// heurlp.getLpSolver().getOptions().simplex_iteration_limit);
HighsInt targetdepth = 1;
HighsInt nbacktracks = -1;
std::shared_ptr<const HighsBasis> basis;
Expand Down

0 comments on commit a0ae156

Please sign in to comment.