45 int main(
int argc,
char** argv) {
50 opt.
parse(argc, argv);
53 cerr <<
"Usage: " << argv[0] <<
" [options] <file>" << endl;
54 cerr <<
" " << argv[0] <<
" -help for more information" << endl;
58 const char* filename = argv[1];
63 if (!strcmp(filename,
"-")) {
75 std::ofstream os(opt.
output());
77 std::cerr <<
"Could not open file " << opt.
output() <<
" for output."
81 fg->
run(os, p, opt, t_total);
84 fg->
run(std::cout, p, opt, t_total);
void shrinkArrays(Printer &p)
Remove all variables not needed for output.
Options for running FlatZinc models
void createBranchers(AST::Node *ann, int seed, double decay, bool ignoreUnknown, std::ostream &err=std::cerr)
Create branchers corresponding to the solve item annotations.
const char * output(void) const
void start(void)
Start timer.
int p
Number of positive literals for node type.
Output support class for FlatZinc interpreter.
GECODE_FLATZINC_EXPORT FlatZincSpace * parse(const std::string &fileName, Printer &p, std::ostream &err=std::cerr, FlatZincSpace *fzs=NULL)
Parse FlatZinc file fileName into fzs and return it.
int main(int argc, char **argv)
A space that can be initialized with a FlatZinc model.
void run(std::ostream &out, const Printer &p, const FlatZincOptions &opt, Gecode::Support::Timer &t_total)
Run the search.
Gecode toplevel namespace
const char * name(void) const
Return name of script.
void parse(int &argc, char *argv[])
AST::Array * solveAnnotations(void) const
Return the solve item annotations.