Google OR-Tools v9.11
a fast and portable software suite for combinatorial optimization
Loading...
Searching...
No Matches
callback_validator.cc File Reference
#include "ortools/math_opt/validators/callback_validator.h"
#include <algorithm>
#include <limits>
#include <string>
#include <vector>
#include "absl/container/flat_hash_set.h"
#include "absl/status/status.h"
#include "absl/strings/str_cat.h"
#include "absl/strings/str_join.h"
#include "google/protobuf/duration.pb.h"
#include "ortools/base/logging.h"
#include "ortools/base/status_macros.h"
#include "ortools/math_opt/callback.pb.h"
#include "ortools/math_opt/core/math_opt_proto_utils.h"
#include "ortools/math_opt/core/model_summary.h"
#include "ortools/math_opt/core/sparse_vector_view.h"
#include "ortools/math_opt/solution.pb.h"
#include "ortools/math_opt/sparse_containers.pb.h"
#include "ortools/math_opt/validators/ids_validator.h"
#include "ortools/math_opt/validators/model_parameters_validator.h"
#include "ortools/math_opt/validators/scalar_validator.h"
#include "ortools/math_opt/validators/solution_validator.h"
#include "ortools/math_opt/validators/sparse_vector_validator.h"
#include "ortools/port/proto_utils.h"

Go to the source code of this file.

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.
 

Macros

#define RETURN_IF_SCALAR(stat, value, option)
 

Functions

absl::Status operations_research::math_opt::ValidateCallbackRegistration (const CallbackRegistrationProto &callback_registration, const ModelSummary &model_summary)
 Checks that CallbackRegistrationProto is valid given a valid model summary.
 
absl::Status operations_research::math_opt::ValidateCallbackDataProto (const CallbackDataProto &cb_data, const CallbackRegistrationProto &callback_registration, const ModelSummary &model_summary)
 
absl::Status operations_research::math_opt::ValidateCallbackResultProto (const CallbackResultProto &callback_result, const CallbackEventProto callback_event, const CallbackRegistrationProto &callback_registration, const ModelSummary &model_summary)
 
absl::Status operations_research::math_opt::CheckRegisteredCallbackEvents (const CallbackRegistrationProto &registration, const absl::flat_hash_set< CallbackEventProto > &supported_events)
 

Macro Definition Documentation

◆ RETURN_IF_SCALAR

#define RETURN_IF_SCALAR ( stat,
value,
option )
Value:
do { \
if (stat.has_##value()) { \
RETURN_IF_ERROR(CheckScalar(static_cast<double>(stat.value()), option)) \
<< "Invalid CallbackDataProto." << #stat << "." << #value; \
} \
} while (false)
int64_t value