SoPlex Documentation
Loading...
Searching...
No Matches
spxdefines.cpp
Go to the documentation of this file.
1/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
2/* */
3/* This file is part of the class library */
4/* SoPlex --- the Sequential object-oriented simPlex. */
5/* */
6/* Copyright (c) 1996-2024 Zuse Institute Berlin (ZIB) */
7/* */
8/* Licensed under the Apache License, Version 2.0 (the "License"); */
9/* you may not use this file except in compliance with the License. */
10/* You may obtain a copy of the License at */
11/* */
12/* http://www.apache.org/licenses/LICENSE-2.0 */
13/* */
14/* Unless required by applicable law or agreed to in writing, software */
15/* distributed under the License is distributed on an "AS IS" BASIS, */
16/* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. */
17/* See the License for the specific language governing permissions and */
18/* limitations under the License. */
19/* */
20/* You should have received a copy of the Apache-2.0 license */
21/* along with SoPlex; see the file LICENSE. If not email to soplex@zib.de. */
22/* */
23/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
24
25/**@file spxdefines.cpp
26 * @brief Debugging, floating point type and parameter definitions.
27 */
28#include "assert.h"
29#include "soplex/spxdefines.h"
30#include "soplex/spxout.h"
31#include "soplex/rational.h"
32
33namespace soplex
34{
35// Overloaded EQ function
36bool EQ(int a, int b)
37{
38 return (a == b);
39}
40
42
43bool msginconsistent(const char* name, const char* file, int line)
44{
45 assert(name != nullptr);
46 assert(file != nullptr);
47 assert(line >= 0);
48
49 SPX_MSG_ERROR(std::cerr << file << "(" << line << ") "
50 << "Inconsistency detected in " << name << std::endl;)
51
52 return 0;
53}
54
55
57{
58 return (s_epsilon);
59}
60
66
67
72
77
78
83
88
93
98
100{
101 return s_feastol;
102}
103
105{
106 s_feastol = ftol;
107}
108
110{
111 return s_opttol;
112}
113
115{
116 s_opttol = otol;
117}
118
123
128
133
138// namespace soplex
139}
Real s_epsilon_factorization
epsilon for factorization
Definition spxdefines.h:314
Real feastol()
global feasibility tolerance
Real floatingPointFeastol()
floating point feasibility tolerance used within the solver
void setFloatingPointFeastol(Real ftol)
set floating point feasibility tolerance used within the solver
Real s_floating_point_opttol
floating point optimality tolerance
Definition spxdefines.h:326
Real s_floating_point_feastol
floating point feasibility tolerance
Definition spxdefines.h:324
Real epsilon()
global zero epsilon
Real s_epsilon_update
epsilon for factorization update
Definition spxdefines.h:316
Real s_epsilon_pivot
epsilon for pivot zero tolerance in factorization
Definition spxdefines.h:318
Real epsilonFactorization()
zero espilon used in factorization
Real s_feastol
feasibility tolerance
Definition spxdefines.h:320
void setFeastol(Real ftol)
set global feasibility tolerance
void setEpsilonUpdate(Real eps)
set zero espilon used in factorization update
Real epsilonPivot()
zero espilon used in pivot
void setOpttol(Real otol)
set global optimality tolerance
void setEpsilonFactorization(Real eps)
set zero espilon used in factorization
Real floatingPointOpttol()
floating point optimality tolerance used within the solver
void setFloatingPointOpttol(Real otol)
set floating point optimality tolerance used within the solver
void setEpsilon(Real eps)
set global zero epsilon
Real s_epsilon
default allowed additive zero: 1.0 + EPS_ZERO == 1.0
Definition spxdefines.h:312
void setEpsilonPivot(Real eps)
set zero espilon used in pivot
Real s_epsilon_multiplier
multiplier for fixed numbers that should change if s_epsilon changes
Definition spxdefines.h:328
Real epsilonUpdate()
zero espilon used in factorization update
Real s_opttol
optimality tolerance
Definition spxdefines.h:322
Real opttol()
global optimality tolerance
Everything should be within this namespace.
bool msginconsistent(const char *name, const char *file, int line)
double Real
Definition spxdefines.h:269
bool EQ(int a, int b)
SOPLEX_THREADLOCAL const Real infinity
Debugging, floating point type and parameter definitions.
#define SOPLEX_DEFAULT_EPS_ZERO
default allowed additive zero: 1.0 + EPS_ZERO == 1.0
Definition spxdefines.h:281
#define SPX_MSG_ERROR(x)
Prints out message x if the verbosity level is at least SPxOut::ERROR.
Definition spxdefines.h:163
#define SOPLEX_THREADLOCAL
SOPLEX_DEBUG.
Definition spxdefines.h:196
#define SOPLEX_DEFAULT_INFINITY
Definition spxdefines.h:292
Wrapper for different output streams and verbosity levels.