Differences
This shows you the differences between two versions of the page.
Both sides previous revision
Previous revision
|
Next revision
Both sides next revision
|
en:dydaktyka:csp:lab2 [2018/03/24 19:42] msl [Stable Marriage Problem] |
en:dydaktyka:csp:lab2 [2018/03/24 19:43] msl [Reified Constraints] |
===== Reified Constraints ===== | ===== Reified Constraints ===== |
| |
[[https://en.wikipedia.org/wiki/Reification|Reification]] in Constraint Programming means treating the constraint as a first-order citizen, i.e. you can use the constraint as a boolean value in your model. If you've used the ''bool2int'' function in the Magic Sequence problem, you could do that only because the constraint ''='' has been reified. Reification allows as to create models with "soft constraints" or "conditional constraints", i.e. one constraint has to be satisfed only if the second one is satisfied too, otherwise they both can ignored. To do that, one has only to reify the constraints and connect them with the implication: ''constraint1 -> constraint2''. Let's practice this quite useful technique :) | [[https://en.wikipedia.org/wiki/Reification|Reification]] in Constraint Programming means treating the constraint as a first-order citizen, i.e. you can use the constraint as a boolean value in your model. If you've used the ''bool2int'' function in the Magic Sequence problem, you could do that only because the constraint ''='' has been reified. Reification allows us to create models with "soft constraints" or "conditional constraints", i.e. one constraint has to be satisfed only if the second one is satisfied too, otherwise they both can be ignored. To do that, one has only to reify the constraints and connect them with the implication: ''constraint1 -> constraint2''. Let's practice this quite useful technique :) |
| |
==== Stable Marriage Problem ===== | ==== Stable Marriage Problem ===== |