Google OR-Tools v9.11
a fast and portable software suite for combinatorial optimization
Loading...
Searching...
No Matches
Google.OrTools.Sat.CpSolverResponse Class Referencesealed

The response returned by a solver trying to solve a CpModelProto. More...

Inheritance diagram for Google.OrTools.Sat.CpSolverResponse:

Public Member Functions

 CpSolverResponse ()
 
 CpSolverResponse (CpSolverResponse other)
 
CpSolverResponse Clone ()
 
override bool Equals (object other)
 
bool Equals (CpSolverResponse other)
 
override int GetHashCode ()
 
override string ToString ()
 
void WriteTo (pb::CodedOutputStream output)
 
int CalculateSize ()
 
void MergeFrom (CpSolverResponse other)
 
void MergeFrom (pb::CodedInputStream input)
 

Static Public Attributes

const int StatusFieldNumber = 1
 Field number for the "status" field.
 
const int SolutionFieldNumber = 2
 Field number for the "solution" field.
 
const int ObjectiveValueFieldNumber = 3
 Field number for the "objective_value" field.
 
const int BestObjectiveBoundFieldNumber = 4
 Field number for the "best_objective_bound" field.
 
const int AdditionalSolutionsFieldNumber = 27
 Field number for the "additional_solutions" field.
 
const int TightenedVariablesFieldNumber = 21
 Field number for the "tightened_variables" field.
 
const int SufficientAssumptionsForInfeasibilityFieldNumber = 23
 Field number for the "sufficient_assumptions_for_infeasibility" field.
 
const int IntegerObjectiveFieldNumber = 28
 Field number for the "integer_objective" field.
 
const int InnerObjectiveLowerBoundFieldNumber = 29
 Field number for the "inner_objective_lower_bound" field.
 
const int NumIntegersFieldNumber = 30
 Field number for the "num_integers" field.
 
const int NumBooleansFieldNumber = 10
 Field number for the "num_booleans" field.
 
const int NumConflictsFieldNumber = 11
 Field number for the "num_conflicts" field.
 
const int NumBranchesFieldNumber = 12
 Field number for the "num_branches" field.
 
const int NumBinaryPropagationsFieldNumber = 13
 Field number for the "num_binary_propagations" field.
 
const int NumIntegerPropagationsFieldNumber = 14
 Field number for the "num_integer_propagations" field.
 
const int NumRestartsFieldNumber = 24
 Field number for the "num_restarts" field.
 
const int NumLpIterationsFieldNumber = 25
 Field number for the "num_lp_iterations" field.
 
const int WallTimeFieldNumber = 15
 Field number for the "wall_time" field.
 
const int UserTimeFieldNumber = 16
 Field number for the "user_time" field.
 
const int DeterministicTimeFieldNumber = 17
 Field number for the "deterministic_time" field.
 
const int GapIntegralFieldNumber = 22
 Field number for the "gap_integral" field.
 
const int SolutionInfoFieldNumber = 20
 Field number for the "solution_info" field.
 
const int SolveLogFieldNumber = 26
 Field number for the "solve_log" field.
 

Properties

static pb::MessageParser< CpSolverResponseParser [get]
 
static pbr::MessageDescriptor Descriptor [get]
 
global::Google.OrTools.Sat.CpSolverStatus Status [get, set]
 The status of the solve.
 
pbc::RepeatedField< long > Solution [get]
 A feasible solution to the given problem. Depending on the returned status it may be optimal or just feasible. This is in one-to-one correspondence with a CpModelProto::variables repeated field and list the values of all the variables.
 
double ObjectiveValue [get, set]
 Only make sense for an optimization problem. The objective value of the returned solution if it is non-empty. If there is no solution, then for a minimization problem, this will be an upper-bound of the objective of any feasible solution, and a lower-bound for a maximization problem.
 
double BestObjectiveBound [get, set]
 Only make sense for an optimization problem. A proven lower-bound on the objective for a minimization problem, or a proven upper-bound for a maximization problem.
 
pbc::RepeatedField< global::Google.OrTools.Sat.CpSolverSolution > AdditionalSolutions [get]
 If the parameter fill_additional_solutions_in_response is set, then we copy all the solutions from our internal solution pool here.
 
pbc::RepeatedField< global::Google.OrTools.Sat.IntegerVariableProto > TightenedVariables [get]
 Advanced usage.
 
pbc::RepeatedField< int > SufficientAssumptionsForInfeasibility [get]
 A subset of the model "assumptions" field. This will only be filled if the status is INFEASIBLE. This subset of assumption will be enough to still get an infeasible problem.
 
global::Google.OrTools.Sat.CpObjectiveProto IntegerObjective [get, set]
 Contains the integer objective optimized internally. This is only filled if the problem had a floating point objective, and on the final response, not the ones given to callbacks.
 
long InnerObjectiveLowerBound [get, set]
 Advanced usage.
 
long NumIntegers [get, set]
 Some statistics about the solve.
 
long NumBooleans [get, set]
 
long NumConflicts [get, set]
 
long NumBranches [get, set]
 
long NumBinaryPropagations [get, set]
 
long NumIntegerPropagations [get, set]
 
long NumRestarts [get, set]
 
long NumLpIterations [get, set]
 
double WallTime [get, set]
 The time counted from the beginning of the Solve() call.
 
double UserTime [get, set]
 
double DeterministicTime [get, set]
 
double GapIntegral [get, set]
 The integral of log(1 + absolute_objective_gap) over time.
 
string SolutionInfo [get, set]
 Additional information about how the solution was found. It also stores model or parameters errors that caused the model to be invalid.
 
string SolveLog [get, set]
 The solve log will be filled if the parameter log_to_response is set to true.
 

Detailed Description

The response returned by a solver trying to solve a CpModelProto.

Next id: 31

Definition at line 9208 of file CpModel.pb.cs.

Constructor & Destructor Documentation

◆ CpSolverResponse() [1/2]

Google.OrTools.Sat.CpSolverResponse.CpSolverResponse ( )
inline

Definition at line 9233 of file CpModel.pb.cs.

◆ CpSolverResponse() [2/2]

Google.OrTools.Sat.CpSolverResponse.CpSolverResponse ( CpSolverResponse other)
inline

Definition at line 9241 of file CpModel.pb.cs.

Member Function Documentation

◆ CalculateSize()

int Google.OrTools.Sat.CpSolverResponse.CalculateSize ( )
inline

Definition at line 9921 of file CpModel.pb.cs.

◆ Clone()

CpSolverResponse Google.OrTools.Sat.CpSolverResponse.Clone ( )
inline

Definition at line 9270 of file CpModel.pb.cs.

◆ Equals() [1/2]

bool Google.OrTools.Sat.CpSolverResponse.Equals ( CpSolverResponse other)
inline

Definition at line 9665 of file CpModel.pb.cs.

◆ Equals() [2/2]

override bool Google.OrTools.Sat.CpSolverResponse.Equals ( object other)
inline

Definition at line 9659 of file CpModel.pb.cs.

◆ GetHashCode()

override int Google.OrTools.Sat.CpSolverResponse.GetHashCode ( )
inline

Definition at line 9700 of file CpModel.pb.cs.

◆ MergeFrom() [1/2]

void Google.OrTools.Sat.CpSolverResponse.MergeFrom ( CpSolverResponse other)
inline

Definition at line 9992 of file CpModel.pb.cs.

◆ MergeFrom() [2/2]

void Google.OrTools.Sat.CpSolverResponse.MergeFrom ( pb.CodedInputStream input)
inline

Definition at line 10065 of file CpModel.pb.cs.

◆ ToString()

override string Google.OrTools.Sat.CpSolverResponse.ToString ( )
inline

Definition at line 9733 of file CpModel.pb.cs.

◆ WriteTo()

void Google.OrTools.Sat.CpSolverResponse.WriteTo ( pb.CodedOutputStream output)
inline

Definition at line 9739 of file CpModel.pb.cs.

Member Data Documentation

◆ AdditionalSolutionsFieldNumber

const int Google.OrTools.Sat.CpSolverResponse.AdditionalSolutionsFieldNumber = 27
static

Field number for the "additional_solutions" field.

Definition at line 9342 of file CpModel.pb.cs.

◆ BestObjectiveBoundFieldNumber

const int Google.OrTools.Sat.CpSolverResponse.BestObjectiveBoundFieldNumber = 4
static

Field number for the "best_objective_bound" field.

Definition at line 9325 of file CpModel.pb.cs.

◆ DeterministicTimeFieldNumber

const int Google.OrTools.Sat.CpSolverResponse.DeterministicTimeFieldNumber = 17
static

Field number for the "deterministic_time" field.

Definition at line 9599 of file CpModel.pb.cs.

◆ GapIntegralFieldNumber

const int Google.OrTools.Sat.CpSolverResponse.GapIntegralFieldNumber = 22
static

Field number for the "gap_integral" field.

Definition at line 9611 of file CpModel.pb.cs.

◆ InnerObjectiveLowerBoundFieldNumber

const int Google.OrTools.Sat.CpSolverResponse.InnerObjectiveLowerBoundFieldNumber = 29
static

Field number for the "inner_objective_lower_bound" field.

Definition at line 9447 of file CpModel.pb.cs.

◆ IntegerObjectiveFieldNumber

const int Google.OrTools.Sat.CpSolverResponse.IntegerObjectiveFieldNumber = 28
static

Field number for the "integer_objective" field.

Definition at line 9430 of file CpModel.pb.cs.

◆ NumBinaryPropagationsFieldNumber

const int Google.OrTools.Sat.CpSolverResponse.NumBinaryPropagationsFieldNumber = 13
static

Field number for the "num_binary_propagations" field.

Definition at line 9524 of file CpModel.pb.cs.

◆ NumBooleansFieldNumber

const int Google.OrTools.Sat.CpSolverResponse.NumBooleansFieldNumber = 10
static

Field number for the "num_booleans" field.

Definition at line 9488 of file CpModel.pb.cs.

◆ NumBranchesFieldNumber

const int Google.OrTools.Sat.CpSolverResponse.NumBranchesFieldNumber = 12
static

Field number for the "num_branches" field.

Definition at line 9512 of file CpModel.pb.cs.

◆ NumConflictsFieldNumber

const int Google.OrTools.Sat.CpSolverResponse.NumConflictsFieldNumber = 11
static

Field number for the "num_conflicts" field.

Definition at line 9500 of file CpModel.pb.cs.

◆ NumIntegerPropagationsFieldNumber

const int Google.OrTools.Sat.CpSolverResponse.NumIntegerPropagationsFieldNumber = 14
static

Field number for the "num_integer_propagations" field.

Definition at line 9536 of file CpModel.pb.cs.

◆ NumIntegersFieldNumber

const int Google.OrTools.Sat.CpSolverResponse.NumIntegersFieldNumber = 30
static

Field number for the "num_integers" field.

Definition at line 9468 of file CpModel.pb.cs.

◆ NumLpIterationsFieldNumber

const int Google.OrTools.Sat.CpSolverResponse.NumLpIterationsFieldNumber = 25
static

Field number for the "num_lp_iterations" field.

Definition at line 9560 of file CpModel.pb.cs.

◆ NumRestartsFieldNumber

const int Google.OrTools.Sat.CpSolverResponse.NumRestartsFieldNumber = 24
static

Field number for the "num_restarts" field.

Definition at line 9548 of file CpModel.pb.cs.

◆ ObjectiveValueFieldNumber

const int Google.OrTools.Sat.CpSolverResponse.ObjectiveValueFieldNumber = 3
static

Field number for the "objective_value" field.

Definition at line 9307 of file CpModel.pb.cs.

◆ SolutionFieldNumber

const int Google.OrTools.Sat.CpSolverResponse.SolutionFieldNumber = 2
static

Field number for the "solution" field.

Definition at line 9290 of file CpModel.pb.cs.

◆ SolutionInfoFieldNumber

const int Google.OrTools.Sat.CpSolverResponse.SolutionInfoFieldNumber = 20
static

Field number for the "solution_info" field.

Definition at line 9626 of file CpModel.pb.cs.

◆ SolveLogFieldNumber

const int Google.OrTools.Sat.CpSolverResponse.SolveLogFieldNumber = 26
static

Field number for the "solve_log" field.

Definition at line 9642 of file CpModel.pb.cs.

◆ StatusFieldNumber

const int Google.OrTools.Sat.CpSolverResponse.StatusFieldNumber = 1
static

Field number for the "status" field.

Definition at line 9275 of file CpModel.pb.cs.

◆ SufficientAssumptionsForInfeasibilityFieldNumber

const int Google.OrTools.Sat.CpSolverResponse.SufficientAssumptionsForInfeasibilityFieldNumber = 23
static

Field number for the "sufficient_assumptions_for_infeasibility" field.

Definition at line 9394 of file CpModel.pb.cs.

◆ TightenedVariablesFieldNumber

const int Google.OrTools.Sat.CpSolverResponse.TightenedVariablesFieldNumber = 21
static

Field number for the "tightened_variables" field.

Definition at line 9362 of file CpModel.pb.cs.

◆ UserTimeFieldNumber

const int Google.OrTools.Sat.CpSolverResponse.UserTimeFieldNumber = 16
static

Field number for the "user_time" field.

Definition at line 9587 of file CpModel.pb.cs.

◆ WallTimeFieldNumber

const int Google.OrTools.Sat.CpSolverResponse.WallTimeFieldNumber = 15
static

Field number for the "wall_time" field.

Definition at line 9572 of file CpModel.pb.cs.

Property Documentation

◆ AdditionalSolutions

pbc.RepeatedField<global.Google.OrTools.Sat.CpSolverSolution> Google.OrTools.Sat.CpSolverResponse.AdditionalSolutions
get

If the parameter fill_additional_solutions_in_response is set, then we copy all the solutions from our internal solution pool here.

Note
the one returned in the solution field will likely appear here too. Do not rely on the solutions order as it depends on our internal representation (after postsolve).

Definition at line 9357 of file CpModel.pb.cs.

◆ BestObjectiveBound

double Google.OrTools.Sat.CpSolverResponse.BestObjectiveBound
getset

Only make sense for an optimization problem. A proven lower-bound on the objective for a minimization problem, or a proven upper-bound for a maximization problem.

Definition at line 9334 of file CpModel.pb.cs.

◆ Descriptor

pbr.MessageDescriptor Google.OrTools.Sat.CpSolverResponse.Descriptor
staticget

Definition at line 9221 of file CpModel.pb.cs.

◆ DeterministicTime

double Google.OrTools.Sat.CpSolverResponse.DeterministicTime
getset

Definition at line 9603 of file CpModel.pb.cs.

◆ GapIntegral

double Google.OrTools.Sat.CpSolverResponse.GapIntegral
getset

The integral of log(1 + absolute_objective_gap) over time.

Definition at line 9618 of file CpModel.pb.cs.

◆ InnerObjectiveLowerBound

long Google.OrTools.Sat.CpSolverResponse.InnerObjectiveLowerBound
getset

Advanced usage.

A lower bound on the inner integer expression of the objective. This is either a bound on the expression in the returned integer_objective or on the integer expression of the original objective if the problem already has an integer objective.

Definition at line 9460 of file CpModel.pb.cs.

◆ IntegerObjective

global.Google.OrTools.Sat.CpObjectiveProto Google.OrTools.Sat.CpSolverResponse.IntegerObjective
getset

Contains the integer objective optimized internally. This is only filled if the problem had a floating point objective, and on the final response, not the ones given to callbacks.

Definition at line 9439 of file CpModel.pb.cs.

◆ NumBinaryPropagations

long Google.OrTools.Sat.CpSolverResponse.NumBinaryPropagations
getset

Definition at line 9528 of file CpModel.pb.cs.

◆ NumBooleans

long Google.OrTools.Sat.CpSolverResponse.NumBooleans
getset

Definition at line 9492 of file CpModel.pb.cs.

◆ NumBranches

long Google.OrTools.Sat.CpSolverResponse.NumBranches
getset

Definition at line 9516 of file CpModel.pb.cs.

◆ NumConflicts

long Google.OrTools.Sat.CpSolverResponse.NumConflicts
getset

Definition at line 9504 of file CpModel.pb.cs.

◆ NumIntegerPropagations

long Google.OrTools.Sat.CpSolverResponse.NumIntegerPropagations
getset

Definition at line 9540 of file CpModel.pb.cs.

◆ NumIntegers

long Google.OrTools.Sat.CpSolverResponse.NumIntegers
getset

Some statistics about the solve.

Important: in multithread, this correspond the statistics of the first subsolver. Which is usually the one with the user defined parameters. Or the default-search if none are specified.

Definition at line 9480 of file CpModel.pb.cs.

◆ NumLpIterations

long Google.OrTools.Sat.CpSolverResponse.NumLpIterations
getset

Definition at line 9564 of file CpModel.pb.cs.

◆ NumRestarts

long Google.OrTools.Sat.CpSolverResponse.NumRestarts
getset

Definition at line 9552 of file CpModel.pb.cs.

◆ ObjectiveValue

double Google.OrTools.Sat.CpSolverResponse.ObjectiveValue
getset

Only make sense for an optimization problem. The objective value of the returned solution if it is non-empty. If there is no solution, then for a minimization problem, this will be an upper-bound of the objective of any feasible solution, and a lower-bound for a maximization problem.

Definition at line 9317 of file CpModel.pb.cs.

◆ Parser

pb.MessageParser<CpSolverResponse> Google.OrTools.Sat.CpSolverResponse.Parser
staticget

Definition at line 9217 of file CpModel.pb.cs.

◆ Solution

pbc.RepeatedField<long> Google.OrTools.Sat.CpSolverResponse.Solution
get

A feasible solution to the given problem. Depending on the returned status it may be optimal or just feasible. This is in one-to-one correspondence with a CpModelProto::variables repeated field and list the values of all the variables.

Definition at line 9302 of file CpModel.pb.cs.

◆ SolutionInfo

string Google.OrTools.Sat.CpSolverResponse.SolutionInfo
getset

Additional information about how the solution was found. It also stores model or parameters errors that caused the model to be invalid.

Definition at line 9634 of file CpModel.pb.cs.

◆ SolveLog

string Google.OrTools.Sat.CpSolverResponse.SolveLog
getset

The solve log will be filled if the parameter log_to_response is set to true.

Definition at line 9650 of file CpModel.pb.cs.

◆ Status

global.Google.OrTools.Sat.CpSolverStatus Google.OrTools.Sat.CpSolverResponse.Status
getset

The status of the solve.

Definition at line 9282 of file CpModel.pb.cs.

◆ SufficientAssumptionsForInfeasibility

pbc.RepeatedField<int> Google.OrTools.Sat.CpSolverResponse.SufficientAssumptionsForInfeasibility
get

A subset of the model "assumptions" field. This will only be filled if the status is INFEASIBLE. This subset of assumption will be enough to still get an infeasible problem.

This is related to what is called the irreducible inconsistent subsystem or IIS. Except one is only concerned by the provided assumptions. There is also no guarantee that we return an irreducible (aka minimal subset). However, this is based on SAT explanation and there is a good chance it is not too large. If you really want a minimal subset, a possible way to get one is by changing your model to minimize the number of assumptions at false, but this is likely an harder problem to solve. Important: Currently, this is minimized only in single-thread and if the problem is not an optimization problem, otherwise, it will always include all the assumptions.

Todo
(user): Allows for returning multiple core at once.

Definition at line 9425 of file CpModel.pb.cs.

◆ TightenedVariables

pbc.RepeatedField<global.Google.OrTools.Sat.IntegerVariableProto> Google.OrTools.Sat.CpSolverResponse.TightenedVariables
get

Advanced usage.

If the option fill_tightened_domains_in_response is set, then this field will be a copy of the CpModelProto.variables where each domain has been reduced using the information the solver was able to derive. Note that this is only filled with the info derived during a normal search and we do not have any dedicated algorithm to improve it.

Warning
if you didn't set keep_all_feasible_solutions_in_presolve, then these domains might exclude valid feasible solution. Otherwise for a feasibility problem, all feasible solution should be there.
For an optimization problem, these will correspond to valid bounds for the problem of finding an improving solution to the best one found so far. It might be better to solve a feasibility version if one just want to explore the feasible region.

Definition at line 9389 of file CpModel.pb.cs.

◆ UserTime

double Google.OrTools.Sat.CpSolverResponse.UserTime
getset

Definition at line 9591 of file CpModel.pb.cs.

◆ WallTime

double Google.OrTools.Sat.CpSolverResponse.WallTime
getset

The time counted from the beginning of the Solve() call.

Definition at line 9579 of file CpModel.pb.cs.


The documentation for this class was generated from the following file: