Cover the board with the right shapes using Pyomo.
Alireza Soroudi, PhD
Lead Data Scientist @ bluecrux || SMIEEE || Optimization expert || Healthcare management || Lab Digitalization || Power and Energy systems || Developer || Author / Speaker || (views are mine)
Consider the following 10*10 board. There are 6 distinct shapes that you need to use to cover the board (as far as possible). The following rules should be respected:
The idea is simple ! Each cell should not be covered more than once . But how to write it mathematically?
if we put a shape s on cell i (there are N^2 cells) it will cover some specific cells j
We can store these cells for each individual (i,s) and call it cover (it is a dictionary in python)
Here is the problem formulation: (it is mixed integer linear )
Here is the Pyomo code: (solved with CBC solver and visualised in Matplotlib)
for a 20*20 board:
The applications:
Subscribe to the?Newsletter?to have access to the upcoming posts and follow?#pyomo4all?for more!
You may also contact?me?!
Infrastructure specialist. at Graphcore UK.
2 年I guess if you had large sheets of plywood and assorted shapes to cut out then a similar technique could be used to minimise wastage? But that's a different problem :-) Interesting.
Realtor Associate @ Next Trend Realty LLC | HAR REALTOR, IRS Tax Preparer
2 年Thanks for Sharing.
Lead Design Engineer | Machine Learning | Deep Learning | Computer Vision | Data Analysis | Statistics | Decision Making | Science engineer | Researcher
2 年??