Generated on Sat Feb 7 2015 02:01:13 for Gecode by doxygen 1.8.9.1
flatzinc.hh
Go to the documentation of this file.
1 /* -*- mode: C++; c-basic-offset: 2; indent-tabs-mode: nil -*- */
2 /*
3  * Main authors:
4  * Guido Tack <tack@gecode.org>
5  *
6  * Contributing authors:
7  * Gabriel Hjort Blindell <gabriel.hjort.blindell@gmail.com>
8  *
9  * Copyright:
10  * Guido Tack, 2007-2012
11  * Gabriel Hjort Blindell, 2012
12  *
13  * Last modified:
14  * $Date: 2015-01-05 07:33:06 +0100 (Mon, 05 Jan 2015) $ by $Author: tack $
15  * $Revision: 14337 $
16  *
17  * This file is part of Gecode, the generic constraint
18  * development environment:
19  * http://www.gecode.org
20  *
21  * Permission is hereby granted, free of charge, to any person obtaining
22  * a copy of this software and associated documentation files (the
23  * "Software"), to deal in the Software without restriction, including
24  * without limitation the rights to use, copy, modify, merge, publish,
25  * distribute, sublicense, and/or sell copies of the Software, and to
26  * permit persons to whom the Software is furnished to do so, subject to
27  * the following conditions:
28  *
29  * The above copyright notice and this permission notice shall be
30  * included in all copies or substantial portions of the Software.
31  *
32  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
33  * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
34  * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
35  * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
36  * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
37  * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
38  * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
39  *
40  */
41 
42 #ifndef __GECODE_FLATZINC_HH__
43 #define __GECODE_FLATZINC_HH__
44 
45 #include <iostream>
46 
47 #include <gecode/kernel.hh>
48 #include <gecode/int.hh>
49 #ifdef GECODE_HAS_SET_VARS
50 #include <gecode/set.hh>
51 #endif
52 #ifdef GECODE_HAS_FLOAT_VARS
53 #include <gecode/float.hh>
54 #endif
55 #include <map>
56 
57 /*
58  * Support for DLLs under Windows
59  *
60  */
61 
62 #if !defined(GECODE_STATIC_LIBS) && \
63  (defined(__CYGWIN__) || defined(__MINGW32__) || defined(_MSC_VER))
64 
65 #ifdef GECODE_BUILD_FLATZINC
66 #define GECODE_FLATZINC_EXPORT __declspec( dllexport )
67 #else
68 #define GECODE_FLATZINC_EXPORT __declspec( dllimport )
69 #endif
70 
71 #else
72 
73 #ifdef GECODE_GCC_HAS_CLASS_VISIBILITY
74 
75 #define GECODE_FLATZINC_EXPORT __attribute__ ((visibility("default")))
76 
77 #else
78 
79 #define GECODE_FLATZINC_EXPORT
80 
81 #endif
82 #endif
83 
84 // Configure auto-linking
85 #ifndef GECODE_BUILD_FLATZINC
86 #define GECODE_LIBRARY_NAME "FlatZinc"
88 #endif
89 
90 #include <gecode/driver.hh>
91 
93 #include <gecode/flatzinc/ast.hh>
95 
105 namespace Gecode { namespace FlatZinc {
106 
112  private:
113  AST::Array* _output;
114  void printElem(std::ostream& out,
115  AST::Node* ai,
116  const Gecode::IntVarArray& iv,
117  const Gecode::BoolVarArray& bv
118 #ifdef GECODE_HAS_SET_VARS
119  ,
120  const Gecode::SetVarArray& sv
121 #endif
123  ,
124  const Gecode::FloatVarArray& fv
125 #endif
126  ) const;
127  void printElemDiff(std::ostream& out,
128  AST::Node* ai,
129  const Gecode::IntVarArray& iv1,
130  const Gecode::IntVarArray& iv2,
131  const Gecode::BoolVarArray& bv1,
132  const Gecode::BoolVarArray& bv2
133 #ifdef GECODE_HAS_SET_VARS
134  ,
135  const Gecode::SetVarArray& sv1,
136  const Gecode::SetVarArray& sv2
137 #endif
138 #ifdef GECODE_HAS_FLOAT_VARS
139  ,
140  const Gecode::FloatVarArray& fv1,
141  const Gecode::FloatVarArray& fv2
142 #endif
143  ) const;
144  public:
145  Printer(void) : _output(NULL) {}
146  void init(AST::Array* output);
147 
148  void print(std::ostream& out,
149  const Gecode::IntVarArray& iv,
150  const Gecode::BoolVarArray& bv
151 #ifdef GECODE_HAS_SET_VARS
152  ,
153  const Gecode::SetVarArray& sv
154 #endif
155 #ifdef GECODE_HAS_FLOAT_VARS
156  ,
157  const Gecode::FloatVarArray& fv
158 #endif
159  ) const;
160 
161  void printDiff(std::ostream& out,
162  const Gecode::IntVarArray& iv1, const Gecode::IntVarArray& iv2,
163  const Gecode::BoolVarArray& bv1, const Gecode::BoolVarArray& bv2
164 #ifdef GECODE_HAS_SET_VARS
165  ,
166  const Gecode::SetVarArray& sv1, const Gecode::SetVarArray& sv2
167 #endif
168 #ifdef GECODE_HAS_FLOAT_VARS
169  ,
170  const Gecode::FloatVarArray& fv1,
171  const Gecode::FloatVarArray& fv2
172 #endif
173  ) const;
174 
175 
176  ~Printer(void);
177 
178  void shrinkElement(AST::Node* node,
179  std::map<int,int>& iv, std::map<int,int>& bv,
180  std::map<int,int>& sv, std::map<int,int>& fv);
181 
182  void shrinkArrays(Space& home,
183  int& optVar, bool optVarIsInt,
186 #ifdef GECODE_HAS_SET_VARS
187  ,
189 #endif
190 #ifdef GECODE_HAS_FLOAT_VARS
191  ,
193 #endif
194  );
195 
196  private:
197  Printer(const Printer&);
198  Printer& operator=(const Printer&);
199  };
200 
206  protected:
208 
226 
227 
229 
233 
234  public:
236  FlatZincOptions(const char* s)
237  : Gecode::BaseOptions(s),
238  _solutions("-n","number of solutions (0 = all, -1 = one/best)",-1),
239  _allSolutions("-a", "return all solutions (equal to -n 0)"),
240  _threads("-p","number of threads (0 = #processing units)",
241  Gecode::Search::Config::threads),
242  _free("-f", "free search, no need to follow search-specification"),
243  _decay("-decay","decay factor",0.99),
244  _c_d("-c-d","recomputation commit distance",Gecode::Search::Config::c_d),
245  _a_d("-a-d","recomputation adaption distance",Gecode::Search::Config::a_d),
246  _node("-node","node cutoff (0 = none, solution mode)"),
247  _fail("-fail","failure cutoff (0 = none, solution mode)"),
248  _time("-time","time (in ms) cutoff (0 = none, solution mode)"),
249  _seed("-r","random seed",0),
250  _restart("-restart","restart sequence type",RM_NONE),
251  _r_base("-restart-base","base for geometric restart sequence",1.5),
252  _r_scale("-restart-scale","scale factor for restart sequence",250),
253  _nogoods("-nogoods","whether to use no-goods from restarts",false),
254  _nogoods_limit("-nogoods-limit","depth limit for no-good extraction",
255  Search::Config::nogoods_limit),
256  _interrupt("-interrupt","whether to catch Ctrl-C (true) or not (false)",
257  true),
258  _mode("-mode","how to execute script",Gecode::SM_SOLUTION),
259  _stat("-s","emit statistics"),
260  _output("-o","file to send output to") {
261 
262  _mode.add(Gecode::SM_SOLUTION, "solution");
263  _mode.add(Gecode::SM_STAT, "stat");
264  _mode.add(Gecode::SM_GIST, "gist");
265  _restart.add(RM_NONE,"none");
266  _restart.add(RM_CONSTANT,"constant");
267  _restart.add(RM_LINEAR,"linear");
268  _restart.add(RM_LUBY,"luby");
269  _restart.add(RM_GEOMETRIC,"geometric");
270 
271  add(_solutions); add(_threads); add(_c_d); add(_a_d);
272  add(_allSolutions);
273  add(_free);
274  add(_decay);
275  add(_node); add(_fail); add(_time); add(_interrupt);
276  add(_seed);
277  add(_restart); add(_r_base); add(_r_scale);
278  add(_nogoods); add(_nogoods_limit);
279  add(_mode); add(_stat);
280  add(_output);
281  }
282 
283  void parse(int& argc, char* argv[]) {
284  Gecode::BaseOptions::parse(argc,argv);
285  if (_allSolutions.value() && _solutions.value()==-1) {
286  _solutions.value(0);
287  }
288  if (_stat.value())
289  _mode.value(Gecode::SM_STAT);
290  }
291 
292  virtual void help(void) {
293  std::cerr << "Gecode FlatZinc interpreter" << std::endl
294  << " - Supported FlatZinc version: " << GECODE_FLATZINC_VERSION
295  << std::endl << std::endl;
297  }
298 
299  int solutions(void) const { return _solutions.value(); }
300  bool allSolutions(void) const { return _allSolutions.value(); }
301  double threads(void) const { return _threads.value(); }
302  bool free(void) const { return _free.value(); }
303  unsigned int c_d(void) const { return _c_d.value(); }
304  unsigned int a_d(void) const { return _a_d.value(); }
305  unsigned int node(void) const { return _node.value(); }
306  unsigned int fail(void) const { return _fail.value(); }
307  unsigned int time(void) const { return _time.value(); }
308  int seed(void) const { return _seed.value(); }
309  const char* output(void) const { return _output.value(); }
310  Gecode::ScriptMode mode(void) const {
311  return static_cast<Gecode::ScriptMode>(_mode.value());
312  }
313 
314  double decay(void) const { return _decay.value(); }
315  RestartMode restart(void) const {
316  return static_cast<RestartMode>(_restart.value());
317  }
318  double restart_base(void) const { return _r_base.value(); }
319  unsigned int restart_scale(void) const { return _r_scale.value(); }
320  bool nogoods(void) const { return _nogoods.value(); }
321  unsigned int nogoods_limit(void) const { return _nogoods_limit.value(); }
322  bool interrupt(void) const { return _interrupt.value(); }
323 
324  void allSolutions(bool b) { _allSolutions.value(b); }
325  };
326 
328  public:
330  BranchInformation(void);
334  void init(void);
336  void add(const BrancherHandle& bh,
337  const std::string& rel0,
338  const std::string& rel1,
339  const std::vector<std::string>& n);
341  void print(const BrancherHandle& bh,
342  int a, int i, int n, std::ostream& o) const;
343 #ifdef GECODE_HAS_FLOAT_VARS
344  void print(const BrancherHandle& bh,
346  int a, int i, const FloatNumBranch& nl, std::ostream& o) const;
347 #endif
348  };
349 
355  protected:
360  public:
362  FznRnd(unsigned int s=1);
364  unsigned int operator ()(unsigned int n);
365  };
366 
372  public:
373  enum Meth {
374  SAT, //< Solve as satisfaction problem
375  MIN, //< Solve as minimization problem
376  MAX //< Solve as maximization problem
377  };
378  protected:
387 
389  int _optVar;
392 
395 
397  unsigned int _lns;
398 
401 
404 
406  FlatZincSpace(bool share, FlatZincSpace&);
407  private:
409  template<template<class> class Engine>
410  void
411  runEngine(std::ostream& out, const Printer& p,
412  const FlatZincOptions& opt, Gecode::Support::Timer& t_total);
414  template<template<class> class Engine,
415  template<template<class> class,class> class Meta>
416  void
417  runMeta(std::ostream& out, const Printer& p,
418  const FlatZincOptions& opt, Gecode::Support::Timer& t_total);
419  void
420  branchWithPlugin(AST::Node* ann);
421  public:
426 
429 
431  std::vector<bool> iv_introduced;
433  int* iv_boolalias;
439  std::vector<bool> bv_introduced;
440 #ifdef GECODE_HAS_SET_VARS
446  std::vector<bool> sv_introduced;
447 #endif
448 #ifdef GECODE_HAS_FLOAT_VARS
454  std::vector<bool> fv_introduced;
455 #endif
456  bool needAuxVars;
459  FlatZincSpace(FznRnd* random = NULL);
460 
462  ~FlatZincSpace(void);
463 
465  void init(int intVars, int boolVars, int setVars, int floatVars);
466 
468  void newIntVar(IntVarSpec* vs);
470  void aliasBool2Int(int iv, int bv);
472  int aliasBool2Int(int iv);
474  void newBoolVar(BoolVarSpec* vs);
476  void newSetVar(SetVarSpec* vs);
478  void newFloatVar(FloatVarSpec* vs);
479 
481  void postConstraints(std::vector<ConExpr*>& ces);
482 
484  void solve(AST::Array* annotation);
486  void minimize(int var, bool isInt, AST::Array* annotation);
488  void maximize(int var, bool isInt, AST::Array* annotation);
489 
491  void run(std::ostream& out, const Printer& p,
492  const FlatZincOptions& opt, Gecode::Support::Timer& t_total);
493 
495  void print(std::ostream& out, const Printer& p) const;
496 
499  void compare(const Space& s, std::ostream& out) const;
502  void compare(const FlatZincSpace& s, std::ostream& out,
503  const Printer& p) const;
504 
513  void shrinkArrays(Printer& p);
514 
516  Meth method(void) const;
517 
519  int optVar(void) const;
521  bool optVarIsInt(void) const;
522 
532  void createBranchers(AST::Node* ann,
533  int seed, double decay,
534  bool ignoreUnknown,
535  std::ostream& err = std::cerr);
536 
538  AST::Array* solveAnnotations(void) const;
539 
541  BranchInformation branchInfo;
542 
544  virtual void constrain(const Space& s);
546  virtual Gecode::Space* copy(bool share);
547 
548  virtual bool slave(const CRI& cri);
549 
551 
552  IntArgs arg2intargs(AST::Node* arg, int offset = 0);
555  IntArgs arg2boolargs(AST::Node* arg, int offset = 0);
557  IntSet arg2intset(AST::Node* n);
559  IntSetArgs arg2intsetargs(AST::Node* arg, int offset = 0);
561  IntVarArgs arg2intvarargs(AST::Node* arg, int offset = 0);
563  BoolVarArgs arg2boolvarargs(AST::Node* arg, int offset = 0, int siv=-1);
565  BoolVar arg2BoolVar(AST::Node* n);
567  IntVar arg2IntVar(AST::Node* n);
569  bool isBoolArray(AST::Node* b, int& singleInt);
570 #ifdef GECODE_HAS_SET_VARS
571  SetVar arg2SetVar(AST::Node* n);
574  SetVarArgs arg2setvarargs(AST::Node* arg, int offset = 0, int doffset = 0,
575  const IntSet& od=IntSet::empty);
576 #endif
577 #ifdef GECODE_HAS_FLOAT_VARS
578  FloatValArgs arg2floatargs(AST::Node* arg, int offset = 0);
581  FloatVar arg2FloatVar(AST::Node* n);
583  FloatVarArgs arg2floatvarargs(AST::Node* arg, int offset = 0);
584 #endif
585  IntConLevel ann2icl(AST::Node* ann);
588  };
589 
592  private:
593  const std::string msg;
594  public:
595  Error(const std::string& where, const std::string& what)
596  : msg(where+": "+what) {}
597  const std::string& toString(void) const { return msg; }
598  };
599 
606  FlatZincSpace* parse(const std::string& fileName,
607  Printer& p, std::ostream& err = std::cerr,
608  FlatZincSpace* fzs=NULL, FznRnd* rnd=NULL);
609 
616  FlatZincSpace* parse(std::istream& is,
617  Printer& p, std::ostream& err = std::cerr,
618  FlatZincSpace* fzs=NULL, FznRnd* rnd=NULL);
619 
620 }}
621 
622 #endif
623 
624 // STATISTICS: flatzinc-any
Restart with linear sequence.
Definition: driver.hh:112
Gecode::Driver::IntOption _solutions
How many solutions.
Definition: flatzinc.hh:209
int floatVarCount
Number of float variables.
Definition: flatzinc.hh:384
void value(int v)
Set default value to v.
Definition: options.hpp:62
Passing float arguments.
Definition: float.hh:937
Options for running FlatZinc models
Definition: flatzinc.hh:205
Gecode::ScriptMode mode(void) const
Definition: flatzinc.hh:310
Gecode::Support::RandomGenerator random
The actual random number generator.
Definition: flatzinc.hh:357
IntConLevel
Consistency levels for integer propagators.
Definition: int.hh:937
The shared handle.
Definition: core.hpp:79
#define GECODE_FLATZINC_VERSION
Definition: config.hpp:48
unsigned int restart_scale(void) const
Definition: flatzinc.hh:319
Gecode::Driver::UnsignedIntOption _time
Cutoff for time.
Definition: flatzinc.hh:218
Gecode::Driver::BoolOption _allSolutions
Return all solutions.
Definition: flatzinc.hh:210
#define GECODE_HAS_SET_VARS
Definition: config.hpp:78
void value(double v)
Set default value to v.
Definition: options.hpp:112
ScriptMode
Different modes for executing scripts.
Definition: driver.hh:98
Gecode::Driver::UnsignedIntOption _r_scale
Restart scale factor.
Definition: flatzinc.hh:222
Meth _method
Whether to solve as satisfaction or optimization problem.
Definition: flatzinc.hh:394
Boolean option.
Definition: driver.hh:269
#define GECODE_FLATZINC_EXPORT
Definition: flatzinc.hh:79
Handle for brancher.
Definition: core.hpp:1157
Passing float variables.
Definition: float.hh:966
void add(int v, const char *o, const char *h=NULL)
Add option value for value v, string o, and help text h.
Definition: options.cpp:121
unsigned int nogoods_limit(void) const
Definition: flatzinc.hh:321
int boolVarCount
Number of Boolean variables.
Definition: flatzinc.hh:382
Gecode::Driver::StringOption _restart
Restart method option.
Definition: flatzinc.hh:220
const char * output(void) const
Definition: flatzinc.hh:309
Gecode::Driver::BoolOption _free
Use free search.
Definition: flatzinc.hh:212
Integer variable array.
Definition: int.hh:741
Restart with Luby sequence.
Definition: driver.hh:113
Gecode::Driver::UnsignedIntOption _nogoods_limit
Depth limit for extracting no-goods.
Definition: flatzinc.hh:224
No restarts.
Definition: driver.hh:110
Gecode::Driver::BoolOption _stat
Emit statistics.
Definition: flatzinc.hh:231
unsigned int time(void) const
Definition: flatzinc.hh:307
A thread-safe random number generator.
Definition: flatzinc.hh:354
RestartMode
Different modes for restart-based search.
Definition: driver.hh:109
Gecode::Driver::UnsignedIntOption _a_d
Adaptive recomputation distance.
Definition: flatzinc.hh:215
Float variable array.
Definition: float.hh:1016
Computation spaces.
Definition: core.hpp:1362
String-valued option.
Definition: driver.hh:151
Gecode::Driver::DoubleOption _decay
Decay option.
Definition: flatzinc.hh:213
void add(Driver::BaseOption &o)
Add new option o.
Definition: options.cpp:264
GECODE_FLATZINC_EXPORT FlatZincSpace * parse(const std::string &fileName, Printer &p, std::ostream &err=std::cerr, FlatZincSpace *fzs=NULL, FznRnd *rnd=NULL)
Parse FlatZinc file fileName into fzs and return it.
void value(unsigned int v)
Set default value to v.
Definition: options.hpp:95
double threads(void) const
Definition: flatzinc.hh:301
double decay(void) const
Definition: flatzinc.hh:314
A mutex for mutual exclausion among several threads.
Definition: thread.hpp:99
unsigned int node(void) const
Definition: flatzinc.hh:305
Gecode::Support::Mutex mutex
A mutex for the random number generator.
Definition: flatzinc.hh:359
const BoolInstr * bi[]
Definition: mm-bool.cpp:4169
void value(int v)
Set default value to v.
Definition: options.hpp:78
int p
Number of positive literals for node type.
Definition: bool-expr.cpp:236
Gecode::IntArgs i(4, 1, 2, 3, 4)
int n
Number of negative literals for node type.
Definition: bool-expr.cpp:238
Gecode::Driver::StringOption _mode
Script mode to run.
Definition: flatzinc.hh:230
Options opt
The options.
Definition: test.cpp:101
unsigned int c_d(void) const
Definition: flatzinc.hh:303
Print solution and some statistics.
Definition: driver.hh:99
Value description class for branching.
Definition: float.hh:1372
Gecode::Driver::UnsignedIntOption _fail
Cutoff for number of failures.
Definition: flatzinc.hh:217
int _optVar
Index of the variable to optimize.
Definition: flatzinc.hh:389
Output support class for FlatZinc interpreter.
Definition: flatzinc.hh:111
Base class for script options.
Definition: driver.hh:291
FznRnd * _random
Random number generator.
Definition: flatzinc.hh:400
void print(const BrancherHandle &bh, int a, int i, int n, std::ostream &o) const
Output branch information.
Definition: flatzinc.cpp:292
const std::string & toString(void) const
Definition: flatzinc.hh:597
Error(const std::string &where, const std::string &what)
Definition: flatzinc.hh:595
Unsigned integer option.
Definition: driver.hh:229
Template for linear congruential generators.
Definition: random.hpp:50
Integer sets.
Definition: int.hh:171
Passing integer variables.
Definition: int.hh:636
Passing integer arguments.
Definition: int.hh:607
Passing Boolean variables.
Definition: int.hh:690
Gecode::Driver::IntOption _seed
Random seed.
Definition: flatzinc.hh:219
virtual void help(void)
Print help text.
Definition: flatzinc.hh:292
bool _optVarIsInt
Whether variable to optimize is integer (or float)
Definition: flatzinc.hh:391
RestartMode restart(void) const
Definition: flatzinc.hh:315
Boolean variable array.
Definition: int.hh:786
Boolean integer variables.
Definition: int.hh:491
void parse(int &argc, char *argv[])
Parse options from arguments argv (number is argc)
Definition: options.cpp:331
BrancherHandle bh
String-valued option (integer value defined by strings)
Definition: driver.hh:174
void print(std::basic_ostream< Char, Traits > &s, bool assigned, IL &lb, IU &ub, unsigned int cardMin, unsigned int cardMax)
Print set view.
Definition: print.hpp:67
Gecode::Driver::BoolOption _interrupt
Whether to catch SIGINT.
Definition: flatzinc.hh:225
Passing set variables.
Definition: set.hh:490
double restart_base(void) const
Definition: flatzinc.hh:318
Print statistics for script.
Definition: driver.hh:101
BranchInformation(void)
Constructor.
Definition: flatzinc.cpp:272
Gecode::Driver::DoubleOption _r_base
Restart base.
Definition: flatzinc.hh:221
Set variables
Definition: set.hh:129
void value(const char *v)
Set default value to v.
Definition: options.cpp:96
Restart with geometric sequence.
Definition: driver.hh:114
Gecode::Driver::BoolOption _nogoods
Whether to use no-goods.
Definition: flatzinc.hh:223
void init(void)
Initialise for use.
Definition: flatzinc.cpp:279
Integer variables.
Definition: int.hh:350
Gecode::Driver::DoubleOption _threads
How many threads to use.
Definition: flatzinc.hh:211
Exception class for FlatZinc errors
Definition: flatzinc.hh:591
AST::Array * _solveAnnotations
Annotations on the solve item.
Definition: flatzinc.hh:403
bool allSolutions(void) const
Definition: flatzinc.hh:300
Gecode::Driver::UnsignedIntOption _c_d
Copy recomputation distance.
Definition: flatzinc.hh:214
Run script in Gist.
Definition: driver.hh:102
void value(bool v)
Set default value to v.
Definition: options.hpp:128
#define GECODE_HAS_FLOAT_VARS
Definition: config.hpp:57
Float variables.
Definition: float.hh:857
A space that can be initialized with a FlatZinc model.
Definition: flatzinc.hh:371
Set variable array
Definition: set.hh:571
CompareStatus compare(I &i, J &j)
Check whether range iterator i is a subset of j, or whether they are disjoint.
Gecode::Driver::StringValueOption _output
Output file.
Definition: flatzinc.hh:232
struct Gecode::@518::NNF::@57::@58 b
For binary nodes (and, or, eqv)
Gecode toplevel namespace
int setVarCount
Number of set variables.
Definition: flatzinc.hh:386
int intVarCount
Number of integer variables.
Definition: flatzinc.hh:380
#define GECODE_VTABLE_EXPORT
Definition: support.hh:76
A node in a FlatZinc abstract syntax tree.
Definition: ast.hh:71
unsigned int fail(void) const
Definition: flatzinc.hh:306
Gecode::Driver::UnsignedIntOption _node
Cutoff for number of nodes.
Definition: flatzinc.hh:216
unsigned int _lns
Percentage of variables to keep in LNS (or 0 for no LNS)
Definition: flatzinc.hh:397
FlatZincOptions(const char *s)
Constructor.
Definition: flatzinc.hh:236
Restart with constant sequence.
Definition: driver.hh:111
Integer option.
Definition: driver.hh:209
struct Gecode::@518::NNF::@57::@59 a
For atomic nodes.
void parse(int &argc, char *argv[])
Definition: flatzinc.hh:283
void add(const BrancherHandle &bh, const std::string &rel0, const std::string &rel1, const std::vector< std::string > &n)
Add new brancher information.
Definition: flatzinc.cpp:285
unsigned int a_d(void) const
Definition: flatzinc.hh:304
virtual void help(void)
Print help text.
Definition: options.cpp:284