Generated on: Thu Mar 29 07:46:58 PDT 2012 for custom file set
// doxy/ or-tools/ src/ constraint_solver/

or-tools/src/constraint_solver/io.cc File Reference

#include <stddef.h>
#include <algorithm>
#include "base/hash.h"
#include <string>
#include <utility>
#include <vector>
#include "base/callback.h"
#include "base/integral_types.h"
#include "base/logging.h"
#include "base/scoped_ptr.h"
#include "base/concise_iterator.h"
#include "base/map-util.h"
#include "base/stl_util.h"
#include "constraint_solver/constraint_solver.h"
#include "constraint_solver/constraint_solveri.h"
#include "constraint_solver/model.pb.h"
#include "constraint_solver/search_limit.pb.h"
#include "util/tuple_set.h"
#include "util/vector_map.h"

Go to the source code of this file.

Namespaces

namespace  operations_research

Classes

class  operations_research::CPModelLoader
 CPModelLoader. More...

Defines

#define VERIFY(expr)   if (!(expr)) return NULL
#define VERIFY_EQ(e1, e2)   if ((e1) != (e2)) return NULL
#define IS_TYPE(index, builder, tag)   index == builder->TagIndex(ModelVisitor::tag)
#define REGISTER(tag, func)   RegisterBuilder(ModelVisitor::tag, NewPermanentCallback(&func))
 Manage builders.

Functions

template<class T>
void operations_research::MakeCallbackFromProto (CPModelLoader *const builder, const CPExtensionProto &proto, int tag_index, ResultCallback1< T, int64 > **callback)
IntExpr * operations_research::BuildAbs (CPModelLoader *const builder, const CPIntegerExpressionProto &proto)
 kAbs
Constraint * operations_research::BuildAllDifferent (CPModelLoader *const builder, const CPConstraintProto &proto)
 kAllDifferent
Constraint * operations_research::BuildAllowedAssignments (CPModelLoader *const builder, const CPConstraintProto &proto)
 kAllowedAssignments
Constraint * operations_research::BuildBetween (CPModelLoader *const builder, const CPConstraintProto &proto)
 kBetween
IntExpr * operations_research::BuildConvexPiecewise (CPModelLoader *const builder, const CPIntegerExpressionProto &proto)
 kConvexPiecewise
Constraint * operations_research::BuildCountEqual (CPModelLoader *const builder, const CPConstraintProto &proto)
 kCountEqual
Constraint * operations_research::BuildCumulative (CPModelLoader *const builder, const CPConstraintProto &proto)
 kCumulative
Constraint * operations_research::BuildDeviation (CPModelLoader *const builder, const CPConstraintProto &proto)
 kDeviation
IntExpr * operations_research::BuildDifference (CPModelLoader *const builder, const CPIntegerExpressionProto &proto)
 kDifference
Constraint * operations_research::BuildDisjunctive (CPModelLoader *const builder, const CPConstraintProto &proto)
 kDisjunctive
Constraint * operations_research::BuildDistribute (CPModelLoader *const builder, const CPConstraintProto &proto)
 kDistribute
IntExpr * operations_research::BuildDivide (CPModelLoader *const builder, const CPIntegerExpressionProto &proto)
 kDivide
IntExpr * operations_research::BuildDurationExpr (CPModelLoader *const builder, const CPIntegerExpressionProto &proto)
 kDurationExpr
IntExpr * operations_research::BuildElement (CPModelLoader *const builder, const CPIntegerExpressionProto &proto)
 kElement
IntExpr * operations_research::BuildEndExpr (CPModelLoader *const builder, const CPIntegerExpressionProto &proto)
 kElementEqual
Constraint * operations_research::BuildEquality (CPModelLoader *const builder, const CPConstraintProto &proto)
 kEquality
Constraint * operations_research::BuildFalseConstraint (CPModelLoader *const builder, const CPConstraintProto &proto)
 kFalseConstraint
Constraint * operations_research::BuildGreater (CPModelLoader *const builder, const CPConstraintProto &proto)
 kGreater
Constraint * operations_research::BuildGreaterOrEqual (CPModelLoader *const builder, const CPConstraintProto &proto)
 kGreaterOrEqual
IntExpr * operations_research::BuildIntegerVariable (CPModelLoader *const builder, const CPIntegerExpressionProto &proto)
 kIntegerVariable
Constraint * operations_research::BuildIntervalBinaryRelation (CPModelLoader *const builder, const CPConstraintProto &proto)
 kIntervalBinaryRelation
Constraint * operations_research::BuildIntervalDisjunction (CPModelLoader *const builder, const CPConstraintProto &proto)
 kIntervalDisjunction
Constraint * operations_research::BuildIntervalUnaryRelation (CPModelLoader *const builder, const CPConstraintProto &proto)
 kIntervalUnaryRelation
IntervalVar * operations_research::BuildIntervalVariable (CPModelLoader *const builder, const CPIntervalVariableProto &proto)
 kIntervalVariable
Constraint * operations_research::BuildIsBetween (CPModelLoader *const builder, const CPConstraintProto &proto)
 kIsBetween
Constraint * operations_research::BuildIsDifferent (CPModelLoader *const builder, const CPConstraintProto &proto)
 kIsDifferent
Constraint * operations_research::BuildIsEqual (CPModelLoader *const builder, const CPConstraintProto &proto)
 kIsEqual
Constraint * operations_research::BuildIsGreaterOrEqual (CPModelLoader *const builder, const CPConstraintProto &proto)
 kIsGreaterOrEqual
Constraint * operations_research::BuildIsLessOrEqual (CPModelLoader *const builder, const CPConstraintProto &proto)
 kIsLessOrEqual
Constraint * operations_research::BuildIsMember (CPModelLoader *const builder, const CPConstraintProto &proto)
 kIsMember
Constraint * operations_research::BuildLess (CPModelLoader *const builder, const CPConstraintProto &proto)
 kLess
Constraint * operations_research::BuildLessOrEqual (CPModelLoader *const builder, const CPConstraintProto &proto)
 kLessOrEqual
Constraint * operations_research::BuildMapDomain (CPModelLoader *const builder, const CPConstraintProto &proto)
 kMapDomain
IntExpr * operations_research::BuildMax (CPModelLoader *const builder, const CPIntegerExpressionProto &proto)
 kMax
Constraint * operations_research::BuildMember (CPModelLoader *const builder, const CPConstraintProto &proto)
 kMaxEqual
IntExpr * operations_research::BuildMin (CPModelLoader *const builder, const CPIntegerExpressionProto &proto)
 kMin
Constraint * operations_research::BuildNoCycle (CPModelLoader *const builder, const CPConstraintProto &proto)
 kMinEqual
Constraint * operations_research::BuildNonEqual (CPModelLoader *const builder, const CPConstraintProto &proto)
 kNonEqual
IntExpr * operations_research::BuildOpposite (CPModelLoader *const builder, const CPIntegerExpressionProto &proto)
 kOpposite
bool operations_research::AddUsageLessConstantDimension (Pack *const pack, CPModelLoader *const builder, const CPExtensionProto &proto)
 kPack
bool operations_research::AddCountAssignedItemsDimension (Pack *const pack, CPModelLoader *const builder, const CPExtensionProto &proto)
bool operations_research::AddCountUsedBinDimension (Pack *const pack, CPModelLoader *const builder, const CPExtensionProto &proto)
bool operations_research::AddUsageEqualVariableDimension (Pack *const pack, CPModelLoader *const builder, const CPExtensionProto &proto)
bool operations_research::AddVariableUsageLessConstantDimension (Pack *const pack, CPModelLoader *const builder, const CPExtensionProto &proto)
bool operations_research::AddWeightedSumOfAssignedDimension (Pack *const pack, CPModelLoader *const builder, const CPExtensionProto &proto)
Constraint * operations_research::BuildPack (CPModelLoader *const builder, const CPConstraintProto &proto)
Constraint * operations_research::BuildPathCumul (CPModelLoader *const builder, const CPConstraintProto &proto)
 kPathCumul
IntExpr * operations_research::BuildPerformedExpr (CPModelLoader *const builder, const CPIntegerExpressionProto &proto)
 kPerformedExpr
IntExpr * operations_research::BuildProduct (CPModelLoader *const builder, const CPIntegerExpressionProto &proto)
 kProduct
IntExpr * operations_research::BuildScalProd (CPModelLoader *const builder, const CPIntegerExpressionProto &proto)
 kScalProd
Constraint * operations_research::BuildScalProdEqual (CPModelLoader *const builder, const CPConstraintProto &proto)
 kScalProdEqual
Constraint * operations_research::BuildScalProdGreaterOrEqual (CPModelLoader *const builder, const CPConstraintProto &proto)
 kScalProdGreaterOrEqual
Constraint * operations_research::BuildScalProdLessOrEqual (CPModelLoader *const builder, const CPConstraintProto &proto)
 kScalProdLessOrEqual
IntExpr * operations_research::BuildSemiContinuous (CPModelLoader *const builder, const CPIntegerExpressionProto &proto)
 kSemiContinuous
SequenceVar * operations_research::BuildSequenceVariable (CPModelLoader *const builder, const CPSequenceVariableProto &proto)
 kSequenceVariable
IntExpr * operations_research::BuildSquare (CPModelLoader *const builder, const CPIntegerExpressionProto &proto)
 kSquare
IntExpr * operations_research::BuildStartExpr (CPModelLoader *const builder, const CPIntegerExpressionProto &proto)
 kStartExpr
IntExpr * operations_research::BuildSum (CPModelLoader *const builder, const CPIntegerExpressionProto &proto)
 kSum
Constraint * operations_research::BuildSumEqual (CPModelLoader *const builder, const CPConstraintProto &proto)
 kSumEqual
Constraint * operations_research::BuildSumGreaterOrEqual (CPModelLoader *const builder, const CPConstraintProto &proto)
 kSumGreaterOrEqual
Constraint * operations_research::BuildSumLessOrEqual (CPModelLoader *const builder, const CPConstraintProto &proto)
 kSumLessOrEqual
Constraint * operations_research::BuildTransition (CPModelLoader *const builder, const CPConstraintProto &proto)
 kTransition
Constraint * operations_research::BuildTrueConstraint (CPModelLoader *const builder, const CPConstraintProto &proto)
 kTrueConstraint

Variables

static const int operations_research::kModelVersion = 1
 Second Pass Visitor.


Define Documentation

#define IS_TYPE ( index,
builder,
tag   )     index == builder->TagIndex(ModelVisitor::tag)

Definition at line 1901 of file io.cc.

#define REGISTER ( tag,
func   )     RegisterBuilder(ModelVisitor::tag, NewPermanentCallback(&func))

Manage builders.

Definition at line 2548 of file io.cc.

#define VERIFY ( expr   )     if (!(expr)) return NULL

Definition at line 1027 of file io.cc.

#define VERIFY_EQ ( e1,
e2   )     if ((e1) != (e2)) return NULL

Definition at line 1028 of file io.cc.


Variable Documentation

std::vector<const Constraint*> constraint_list_

Definition at line 330 of file io.cc.

hash_map<const IntVar*, const IntExpr*> delegate_map_

Definition at line 328 of file io.cc.

std::vector<const IntExpr*> expression_list_

Definition at line 329 of file io.cc.

hash_map<const IntExpr*, int> expression_map_

Definition at line 325 of file io.cc.

std::vector<ArgumentHolder*> extensions_

Definition at line 969 of file io.cc.

const string filename_

Definition at line 324 of file io.cc.

std::vector<ArgumentHolder*> holders_

Definition at line 968 of file io.cc.

const int64 index_max_

Definition at line 1002 of file io.cc.

const int64 index_min_

Definition at line 1001 of file io.cc.

hash_map<string, int64> integer_argument_

Definition at line 510 of file io.cc.

hash_map<string, std::vector<int64> > integer_array_argument_

Definition at line 513 of file io.cc.

hash_map<string, int> integer_expression_argument_

Definition at line 509 of file io.cc.

hash_map<string, std::pair<int, std::vector<int64> > > integer_matrix_argument_

Definition at line 514 of file io.cc.

hash_map<string, std::vector<int> > integer_variable_array_argument_

Definition at line 515 of file io.cc.

hash_map<string, int> interval_argument_

Definition at line 511 of file io.cc.

hash_map<string, std::vector<int> > interval_array_argument_

Definition at line 516 of file io.cc.

std::vector<const IntervalVar*> interval_list_

Definition at line 331 of file io.cc.

hash_map<const IntervalVar*, int> interval_map_

Definition at line 326 of file io.cc.

CPModelProto* const model_proto_

Definition at line 966 of file io.cc.

hash_map<string, int> sequence_argument_

Definition at line 512 of file io.cc.

hash_map<string, std::vector<int> > sequence_array_argument_

Definition at line 517 of file io.cc.

std::vector<const SequenceVar*> sequence_list_

Definition at line 332 of file io.cc.

hash_map<const SequenceVar*, int> sequence_map_

Definition at line 327 of file io.cc.

VectorMap<string> tags_

Definition at line 970 of file io.cc.

string type_name_

Definition at line 508 of file io.cc.

scoped_array<T> values_

Definition at line 1003 of file io.cc.