C++ Reference: lp_utils

Note: This documentation is automatically generated.

Utility functions to interact with an lp solver from the SAT context.

Function Type Arguments Comments
ComputeTrueObjectiveLowerBound

Return type: double

Arguments: const CpModelProto& model_proto_with_floating_point_objective, const CpObjectiveProto& integer_objective, const int64_t inner_integer_objective_lower_bound

ConvertBinaryMPModelProtoToBooleanProblem

Return type: bool

Arguments: const MPModelProto& mp_model, LinearBooleanProblem* problem

ConvertBooleanProblemToLinearProgram

Return type: void

Arguments: const LinearBooleanProblem& problem, glop::LinearProgram* lp

ConvertCpModelProtoToMPModelProto

Return type: bool

Arguments: const CpModelProto& input, MPModelProto* output

ConvertMPModelProtoToCpModelProto

Return type: bool

Arguments: const SatParameters& params, const MPModelProto& mp_model, CpModelProto* cp_model, SolverLogger* logger

DetectImpliedIntegers

Return type: std::vector<double>

Arguments: MPModelProto* mp_model, SolverLogger* logger

FindBestScalingAndComputeErrors

Return type: double

Arguments: const std::vector<double>& coefficients, const std::vector<double>& lower_bounds, const std::vector<double>& upper_bounds, int64_t max_absolute_activity, double wanted_absolute_activity_precision, double* relative_coeff_error, double* scaled_sum_error

FindRationalFactor

Return type: int

Arguments: double x, int limit = 1e4, double tolerance = 1e-6

MakeBoundsOfIntegerVariablesInteger

Return type: bool

Arguments: const SatParameters& params, MPModelProto* mp_model, SolverLogger* logger

MPModelProtoValidationBeforeConversion

Return type: bool

Arguments: const SatParameters& params, const MPModelProto& mp_model, SolverLogger* logger

RemoveNearZeroTerms

Return type: void

Arguments: const SatParameters& params, MPModelProto* mp_model, SolverLogger* logger

ScaleAndSetObjective

Return type: bool

Arguments: const SatParameters& params, const std::vector<std::pair<int, double>>& objective, double objective_offset, bool maximize, CpModelProto* cp_model, SolverLogger* logger

ScaleContinuousVariables

Return type: std::vector<double>

Arguments: double scaling, double max_bound, MPModelProto* mp_model