Community: Inventory and MRP mailing list archives


Re: MRP + "Cutting stock Problem/Guillotine cut" Solver

Arjan Duijs
- 12/03/2015 09:05:27
Cheers Eva and Graeme,
I have been a developer for 20 years but the complexity of this problem i have never encountered before.
Like Graeme said, many papers can be found and no perfect solution.

But on the contrary graeme said, we do not keep stock. Since there are too many options in melamine/laminates (and their suppliers) we simply only buy on demand.
Its for that we want to know how many sheets will be used when an order is placed. (thats more important for us then how its cut perfectly)

So with ll the responds in mind i came to the following idea on how best tackle this problem.
with the configurator Ana pointed out, the modifications from gustavo (dimensions) i can solve my challenge #2.
- (only need it to work under v9)

About the cutting stock problem solution. the short term (easiest) solution would be to continue using the "cutting optimazation pro" software.
The software opens and saves XML files of all the parts. So with the dimensions addon in place, i could write something that generates that XML file from all the parts within a SO/Project and use that files to optimize the cuts.

Or, even more simply. not defining any parts and simply define just the end product. for example. office desk - needs 0.7 sheets of MDF. and keep all the parts separate in an XML file.  (this is only against the re-usable parts idea)

2015-12-03 1:37 GMT-05:00 Graeme Gellatly <>:
Yep agree with Eva,

I've spent most of my life in metals one way or the other and implementation of cutting algorithms is hugely complex.  Not so much for 1D, that is largely solved, but 2D and beyond is still very hard and often situation specific.  Moreover, there is no one algorithm, what if you have a guillotine constraint for example in 2D, what if there aren't preset shapes, what if you need a rough cut or a smooth cut, what if the blade is 2mm wide on one machine and 1mm on another?  What if there is deviation of +- 0.5mm on the straightness of cut?  Also if more cuts means better use of material, is that a good thing or a bad thing?  The answer lies in cost of maintenance, time to cut, cost of labour and cost of material and whether waste can be reused in other products.  The most optimal pattern for waste is often not the most optimal for cost.  Many PhD's have been earned doing this.

We simply measure it, normalize the distribution of waste by machine and make sure we hold stock for the lead time of a 3rd standard deviation of excess use.

I really can't see how one could produce a one size fits all cutting algorithm anyway, but I suppose if I ever think of it I'll get me a PhD.

On Thu, Dec 3, 2015 at 6:52 PM, Eva Pinter @ Openit <> wrote:

Hello Arian,

Having worked in the metal industry, I had exactly this issue to solve. I would like to say, do not underestimate the effort of programming a cutting application. Even, when implementig SAP, most companies sticked to specialized cutting applications, as the requirements are mostly more complex then it looks like, looking at the screenshot and those specialised app calculate automatically the weight or surface of the material that is unused.

So, instead of starting with replacing the cutting application, I would encourage you to send all the work orders with cutting to the cutting optimization program. You also would need to create configurable raw material with thickness, wood type, length and width and propably weight per m2.

You will then need to assume that the quantity of wood used is the quantity in the BOM, as it’s not worth it to have the exact calculation. 

You will either have a cut done fully automatically or manually.

For automatic cut, it’s interesting to have an interface/feedback from the cutting software allowing you to mark the work order done and to also confirm the used quantity. It’s important that you know what will happen with unused surface. Can it be reused for a follow-up production, or will it be scrapped?

In terms of product costing, you can only do an approximation of the sheet used. Best is to calculate an average lost surface per m2 used. then, you add this cost to every cutting work order. In the metal industry, we used to have up to 45% loss to be scrapped. But we would not scrap it, instead, we would resell it, so that we also had to manage the remaining quantities that became products to sell.

In conclusion, I encourage you to contact Ana and the Manufacturing group of OCA to write down the full business processes with all implications (product flow, costs, mfg orders) and develop a step by step approach to the cutting issue.

Good luck!
Eva P.

On 2 Dec 2015, at 21:42, Arjan Duijs <> wrote:

and now the attachments which i forgot

2015-12-02 16:36 GMT-05:00 Arjan Duijs <>:
Its indeed quite similar, but there is a difference between 1d (cutting bars and stripes) and 2d cutting stock problem (paper/metal/wood sheets)
Right now i am using a standalone program called "cutting optimization pro"
its does all the work it needs to do, but isnt integrated in odoo.
Attached are some screenshots.
first is a list of all the pieces needed for a product(s)/order
then after pressing the start button, it checks against the stock for material and generates the optimized layout for cutting.
which you can see in the other screenshot..

Your forked odoomrp addons are v9 ready?

I finally have a v9 up and running and am quite pleased with it, so i rather help on convert things then go back to v8 :)

2015-12-02 14:17 GMT-05:00 Gustavo Marino <>:
In the github you can find several modules that improve the product configurator of odoomrp.

They are still work in progress, but I think they can help

Basically the advanced configurator extends the idea of attributes to product_template, product and category. That means you can set an attribute as a string, a numeric value, a numeric values with minimun and maximun or a product or category

Additionally it adds the possibility to show the user text explaining what to select or images for each option

In the case of complex scenarios, it will trigger python code on product configuration or onchange (at the user level, much like the old python code on taxes)

The advance configurator it will be used in a project (aluminium structures) currently in v6.1 with custom product configurator, that includes optimization on stripes (linear segments inside a fixed length stripe) and surfaces (cuts on policarbonate sheets)

The lineal and surface optimization is in production already for more than 4 years. Unfortunately, it was not programmed with the idea of a separated component. The configurator will be used for a future development on v8 or v9.

The idea is to treat cuts of the sheets or the stripes as segments, with a variant telling which is the base product. Cuts could also add additional attributes, like length or the type of the cut (45 degrees, -45 degrees, 90 degrees). At sourcing time you can collect all required segments with the same base product and optimize the number of cuts and sheets, and eventually you can generate the plan for the cutting machines

I believe your problem is quite similar

Get a try to the module. I will appreciate your comments

PD: Ana, many thanks for the OdooMRP. It is great. This modules are compatible (As far as I know!)

Gustavo Adrian Marino
Mobile:  +54 911 5498 2515
Skype: gustavo.adrian.marino
<img border="0" width="213" height="94" src="cid:image001.jpg@01CC37F5.99B4CD20" alt="Descripción: Numa Logo V 1-0">

2015-12-02 12:32 GMT-03:00 Ana Juaristi <>:
Using OdooMRP modules "product configurator" and generic boms with templates could solve part of your problems. But the "cutting" thing would be not solved yet. 

You can find the modules in OCA community branches or OdooMRP project in Github. Modules has been built for V8 and we did not start the task of migrating them but maybe they could be usefull if you decide to start with.

You can also see the youtube odoomrp channel where several videos has been published about product configurator and generic boms.

Wishing this helps:


2015-12-02 16:22 GMT+01:00 Arjan Duijs <>:
Hi All,
I am implementing odoo v9 in a furniture factory.
There are a couple of challenges i am facing.

Hopefully somebody has some experience/advice with the following

1) Cutting stock problem / Guillotine cut (
When i define for example melamine furniture in MRP, the furniture is made up of certain pieces of melamine which i can put in a BOM.

Then when a order is placed, at one moment we want to know how many sheets of melamine we need to buy. (can be any combination of furniture and amount)
I can define each piece as a m2, but at the end this is inaccurate.(as well as plain vs wood grain direction).

So in a perfect world, accepting the SO would loop over the Boms needed  to determine the optimal cuts (and thus sheets necessary) for that order. then puts a PO for those sheets.
At the same time when it has generated that cuts, it places the output in a file that can be used in the CNC woodcutting machines (workstation).

2) Variable Material / Shared/multiple BoMs
Another challenge is on how to define all the furniture within odoo.
All the pieces of the furniture can be defined, except their material. (can be mdf+formica, melamine, mdf+veneer, mdf-painted, polyurethane) 
one option is to use (nested) boms.
the issue with that is that i need to define to manufacture all the pieces and all their variations. We have quite some suppliers so we definitively dont want to put all their melamine/formicas as a variant for each piece. (maintaining it would be a pain..)

I have looked into orderline variables, but that still needs a separate bom for each variable.
would have been ok if you were able to use multiple boms per product. A base-bom vor all the variants, and an additional variant specific BoM 

Any thoughts on this?


CEO Avanzosc, S.L : Office phone / Tfono oficina: (+34) 943 02 69 02
Ana Juaristi Olalde : Personal phone: 677 93 42 59. User/usuario skype: Avanzosc

El contenido de esta comunicación y de toda su documentación anexa es confidencial y se dirige exclusivamente a su destinatario. El uso no autorizado de esta información está prohibido por la legislación vigente. Si usted no es el destinatario le rogamos nos lo indique, no comunique su contenido a terceros y proceda a su destrucción. Disculpe las molestias que le haya ocasionado la recepción indebida de este e-mail. Sus datos figuran en un fichero cuyo titular es Avanzosc, S.L., a quien usted puede dirigirse para ejercer sus derechos de acceso, rectificación, cancelación y oposición en Klara Donea 13, 20720, Azkoitia (Gipuzkoa), Tef. 943 02 69 02 -

Komunikazio honen edukia eta dokumentazio erantsia konfidentziala da eta hartzaileak bakarrik jaso beharko luke. Indarrean dagoen legeriak debekatu egiten du bertan eskainitako informazioa baimenik gabe erabiltzea. Komunikazioa zuri iritsi bazaizu, baina zu ez bazara hartzailea, mesedez, guri jakinarazi, eta jasotako informazioa ez inori jakinarazi eta suntsitu. Barkatu okerreko email hau jasotzeak eragindako eragozpenak. Zure datuak Avanzosc, S.L. enpresaren fitxategietan sartuta daude. Zure datuak atzitzea eska dezakezu, bai eta, datuak zuzentzea, ezereztea eta tratamenduari aurka egitea ere. Horretarako, enpresara jo dezakezu, helbide honetan: Klara Donea 13 20720, Azkoitia (Gipuzkoa), telefonoa: 943 02 69 02 -
This message and all documents attached to it are confidential and intended only for the person or entity to which it is addressed. Any use of this information by unauthorised persons is prohibited under current legislation. If you received this message by error, please advise us, destroy it and refrain from communicating its contents to third parties. We apologise for any inconvenience receiving this email improperly may cause to you. Your personal data are included in a file owned by Avanzosc, S.L. If you want to exercise your rights of access, correction, erasure and objection you can contact the Controller at Klara Donea 13 20720, Azkoitia (Gipuzkoa), T: 943 02 69 02 –

Post to:

Post to:

<span id="cid:687A0D27-E5F8-4187-BA3B-4C9E07EAB7D5@Home"><2015-12-02_16-28-43.png><span id="cid:F308CDDD-B21E-49A6-9509-1967C392E530@Home"><2015-12-02_16-24-57.png>

Post to:

Post to: