/// <summary>
 /// Initialize the expression constraint converter with a solver and or-tools cache.
 /// </summary>
 /// <param name="theSolver">Google or-tools solver instance.</param>
 /// <param name="theCache">Cache mapping between the model and Google or-tools solver.</param>
 /// <param name="theModel">Model</param>
 internal OrExpressionConstraintConverter(Google.OrTools.ConstraintSolver.Solver theSolver, OrToolsCache theCache, ModelModel theModel, OrValueMapper theValueMapper)
 {
     this.solver      = theSolver;
     this.cache       = theCache;
     this.model       = theModel;
     this.valueMapper = theValueMapper;
 }
Example #2
0
 /// <summary>
 /// Initialize the bucket converter with a Google or-tools solver, a or-tools cache and a solver / domain mapper.
 /// </summary>
 internal OrBucketConverter(Google.OrTools.ConstraintSolver.Solver solver, OrToolsCache cache, OrValueMapper valueMapper)
 {
     _solver      = solver;
     _cache       = cache;
     _valueMapper = valueMapper;
 }
Example #3
0
 /// <summary>
 /// Initialize a snapshot extractor with an or-tools cache and a value mapper.
 /// </summary>
 /// <param name="theOrToolsCache">or-tools cache.</param>
 /// <param name="theValueMapper">Value mapper between domain and solver values.</param>
 internal OrSnapshotExtractor(OrToolsCache theOrToolsCache, OrValueMapper theValueMapper)
 {
     this.orToolsCache = theOrToolsCache;
     this.valueMapper  = theValueMapper;
     this.snapshot     = new SolutionSnapshot();
 }
 /// <summary>
 /// Initialize the all different constraint converter with a solver and or-tools cache.
 /// </summary>
 /// <param name="theSolver">Google or-tools solver instance.</param>
 /// <param name="theCache">Cache mapping between the model and Google or-tools solver.</param>
 /// <param name="theModel">Model.</param>
 internal OrAllDifferentConstraintConverter(Google.OrTools.ConstraintSolver.Solver theSolver, OrToolsCache theCache, ModelModel theModel)
 {
     this.solver = theSolver;
     this.cache  = theCache;
     this.model  = theModel;
 }
Example #5
0
 /// <summary>
 /// Initialize the model converter with a Google or-tools solver.
 /// </summary>
 internal ModelConverter(Google.OrTools.ConstraintSolver.Solver theSolver, OrToolsCache theCache, OrValueMapper valueMapper)
 {
     this.constraintConverter = new OrConstraintConverter(theSolver, theCache, valueMapper);
     this.variableConverter   = new VariableConverter(theSolver, theCache, valueMapper);
     this.bucketConverter     = new OrBucketConverter(theSolver, theCache, valueMapper);
 }
Example #6
0
 /// <summary>
 /// Initialize the constraint converter with a Google or-tools solver and a or-tools cache.
 /// </summary>
 internal OrConstraintConverter(Google.OrTools.ConstraintSolver.Solver theSolver, OrToolsCache theCache, OrValueMapper theValueMapper)
 {
     this.solver      = theSolver;
     this.cache       = theCache;
     this.valueMapper = theValueMapper;
 }