<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>constraint programming | DTAI Stories</title><link>https://dtai.cs.kuleuven.be/stories/tags/constraint-programming/</link><atom:link href="https://dtai.cs.kuleuven.be/stories/tags/constraint-programming/index.xml" rel="self" type="application/rss+xml"/><description>constraint programming</description><generator>Source Themes Academic (https://sourcethemes.com/academic/)</generator><language>en-us</language><lastBuildDate>Thu, 30 Jul 2026 17:14:00 +0200</lastBuildDate><image><url>img/map[gravatar:%!s(bool=false) shape:circle]</url><title>constraint programming</title><link>https://dtai.cs.kuleuven.be/stories/tags/constraint-programming/</link></image><item><title>CPMpy release and celebrations at FLOC26</title><link>https://dtai.cs.kuleuven.be/stories/post/tias-guns/cpmpy_release/</link><pubDate>Thu, 30 Jul 2026 17:14:00 +0200</pubDate><guid>https://dtai.cs.kuleuven.be/stories/post/tias-guns/cpmpy_release/</guid><description>&lt;p>CPMpy made its v1.0 release a week ago, and won multiple medals in the
&lt;a href="https://www.floc26.org/olympics" target="_blank" rel="noopener">FLoC Olympic Games&lt;/a> competitions.&lt;/p>
&lt;div style="text-align: center;">
&lt;figure id="figure-constraint-programming-and-modeling-in-python">
&lt;a href="https://github.com/CPMpy/cpmpy" target="_blank">
&lt;img data-src="https://dtai.cs.kuleuven.be/stories/stories/post/tias-guns/cpmpy_release/cpmpy_logo_hu2128660dda9467f2b93c849ddbdb802f_226482_2000x2000_fit_lanczos_3.png" class="lazyload" alt="CPMpy logo" width="55%" height="600">
&lt;/a>
&lt;figcaption>
Constraint Programming and Modeling in Python
&lt;/figcaption>
&lt;/figure>
&lt;p>
&lt;a href="https://github.com/CPMpy/cpmpy" target="_blank" rel="noopener">Code&lt;/a>
&lt;i class="fab fa-github pr-1 fa-fw">&lt;/i> ·
&lt;a href="https://cpmpy.readthedocs.io/" target="_blank" rel="noopener">Documentation&lt;/a>
&lt;i class="fas fa-book pr-1 fa-fw">&lt;/i> ·
&lt;a href="https://pypi.org/project/cpmpy/" target="_blank" rel="noopener">PyPI&lt;/a>
&lt;i class="fab fa-python pr-1 fa-fw">&lt;/i>&lt;/p>
&lt;/div>
&lt;!-- &lt;div class="alert alert-tip">
&lt;div>
&lt;strong>v1.0.0 is out!&lt;/strong> Install with &lt;code>pip install cpmpy&lt;/code>, or browse the
&lt;a href="https://github.com/CPMpy/cpmpy/releases" target="_blank" rel="noopener">release on GitHub&lt;/a>.
&lt;/div>
&lt;/div>
-->
&lt;p>Last week we were in Lisbon, Portugal for
&lt;a href="https://www.floc26.org/" target="_blank" rel="noopener">FLoC&lt;/a>, a co-located conference that included CP, SAT, KR, and seven other logic-based conferences.&lt;/p>
&lt;p>Just before the conference, the team managed to finish the v1.0.0 release of our
&lt;a href="https://github.com/CPMpy/cpmpy" target="_blank" rel="noopener">CPMpy&lt;/a> library for combinatorial optimisation. This library has been the foundation of my
&lt;a href="https://people.cs.kuleuven.be/~tias.guns/chat-opt.html" target="_blank" rel="noopener">ERC CHAT-Opt&lt;/a> project. We should have released a version 1 over 3 years ago, but we were too occupied with wanting to make it better and better&amp;hellip;&lt;/p>
&lt;p>As the CHAT-Opt project came to an end, it felt like the right moment to mark it with a 1.0.0 release (we still have plans to make it even better though). We celebrated the release with an official logo, and nice T-shirts featuring the logo that the team members were wearing. We were happy with the many encouraging words and conversations that followed!&lt;/p>
&lt;p>We were also honoured to receive a FLOC Olympic Games medal for our submission with
&lt;a href="https://developers.google.com/optimization" target="_blank" rel="noopener">OR-Tools CP-SAT&lt;/a> to the
&lt;a href="https://www.xcsp.org/competitions/" target="_blank" rel="noopener">XCSP3 competition&lt;/a>. We actually submitted eight different solvers to that competition. The role of CPMpy in such a submission is to efficiently take any instance, minimally modify it to match the solver API, and quickly pass that on to the solver. While this requires careful engineering, it is the solver itself that makes the biggest difference here. Hence, we were happy to take the medal, with no modifications needed, and pass it on to
&lt;a href="https://research.google/people/105821/?&amp;amp;type=google" target="_blank" rel="noopener">Laurent Perron&lt;/a> of the OR-Tools CP-SAT team : )&lt;/p>
&lt;p>Thanks to our team member &lt;a href="https://dtai.cs.kuleuven.be/stories/stories/authors/thomas-sergeys/">Thomas Sergeys&lt;/a>, we not only submitted multiple solvers to the XCSP3 competition, but we also submitted multiple solvers to the
&lt;a href="https://www.cril.univ-artois.fr/PB26/" target="_blank" rel="noopener">Pseudo-Boolean Competition&lt;/a> and to
&lt;a href="https://maxsat-evaluations.github.io/2026/" target="_blank" rel="noopener">MaxSAT Evaluation&lt;/a>. Here too, our submission with OR-Tools tended to perform best among our submissions, even resulting in 2 bronze medals in the XCSP3 COP track and 2 gold medals in the PseudoBoolean parallel DEC_LIN and OPT_LIN tracks!&lt;/p>
&lt;p>(The attentive reader might wonder why we &amp;lsquo;only&amp;rsquo; achieved bronze with cpmpy_ortools on XCSP3 COP, a track in which we achieved gold the past 2 years. The answer is as subtle as it is unfortunate: the competition awards solvers for how quickly they find intermediate solutions. However our submission accidentally buffered all these intermediate solutions throughout the entire solver&amp;rsquo;s runtime, only appearing all at once at the complete end. A simple mistake which we forgot to change during maintenance work&amp;hellip;)&lt;/p>
&lt;p>Finally, this year we not only submitted solvers, but we also used our new CPMpy tools &amp;lsquo;datasets&amp;rsquo; and &amp;lsquo;io&amp;rsquo; to submit instances from public benchmarks to different competitions, translated by CPMpy. If you want to read more about how we did that, check out our SAT Tool paper
&lt;a href="https://drops.dagstuhl.de/entities/document/10.4230/LIPIcs.SAT.2026.42" target="_blank" rel="noopener">Unified Programmatic Access to CO Benchmarks, to Connect Constraint Solving Communities&lt;/a>. We also submitted the real-world problem instances of our
&lt;a href="https://drops.dagstuhl.de/entities/document/10.4230/LIPIcs.CP.2025.6" target="_blank" rel="noopener">CP26 Best Application Paper&lt;/a> and a benchmark set derived from the
&lt;a href="https://aics.aau.at/saeling/" target="_blank" rel="noopener">SAELING&lt;/a> project in the metalworking industry to the
&lt;a href="https://www.minizinc.org/challenge/2026/" target="_blank" rel="noopener">MiniZinc Challenge&lt;/a>.&lt;/p>
&lt;p>All in all, it should be clear that I am immensely proud of what we have achieved with CPMpy over these past years. The release, the feedback and the awards are great recognition of that effort, and I want to wholeheartedly thank all the researchers that helped build CPMpy along the way.&lt;/p>
&lt;!--
&lt;div class="card relpub">
&lt;div class="card-body">
&lt;small>
&lt;p>This post is based on the following publications:&lt;/p>
&lt;ul>
&lt;li>
&lt;a href="https://drops.dagstuhl.de/entities/document/10.4230/LIPIcs.CP.2025.6" target="_blank" rel="noopener">Modeling and Explaining an Industrial Workforce Allocation and Scheduling Problem&lt;/a>. Bleukx, Ignace, Boumazouza, Ryma, Guns, Tias, Laage, Nadine, and Poveda, Guillaume, CP 2025 (Best Application Paper Award).&lt;/li>
&lt;li>
&lt;a href="https://drops.dagstuhl.de/entities/document/10.4230/LIPIcs.SAT.2026.42" target="_blank" rel="noopener">Unified Programmatic Access to CO Benchmarks, to Connect Constraint Solving Communities&lt;/a>. Sergeys, Thomas, Bleukx, Ignace, Guns, Tias, SAT 2026 (Tool paper).&lt;/li>
&lt;/ul>
&lt;/small>
&lt;/div>
&lt;/div>
--></description></item><item><title>Modelling and Explaining Workforce Allocation at Airbus with CPMpy</title><link>https://dtai.cs.kuleuven.be/stories/post/ignace-bleukx/modelling-and-explaining-workforce-allocation-at-airbus-with-cpmpy/</link><pubDate>Mon, 27 Apr 2026 16:31:21 +0200</pubDate><guid>https://dtai.cs.kuleuven.be/stories/post/ignace-bleukx/modelling-and-explaining-workforce-allocation-at-airbus-with-cpmpy/</guid><description>&lt;p>As part the EU project Tuples [1] we had the opportunity of collaborating with Airbus Toulouse on a challenging workforce allocation and scheduling problem. Everyday, planners at Airbus factories need to schedule and allocate logistical tasks to worker teams. These tasks are incredibly diverse and range from the transportation of aircraft components from one hangar to another to the loading and unloading of Beluga® cargo planes.&lt;/p>
&lt;div style="display:flex; justify-content:centerl; gap:16px; width:80%; margin:0 auto 1em auto;">
&lt;figure style="flex:1; margin:0;">
&lt;img src="beluga.jpg" alt="Beluga cargo plane" style="width:100%; height:200px; object-fit:cover; display:block;">
&lt;/figure>
&lt;figure style="flex:1; margin:0;">
&lt;img src="factory.jpg" alt="Airbus factory" style="width:100%; height:200px; object-fit:cover; display:block;">
&lt;/figure>
&lt;/div>
&lt;p>Timely execution of these tasks is essential for the operational efficiency of the factory. Indeed, any missed deadlines can cascade throughout the assembly lines and cause significant delays during production of the aircraft. The planning and allocation of these transportation tasks is mostly done by hand by an expert team of planners. They ensure that each task is executed on time, and by a worker team that has the required training for executing that task.&lt;/p>
&lt;p>Using our expertise in constraint optimization, we collaborated with the research team at Airbus to develop a reliable, trustworthy and explainable decision support system for the planners. More specifically, we developed algorithms that can (1) propose an efficient and fair initial schedule that satisfies all operational constraints and (2) can help in resolving operational disruptions throughout the day.&lt;/p>
&lt;h2 id="fair-and-efficient-schedules">Fair and Efficient Schedules&lt;/h2>
&lt;p>Using the open-source CPMpy constraint modelling library, we developed a Constraint Programming (CP) model to solve this large workforce-allocation and scheduling problem.
CP is a declarative approach for solving combinatorial problems, where the user models their problem using integer variables and constraints; after which a general-purpose constraint solver is used to find an optimal solution to the problem. This technology is perfectly suited for this problem as any solution computed by the solver is guaranteed to satisfy all operational constraints.&lt;/p>
&lt;p>Our model shares similarity with state-of the-art CP-models for flexible job-shop problems where the goal is to schedule a set of tasks onto a set of machines, where tasks cannot overlap. We used scheduling-specific global constraints, symmetry breaking techniques and a problem relaxation to efficiently find optimal solutions to the allocation and scheduling problem.
Unique to this use-case of workforce allocation are the objectives we aim to optimize. In traditional scheduling problems, it is common to minimize the makespan. However, for our problem, we construct a bi-objective optimization problem with the following objectives:&lt;/p>
&lt;ol>
&lt;li>Minimize the number of worker-teams used to execute the schedule&lt;/li>
&lt;li>Optimize fairness of the schedule, such that no team is needlessly overused or underused. The fairness is formulated as the “time-dispersion”, which is expressed formally as $max_{t \in Teams} (time_worked_t) - min_{t \in Teams} (time_worked_t)$&lt;/li>
&lt;/ol>
&lt;p>We experiment with two variants of the problem: a pure-allocation and an allocation+scheduling setting. In the pure allocation setting, planners first determine the start-times of each task, and use the CP-model to allocate the tasks to a team. This reflects their current workflow as tasks are scheduled given an order book for the coming planning period. In the allocation+scheduling setting, the solver is free to chose the start-time of each task, given its earliest start-time and deadline.&lt;/p>
&lt;p>Our experiments showed that using clever modelling techniques such as symmetry breaking constraints, most solvers can find optimal solutions for the pure-allocation setting when minimizing the number of teams in the schedule; and ILP solver Gurobi and Pseudo-Boolean solver Exact perform best among the solvers we tested.&lt;/p>
&lt;div style="display:flex; justify-content:center; align-items:stretch; gap:16px; width:100%;">
&lt;figure style="flex:1; margin:0;">
&lt;img src="allocation.svg" alt="Allocation results" style="width:100%; height:300px; object-fit:contain; display:block;">
&lt;/figure>
&lt;figure style="flex:1; margin:0;">
&lt;img src="scheduling_objective.svg" alt="Scheduling objective over time" style="width:100%; height:320px; object-fit:contain; display:block;">
&lt;/figure>
&lt;/div>
&lt;p>While truly optimal solutions with respect to the fairness objective are rarely found, experiments showed that fair schedules can be found within a couple of seconds using modern solvers. Indeed, the right plot shows the how the objectives change over time for the allocation+scheduling problem (the most difficult variant). Here we clearly see the objective decreases rapidly at the start of the solving process.&lt;/p>
&lt;figure >
&lt;a data-fancybox="" href="https://dtai.cs.kuleuven.be/stories/stories/post/ignace-bleukx/modelling-and-explaining-workforce-allocation-at-airbus-with-cpmpy/repair_hu00445bf75aacd3445091330222c180e6_201226_2000x2000_fit_lanczos_3.png" >
&lt;img data-src="https://dtai.cs.kuleuven.be/stories/stories/post/ignace-bleukx/modelling-and-explaining-workforce-allocation-at-airbus-with-cpmpy/repair_hu00445bf75aacd3445091330222c180e6_201226_2000x2000_fit_lanczos_3.png" class="lazyload" alt="" width="80%" height="1496">
&lt;/a>
&lt;/figure>
&lt;h2 id="explaining-and-resolving-disruptions">Explaining and Resolving Disruptions&lt;/h2>
&lt;p>In our research lab, we have been working on explainable constraint solving: we have studied methods not just for efficiently finding solutions, but also for explaining the answer of a constraint solver to a user.&lt;/p>
&lt;p>For this project, a big hurdle for the planners is to understand the consequences of a disruption and how to resolve them. Examples of disruptions are technical malfunctions or unexpectedly adverse weather conditions that cause a resource or worker team to be unavailable for a certain amount of time. Such disruptions are common and almost unavoidable.&lt;/p>
&lt;p>In collaboration with Airbus, we proposed a method to help the planners resolve disruptions by computing a new schedule which is as similar as possible to the initial schedule. More precisely, we compute a new schedule which (1) does not call in any extra teams; (2) minimizes the number of reallocated tasks and (3) minimizes the delay of tasks compared to the initial schedule.&lt;/p>
&lt;p>This ensures the repaired schedule impacts the least number of teams operating on the plant and reduces the cognitive load on the planners to interpret the newly computed schedule. Moreover, as the new schedule uses the original CP-model, the new schedule is guaranteed to satisfy all operational side-constraints as well.&lt;/p>
&lt;h2 id="acknowledgements">Acknowledgements&lt;/h2>
&lt;p>We are honoured that are work was recognized by the CP 2025 Best Application Award, and thank our collaborators at Airbus for this inspiring and fruitful collaboration.&lt;/p>
&lt;h2 id="references">References&lt;/h2>
&lt;ol>
&lt;li>Tuples | Trustworthy AI, Tuples.ai. (2023).
&lt;a href="https://tuples.ai/" target="_blank" rel="noopener">https://tuples.ai/&lt;/a>&lt;/li>
&lt;li>Bleukx, Ignace, Ryma Boumazouza, Tias Guns, Nadine Laage, and Guillaume Poveda. &amp;ldquo;Modeling and explaining an industrial workforce allocation and scheduling problem.&amp;rdquo; Leibniz International Proceedings in Informatics 340 (2025).‌&lt;/li>
&lt;/ol></description></item></channel></rss>