|
Aleph-w 7.10.0
A C++ Library for Data Structures and Algorithms
|
Simplex and RevisedSimplex against an exact oracle. More...
#include <gtest/gtest.h>#include <Simplex.H>#include <algorithm>#include <cmath>#include <cstdint>#include <filesystem>#include <limits>#include <memory>#include <random>#include <sstream>#include <stdexcept>#include <string>#include <vector>Go to the source code of this file.
Functions | |
| TEST (SimplexOracle, KnowsTheTextbookPrograms) | |
| TEST (SimplexOracle, RationalApproximation) | |
| TEST (SimplexExhaustive, EveryProgramOfTheSmallDomain) | |
| TEST (SimplexExhaustive, RandomProgramsWithTheirSensitivity) | |
| TEST (SimplexExhaustive, LargerRandomPrograms) | |
| TEST (SimplexExhaustive, ScaledProgramsGiveScaledResults) | |
| TEST (SimplexExhaustive, LatexSolveGivesWhatSolveGives) | |
| TEST (RevisedSimplexExhaustive, RandomProgramsOfLessOrEqualConstraints) | |
| TEST (RevisedSimplexExhaustive, ScaledPrograms) | |
| TEST (RevisedSimplexExhaustive, AgreesWithSimplex) | |
Simplex and RevisedSimplex against an exact oracle.
The oracle enumerates the vertices of a linear program with integer data, in exact integer arithmetic: Cramer's rule, with determinants by Bareiss' elimination. A box x <= U, with U above every coordinate of a vertex of the program, makes the feasible set bounded; the program is infeasible if no vertex is feasible, and unbounded if the optimum with the box 2U differs from the one with U.
Against it, every program of a small domain and thousands of random ones check the state, the optimal value, the solution, the shadow prices as an optimal dual solution, the reduced costs, the ranges of the sensitivity analysis at their bounds and just beyond them, the re-optimization of update_rhs_and_reoptimize(), Bland's rule, the type float, latex_solve() and RevisedSimplex.
Definition in file simplex_exhaustive_test.cc.
| TEST | ( | RevisedSimplexExhaustive | , |
| AgreesWithSimplex | |||
| ) |
Definition at line 1221 of file simplex_exhaustive_test.cc.
References Aleph::and, k, Aleph::Simplex< T >::load_solution(), Aleph::RevisedSimplex< T >::objective_value(), Aleph::Simplex< T >::objetive_value(), rng, row, Aleph::RevisedSimplex< T >::set_constraint_row(), Aleph::RevisedSimplex< T >::set_objective(), Aleph::Simplex< T >::solve(), and Aleph::RevisedSimplex< T >::solve().
| TEST | ( | RevisedSimplexExhaustive | , |
| RandomProgramsOfLessOrEqualConstraints | |||
| ) |
Definition at line 1153 of file simplex_exhaustive_test.cc.
References Aleph::and, k, and rng.
| TEST | ( | RevisedSimplexExhaustive | , |
| ScaledPrograms | |||
| ) |
Definition at line 1178 of file simplex_exhaustive_test.cc.
References Aleph::and, col, k, Aleph::RevisedSimplex< T >::objective_value(), r, rng, row, Aleph::RevisedSimplex< T >::set_constraint_row(), Aleph::RevisedSimplex< T >::set_objective(), Aleph::RevisedSimplex< T >::solve(), and Aleph::RevisedSimplex< T >::verify_solution().
| TEST | ( | SimplexExhaustive | , |
| EveryProgramOfTheSmallDomain | |||
| ) |
Definition at line 901 of file simplex_exhaustive_test.cc.
References Aleph::code(), and rows.
| TEST | ( | SimplexExhaustive | , |
| LargerRandomPrograms | |||
| ) |
Definition at line 1002 of file simplex_exhaustive_test.cc.
References Aleph::and, k, and rng.
| TEST | ( | SimplexExhaustive | , |
| LatexSolveGivesWhatSolveGives | |||
| ) |
Definition at line 1114 of file simplex_exhaustive_test.cc.
References Aleph::and, k, and rng.
| TEST | ( | SimplexExhaustive | , |
| RandomProgramsWithTheirSensitivity | |||
| ) |
Definition at line 977 of file simplex_exhaustive_test.cc.
References Aleph::and, k, and rng.
| TEST | ( | SimplexExhaustive | , |
| ScaledProgramsGiveScaledResults | |||
| ) |
Definition at line 1027 of file simplex_exhaustive_test.cc.
References Aleph::all(), Aleph::and, col, k, Aleph::Simplex< T >::load_solution(), Aleph::Simplex< T >::objetive_value(), Aleph::Simplex< T >::prepare_linear_program(), Aleph::Simplex< T >::put_objetive_function_coef(), Aleph::Simplex< T >::put_restriction(), rng, row, Aleph::Simplex< T >::shadow_price(), Aleph::size(), Aleph::Simplex< T >::solve(), Aleph::Simplex< T >::verify_solution(), and y.
| TEST | ( | SimplexOracle | , |
| KnowsTheTextbookPrograms | |||
| ) |
Definition at line 848 of file simplex_exhaustive_test.cc.
| TEST | ( | SimplexOracle | , |
| RationalApproximation | |||
| ) |
Definition at line 880 of file simplex_exhaustive_test.cc.