Skip to content

Commit

Permalink
Sol check: by default, objectives only idealistic #200
Browse files Browse the repository at this point in the history
chk:mode=523
  • Loading branch information
glebbelov committed Jan 10, 2024
1 parent 8b2c27c commit 49403ff
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions include/mp/flat/converter.h
Original file line number Diff line number Diff line change
Expand Up @@ -930,7 +930,7 @@ class FlatConverter :

int relax_ = 0;

int solcheckmode_ = 1+2+16+512;
int solcheckmode_ = 1+2+8+512;
bool solcheckinfeas_ = false;
bool solcheckfail_ = false;
double solfeastol_ = 1e-6;
Expand Down Expand Up @@ -1052,7 +1052,7 @@ class FlatConverter :
" applied by the solver when computing "
" expression values.\n"
"\n"
"Default: 1+2+16+512.",
"Default: 1+2+8+512.",
options_.solcheckmode_, 0, 1024);
GetEnv().AddOption("sol:chk:feastol sol:chk:eps chk:eps chk:feastol",
"Absolute tolerance to check objective values, variable "
Expand Down
4 changes: 2 additions & 2 deletions include/mp/flat/sol_check.h
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ class SolutionChecker {
SolCheck& chk, bool f_idealistic) {
fmt::MemoryWriter wrt;
if (chk.HasAnyViols()) {
wrt.write("Type MaxAbs [Name] MaxRel [Name]\n");
wrt.write("Type MaxAbs [Name] MaxRel [Name]\n");
}
if (chk.HasAnyConViols()) {
Gen1Viol(chk.VarViolBnds().at(0), wrt, true,
Expand Down Expand Up @@ -227,7 +227,7 @@ class SolutionChecker {
bool f_max, const std::string& type) {
if (vs.N_) {
// wrt.write(" {:16} {:<7}", type, vs.N_);
wrt.write(" {:17}", type);
wrt.write(" {:27}", type);
auto vmaxabs = Gen1ViolMax( // true: 1 for logical
f_max, vs.epsAbsMax_, vs.nameAbs_);
auto vmaxrel = Gen1ViolMax(
Expand Down

0 comments on commit 49403ff

Please sign in to comment.