<story><title>Constraint Programming (2020)</title><url>https://mareknarozniak.com/2020/06/22/constraint-programming/</url></story><parent_chain></parent_chain><comment><author>csdvrx</author><text>Constraint programming (and constraint propagation) is highly underrated.&lt;p&gt;For those not familiar with it yet, this is what&amp;#x27;s used under the hood by things like systemd: you give a bunch of constraints (ex: service A before service B, service B before service D but after service C, etc) and you get a solution (or none, but that&amp;#x27;s another story: when there are no solution, you can try to relax some constraints)&lt;p&gt;If you want to learn more, I suggest playing with Z3 from Microsoft Research: a nice tutorial is &lt;a href=&quot;https:&amp;#x2F;&amp;#x2F;ericpony.github.io&amp;#x2F;z3py-tutorial&amp;#x2F;guide-examples.htm&quot; rel=&quot;nofollow&quot;&gt;https:&amp;#x2F;&amp;#x2F;ericpony.github.io&amp;#x2F;z3py-tutorial&amp;#x2F;guide-examples.htm&lt;/a&gt;</text></comment>
<story><title>Constraint Programming (2020)</title><url>https://mareknarozniak.com/2020/06/22/constraint-programming/</url></story><parent_chain></parent_chain><comment><author>binkHN</author><text>I took a similar approach with a somewhat complicated scheduling requirement across dates and times. I originally brute forced the problem, but the solution was a bit inelegant and not ideal. When I used constraint programming to solve the same problem, it took me a little longer to devise the solution, but the result was superior. Also, the constraint programming solution is a little more memory intensive, but a necessary proper solution.</text></comment>