Google OR-Tools v9.11
a fast and portable software suite for combinatorial optimization
Loading...
Searching...
No Matches
infeasible_subsystem_tests.cc File Reference
#include "ortools/math_opt/solver_tests/infeasible_subsystem_tests.h"
#include <limits>
#include <ostream>
#include <string>
#include <utility>
#include <vector>
#include "absl/status/status.h"
#include "absl/status/statusor.h"
#include "absl/strings/str_join.h"
#include "absl/time/time.h"
#include "gtest/gtest.h"
#include "ortools/base/gmock.h"
#include "ortools/gurobi/gurobi_stdout_matchers.h"
#include "ortools/math_opt/cpp/matchers.h"
#include "ortools/math_opt/cpp/math_opt.h"
#include "ortools/math_opt/infeasible_subsystem.pb.h"
#include "ortools/port/scoped_std_stream_capture.h"

Go to the source code of this file.

Classes

struct  operations_research::math_opt::NontrivialInfeasibleIp
 

Namespaces

namespace  operations_research
 In SWIG mode, we don't want anything besides these top-level includes.
 
namespace  operations_research::math_opt
 An object oriented wrapper for quadratic constraints in ModelStorage.
 

Functions

std::ostream & operations_research::math_opt::operator<< (std::ostream &ostr, const InfeasibleSubsystemSupport &support_menu)
 
std::ostream & operations_research::math_opt::operator<< (std::ostream &ostr, const InfeasibleSubsystemTestParameters &params)
 
 operations_research::math_opt::TEST_P (InfeasibleSubsystemTest, CanComputeInfeasibleSubsystem)
 
 operations_research::math_opt::TEST_P (InfeasibleSubsystemTest, InvertedVariableBounds)
 
 operations_research::math_opt::TEST_P (InfeasibleSubsystemTest, IntegerVariableWithInfeasibleBounds)
 
 operations_research::math_opt::TEST_P (InfeasibleSubsystemTest, InconsistentLessThanLinearConstraint)
 
 operations_research::math_opt::TEST_P (InfeasibleSubsystemTest, InconsistentGreaterThanLinearConstraint)
 
 operations_research::math_opt::TEST_P (InfeasibleSubsystemTest, InconsistentEqualityLinearConstraint)
 
 operations_research::math_opt::TEST_P (InfeasibleSubsystemTest, InconsistentRangedLinearConstraint)
 
∞ ≤ x operations_research::math_opt::≤ (variable bounds) TEST_P(InfeasibleSubsystemTest
 The entire model is an IIS.
 
 operations_research::math_opt::EXPECT_THAT (ComputeInfeasibleSubsystem(model, GetParam().solver_type), IsOkAndHolds(IsInfeasible(true, ModelSubset{ .variable_bounds={{x, ModelSubset::Bounds{.lower=false,.upper=true}}},.linear_constraints={ {c, ModelSubset::Bounds{.lower=true,.upper=false}}}})))
 
 operations_research::math_opt::TEST_P (InfeasibleSubsystemTest, InconsistentLessThanQuadraticConstraint)
 
 operations_research::math_opt::TEST_P (InfeasibleSubsystemTest, InconsistentGreaterThanQuadraticConstraint)
 
 operations_research::math_opt::TEST_P (InfeasibleSubsystemTest, InconsistentEqualityQuadraticConstraint)
 
 operations_research::math_opt::EXPECT_THAT (ComputeInfeasibleSubsystem(model, GetParam().solver_type), IsOkAndHolds(IsInfeasible(true, ModelSubset{ .variable_bounds={{x, ModelSubset::Bounds{.lower=true,.upper=true}}},.quadratic_constraints={ {c, ModelSubset::Bounds{.lower=true,.upper=false}}}})))
 
 operations_research::math_opt::EXPECT_THAT (ComputeInfeasibleSubsystem(model, GetParam().solver_type), IsOkAndHolds(IsInfeasible(true, ModelSubset{ .variable_bounds={{x, ModelSubset::Bounds{.lower=true,.upper=false}}},.second_order_cone_constraints={c}})))
 
 operations_research::math_opt::EXPECT_THAT (ComputeInfeasibleSubsystem(model, GetParam().solver_type), IsOkAndHolds(IsInfeasible(true, ModelSubset{ .variable_bounds={{x, ModelSubset::Bounds{.lower=false,.upper=true}}},.second_order_cone_constraints={c}})))
 
y y operations_research::math_opt::TEST_P (InfeasibleSubsystemTest, InconsistentSos1Constraint)
 
 operations_research::math_opt::TEST_P (InfeasibleSubsystemTest, InconsistentSos1ConstraintWithExpressions)
 
z z y operations_research::math_opt::TEST_P (InfeasibleSubsystemTest, InconsistentSos2Constraint)
 
 operations_research::math_opt::TEST_P (InfeasibleSubsystemTest, InconsistentSos2ConstraintWithExpressions)
 
 operations_research::math_opt::EXPECT_THAT (ComputeInfeasibleSubsystem(model, GetParam().solver_type), IsOkAndHolds(IsInfeasible(true, ModelSubset{ .variable_bounds={{x, ModelSubset::Bounds{.lower=true,.upper=false}}},.variable_integrality={x},.indicator_constraints={c}})))
 
 operations_research::math_opt::TEST_P (InfeasibleSubsystemTest, IndicatorConstraintOkInconsistentImpliedNullIndicator)
 
 operations_research::math_opt::TEST_P (InfeasibleSubsystemTest, NontrivialInfeasibleIpSolveWithoutLimitsFindsIIS)
 
 operations_research::math_opt::TEST_P (InfeasibleSubsystemTest, NontrivialInfeasibleIpSolveTimeLimitZeroIsUndetermined)
 
 operations_research::math_opt::TEST_P (InfeasibleSubsystemTest, NontrivialInfeasibleIpSolveInterruptedBeforeStartIsUndetermined)
 
 operations_research::math_opt::TEST_P (InfeasibleSubsystemTest, NontrivialInfeasibleIpSolveWithMessageCallbackIsInvoked)
 

Variables

x operations_research::math_opt::InconsistentVariableBoundsAndLinearConstraint
 
const Variable operations_research::math_opt::x = model.AddContinuousVariable(-kInf, 0.0)
 
const LinearConstraint operations_research::math_opt::c = model.AddLinearConstraint(x >= 1.0)
 
x operations_research::math_opt::InconsistentVariableBoundsAndQuadraticConstraint
 
x operations_research::math_opt::InconsistentSecondOrderConeConstraint
 
x operations_research::math_opt::InconsistentSecondOrderConeConstraintWithExpressionUnderNorm
 
x operations_research::math_opt::InconsistentSecondOrderConeConstraintWithExpressionInUpperBound
 
x operations_research::math_opt::InconsistentIndicatorConstraint