Claudio Cesar de Sá wrote:
> For the extensive tests in a Gecode program, two doubts:
>
> 1. For data input I will be using an external file. Such the execution in
> Linux console works like:
>
> clau...@goedel:~$ ./my-executable < input.txt
>
> I have the idea how it works in C. Any modification in main( .... argc , argv
> ....) for Gecode to use it?
That's not really a Gecode question. The main function doesn't work any
differently from any other C or C++ program, so you can do the same things
there.
> 2. In my program I need all the outputs.
> opt.solutions(0); // all solutions ===> OK it's fine
> but I would like to collect them, one by one, and processing them.
>
> I think to process them inside on print(std::ostream& os) const ... is it
> correct?
>
> Should be best to write in a file and following by a pos processing or
> filtering, in another program ?
>
> Surely someone already done it before.
You can either print all solutions and post process them, or use the search
engines directly without the Driver infrastructure (see the tutorial
documentation, Section 2.2 and 9.4).
Cheers,
Guido
--
Guido Tack, http://people.cs.kuleuven.be/~guido.tack/
_______________________________________________
Gecode users mailing list
[email protected]
https://www.gecode.org/mailman/listinfo/gecode-users