2013-05-13 23:06:02 PDT in JaCoP
Hi! You can use several methods to do that. Check JaCoP examples that contain one method. For example, encapsulating code in the following parts will measure real-time of the program execution. long T1, T2; T1 = System.currentTimeMillis(); // here the code you want to measure execution time T2 = System.currentTimeMillis(); System.out.println("\n\t*** Execution...
2013-05-03 01:17:11 PDT in JaCoP
Hi! Unfortunately I have no time to look at this problem but I guess Radek, who knows more on Geost can comment as well. My advice is following. First, since you consider 2-D rectangles you might use Diff2 instead. This constraint has better pruning capabilities. Moreover, your search simply combines all variables and tries to solve the problem. You might consider SimpleMatrixSelect or...
2013-04-23 00:28:07 PDT in JaCoP
Obviously there is the same mistake since it has been re-coded from Java version.
2013-04-16 03:04:23 PDT in JaCoP
Hi! I have to say that I do not really understand what you are doing and how you interface with existing search but the search does backtrack when a domain becomes empty. This is achieved by checking the return value from consistency method. If consistency returns false the backtrack occurs. Basically the search removes all variables created on the current level and decreases the level for...
2013-04-10 03:20:08 PDT in JaCoP
First, the store level is NEVER increased when solver backtracks. It is in fact decreased. The store level is decreased and all data generated by the annulated decision are removed. The difference between number of wrong decisions and a number of backtracks is very subtle. The wrong decisions are are increased when the solver makes a new decision on setting a value to a variable and this...
2013-04-04 04:15:40 PDT in JaCoP
2013-02-28 23:35:20 PST in JaCoP
Hi! JaCoP can read models (constraints and a search definition) in flatzinc format. This format is generated by compiling minizinc. JaCoP reads the model poses all constraints and solves the model. This is implemented in JaCoP.fz package and you call method Fz2jacop. You may need to make changes in this package if you want to use it for your purpose since we use it from a command line for...
2013-02-24 06:21:13 PST in JaCoP
Hi! Do you check if your search succeeded? Do you check whether labeling method of DepthFirstSearch returns true?Your printout-out of the store suggests that there are still constraints for evaluation, that means that your search has finished with unconsistent store and your problem has **no solution**. To make it short. Check what is returned by labeling method and continue only if the...
2013-02-23 05:09:21 PST in JaCoP
Hi Luka, In your program, you minimize cost variable using statement Result = label.labeling(store, select, cost); Just remove variable cost from the search and you will be able to search for all solutions or a specific solution. Regards, /Kris.
2013-02-13 02:37:24 PST in JaCoP