Bar Cutting


The code is not publicly available at this stage. It can be shared upon request. Please feel free to contact us If you wish to receive a sample.

Initial Page

Here, you can select which of the two cases you wish to execute, then click on the RUN button.

This will trigger:

  •  The loading of the selected data set (case 1/Case 2 or Case 3) 
  • Then the execution of the two algorithms: Baseline and Optim and the results get displayed. The loss is displayed in blue on the bar chart.

In the display below, you can set that the baseline algorithm used 4 mother bars with the respective lengths of 5000, 4000, and 2 bars of length 2500. The colors represent the length of the respective customer bars (except for the blue color that represents the loss). This graph provides a simple visual representation of the cutting patterns.

By switching from one model to the other, you can already notice visually that the loss using the baseline algorithm seems much worse than the loss obtained with the Optim algorithm.
For more information, you can open the Parameters panel (Taipy Expandable) to look at the input data for the chosen case (here Case 1):

You can see the stock (mother bars available for cutting) as well as the demand.


On this page, you can see the metrics of the baseline model and the Optim Model with different representations (bar charts, pie charts). The two metrics display the loss either as a percentage of the overall length used (mother bars) or as the actual value of the loss (in mm).

Comparing Models

By clicking on the balance icon on the left panel, you will get to another page displaying the performance of the 2 models side by side.

Comparing scenarios

By clicking on the balance icon on the left panel, you will be able to compare for the 2 use cases (scenarios) the performance of each model. 


The results are summarized and displayed in a table that can be downloaded as a CSV file.