Both sides previous revision
Previous revision
Next revision
|
Previous revision
Last revision
Both sides next revision
|
en:dydaktyka:csp:lab2 [2019/03/12 18:42] msl [Channeling] |
en:dydaktyka:csp:lab2 [2019/06/27 15:49] 127.0.0.1 external edit |
- Compare running time of the normal and channeled model | - Compare running time of the normal and channeled model |
- Add symmetry breaking to the problem by using ''lex_lesseq'' constraint on the different permutations of the ''qb'' array | - Add symmetry breaking to the problem by using ''lex_lesseq'' constraint on the different permutations of the ''qb'' array |
* below all permutations are calculated in MiniZinc, can you tell what symmetries they represent? | * below the assignments there is a code listing with all permutations calculated in MiniZinc, can you tell what symmetries they represent? |
| - Compare running time again |
| - Give yourself a [[https://youtu.be/kMUkzWO8viY|self-five]], <wrap lo>in this case, it may not improve the running time, but the technique itself is very useful in more complex problems</wrap> |
<code> | <code> |
array[int] of var bool: qb0 = array1d(qb); | array[int] of var bool: qb0 = array1d(qb); |
array[int] of var bool: qb7 = [ qb[j,i] | i,j in reverse(1..n) ]; | array[int] of var bool: qb7 = [ qb[j,i] | i,j in reverse(1..n) ]; |
</code> | </code> |
- Compare running time again | |
- Give yourself a [[https://youtu.be/kMUkzWO8viY|self-five]], <wrap lo>in this case, it may not improve the running time, but the technique itself is very useful in more complex problems</wrap> | |
| |
===== Reified Constraints ===== | ===== Reified Constraints ===== |