This commit is contained in:
Laurent Perron
2022-03-25 15:10:39 +01:00
parent f2ac2669d1
commit abf69d39fe
10 changed files with 29 additions and 1 deletions

View File

@@ -13,6 +13,8 @@
#include "ortools/glop/basis_representation.h"
#include <algorithm>
#include "ortools/base/stl_util.h"
#include "ortools/glop/status.h"
#include "ortools/lp_data/lp_utils.h"

View File

@@ -14,6 +14,8 @@
#ifndef OR_TOOLS_GLOP_BASIS_REPRESENTATION_H_
#define OR_TOOLS_GLOP_BASIS_REPRESENTATION_H_
#include <string>
#include "ortools/base/logging.h"
#include "ortools/glop/lu_factorization.h"
#include "ortools/glop/parameters.pb.h"

View File

@@ -14,6 +14,8 @@
#ifndef OR_TOOLS_GLOP_DUAL_EDGE_NORMS_H_
#define OR_TOOLS_GLOP_DUAL_EDGE_NORMS_H_
#include <string>
#include "ortools/glop/basis_representation.h"
#include "ortools/glop/parameters.pb.h"
#include "ortools/lp_data/lp_data.h"

View File

@@ -13,6 +13,7 @@
#include "ortools/glop/entering_variable.h"
#include <algorithm>
#include <queue>
#include "ortools/base/timer.h"

View File

@@ -15,6 +15,7 @@
#define OR_TOOLS_GLOP_ENTERING_VARIABLE_H_
#include <cstdint>
#include <string>
#include "absl/random/bit_gen_ref.h"
#include "ortools/glop/basis_representation.h"

View File

@@ -13,6 +13,7 @@
#include "ortools/glop/initial_basis.h"
#include <algorithm>
#include <queue>
#include "ortools/glop/markowitz.h"

View File

@@ -13,8 +13,10 @@
#include "ortools/glop/lp_solver.h"
#include <algorithm>
#include <cmath>
#include <stack>
#include <string>
#include <vector>
#include "absl/memory/memory.h"
@@ -213,6 +215,17 @@ ProblemStatus LPSolver::SolveWithTimeLimit(const LinearProgram& lp,
ProblemSolution solution(current_linear_program_.num_constraints(),
current_linear_program_.num_variables());
solution.status = preprocessor.status();
// LoadAndVerifySolution() below updates primal_values_, dual_values_,
// variable_statuses_ and constraint_statuses_ with the values stored in
// solution by RunPrimalDualPathFollowingMethodIfNeeded() and
// RunRevisedSimplexIfNeeded(), and hence clears any results stored in them
// from a previous run. In contrast, primal_ray_, constraints_dual_ray_, and
// variable_bounds_dual_ray_ are modified directly by
// RunRevisedSimplexIfNeeded(), so we explicitly clear them from previous run
// results.
primal_ray_.clear();
constraints_dual_ray_.clear();
variable_bounds_dual_ray_.clear();
// Do not launch the solver if the time limit was already reached. This might
// mean that the pre-processors were not all run, and current_linear_program_

View File

@@ -271,7 +271,9 @@ class LPSolver {
int num_revised_simplex_iterations_;
// The current ProblemSolution.
// TODO(user): use a ProblemSolution directly?
// TODO(user): use a ProblemSolution directly? Note, that primal_ray_,
// constraints_dual_ray_ and variable_bounds_dual_ray_ are not currently in
// ProblemSolution and are filled directly by RunRevisedSimplexIfNeeded().
DenseRow primal_values_;
DenseColumn dual_values_;
VariableStatusRow variable_statuses_;

View File

@@ -13,6 +13,8 @@
#include "ortools/glop/variable_values.h"
#include <algorithm>
#include "ortools/graph/iterators.h"
#include "ortools/lp_data/lp_utils.h"

View File

@@ -14,6 +14,8 @@
#ifndef OR_TOOLS_GLOP_VARIABLE_VALUES_H_
#define OR_TOOLS_GLOP_VARIABLE_VALUES_H_
#include <string>
#include "ortools/glop/basis_representation.h"
#include "ortools/glop/dual_edge_norms.h"
#include "ortools/glop/pricing.h"