1

I cannot seem to figure out the best way to optimize the shoe manufacturing algorithm in order to minimize the costs in the company I work for.

Let me describe the problem a bit.

A customer makes the following order:

  • Size--Quantity
  • 36----100
  • 37----200
  • 38----300
  • 39----300
  • 40----200
  • 41----100

Now we have a list of moulds (contraint) which are available.

  • Size--Quantity
  • 35----1
  • 36----1
  • 37----2
  • 38----3
  • 39----3
  • 40----3
  • 41----2
  • 42----1

Our machine has 24 mould stations (or rather, 12 pairs, so let's just focus on '12' from now on).

Hence the problem is very simple, if we put these moulds on the machine:

  • Size--Quantity
  • 36----1
  • 37----2
  • 38----3
  • 39----3
  • 40----2
  • 41----1

In 100 turns worth of the moulds we will have the order finished.

HOWEVER, it is very rare that such a perfect example will be reality and so I was wondering how can I optimize the production based on the knowledge provided.

There are different types of moulds with varying quantities available (ie. specific mould/size combination). Orders can be very random (35 - 50, 36 - 11, 37 - 88, 39 - 14, 40 - 149, 41 - 231, 42 - 5 for example).

The optimization is to MINIMIZE THE CHANGING OF MOULDS on the machine. Basically we want to split the order into optimal sub-orders, where, preferably, we use whole machine, then switch to second part of the sub-order (change some moulds) and so forth until we get to the end of the order (there will always be some 'left-overs' which are just impossible to have a proper machine configuration and optimization for.

emihir0
  • 113

1 Answers1

0

This is a slick algorithm that will save your company money. I will describe the algorithm while I walk you through the code. But before that I would like to set the inputs and assumptions in this algorithm.

I.Customer Order enter image description here

II.No of Molds Available for the day. enter image description here

III. No of stations that can be mounted with molds: 12

IV. Time to make any pair of shoe by a mold = 20 minutes (this does not matter that much but would be helpful).

V. A mold can operate continuously without breakdown to make the shoes during a shift.

VI. Algroithm Description: All the orders of different shoe sizes are sorted from the highest demand to the lowest demand. All the stations get one each of each mold making its shoe. Thus the 8 stations will get one of 8 molds. The other 4 stations will be mounted with additional mold of the first four shoes of highest demand. As and when a shoe of size of lesser number to be made is done, it Is replaced with a mold of next higher order. For example, when shoe size 40 (whose demand is 30) is finished that particular station should be mounted with the next mold 41 ( No of Changeover = 1). Now the mold size 40 is already making shoe size of 40 now it gets additional output from the additional mold changed over to the station where 40 had just been completed. Similarly, when shoe size 41’ order is finished, now you have additional two stations that become ready to take the mold size 36. There is only one station according to our initial distribution which may be making shoe size 36. These are called operating number of molds (OPNOM in the code). Now you check if these two stations could take additional molds of 36. In our example 36 has 5 molds available. So the additional stations which became clear could be mounted with 2 more 36 size mold (No of changeovers = 2). Now the OPNOM according to our initial distribution is only one because 36 is the third from the lowest of customer demand. After adding these two additional 36 molds you now have the regular OPNOM making shoes of size 36 along the with two additional molds making shoes of size 36. Now after the full order of 70 is made, you have available 3 stations clear. The next higher shoe size is 39. OPNOM for this is 1 leaving space for two more. Now only two stations are mounted with 39 (No of Changeovers = 2). One station sits idle. When shoes of size 39 demand is finished, you move to the next shoe size of higher demand which is 42. Now four stations become clear to be mounted with additional molds of size 42. But the number of molds of size 42 available is only 2 of which all 2 are OPNOM (4 in the order of demand size). So at this point all four stations sit idle ( there are no change overs). After 42 is completed, the next mold of higher demand is 35. Now 6 stations become clear to receive additional molds. OPNOM for this is 2 and number of additional molds available is one. Only 1 station of of the six is mounted with mold size 35 ( No of Changeover = 1). After 35 is made, the next higher demand shoe size is 37. Now you have 8 stations that are set clear to receive molds. The OPNOM for 37 is two, available is 1, thus one more additional 37 mold is mounted on one of those 8 stations(No of Changeovers = 1). After 37 is completed, you have 10 stations that are set clear. The last shoe size is 38. OPNOM for this is 2, available is 4 leaving two extra molds that could be mounted at the two of the 10 free stations(No of Changeovers = 2). Finally 38 is completed and the whole customer order is done. If you add up all the no of changeovers, you get a minimum Changeovers of 9.

enter image description here

This algorithm could be tweaked with initial distribution of OPNOM. I tried but it did not improve the results if you had “No of Changeovers” is the critierion that you will have to minimize. You could improve the algorithm by the actual schedule when and what needs to be changedover and the total time of processing and idle time of stations. These are statistics that could help you further enhance the algrorithm to your liking.

I have written a EXCEL MACRO to achieve the desired result. Hopefully this algorithm is useful to you and your company.

The code for the same is Option Explicit

Dim Demand(1 To 8) As Double

Dim NOM(1 To 8) As Double

Dim OPNOM(1 To 8) As Double

Dim TOM As Double

Dim i, j, k, l As Integer

Dim Temp As Double

Dim temp1 As Double

Dim Changeover As Double

Dim Process1 As Double

Dim Process As Double

Private Sub cmdCalculate_Click() '***Read values Demand(1) = ComputeFV.D_35.Value

Demand(2) = ComputeFV.D_36.Value

Demand(3) = ComputeFV.D_37.Value

Demand(4) = ComputeFV.D_38.Value

Demand(5) = ComputeFV.D_39.Value

Demand(6) = ComputeFV.D_40.Value

Demand(7) = ComputeFV.D_41.Value

Demand(8) = ComputeFV.D_42.Value

NOM(1) = ComputeFV.MOLD35.Value

NOM(2) = ComputeFV.MOLD36.Value

NOM(3) = ComputeFV.MOLD37.Value

NOM(4) = ComputeFV.MOLD38.Value

NOM(5) = ComputeFV.MOLD39.Value

NOM(6) = ComputeFV.MOLD40.Value

NOM(7) = ComputeFV.MOLD41.Value

NOM(8) = ComputeFV.MOLD42.Value

TOM = ComputeFV.TOC.Value

'*** Sort Demand

For i = 1 To 7

For j = i To 8

If (Demand(i) <= Demand(j)) Then

Temp = Demand(i)

temp1 = NOM(i)

Demand(i) = Demand(j)

NOM(i) = NOM(j)

Demand(j) = Temp

NOM(j) = temp1

End If

Next

Next

'***.Intial Distribution of Molds to the Stations. OPNOM is begining

operating mold and NOM is the

'*** is the remaining available molds of any size.

For i = 1 To 8

OPNOM(i) = 1

NOM(i) = NOM(i) - 1

Next

For i = 9 To 12

If NOM(i - 8) > 0 Then

OPNOM(i - 8) = OPNOM(i - 8) + 1

NOM(i - 8) = NOM(i - 8) - 1

End If

Next

'*** Process is the amount of demand made by the initial setup. and Process1

is the amount of demand of any shoe size made

*** by additinal changeovers.

Changeover = 0

k = 0

j = 0

For i = 8 To 1 Step -1

Process = 0

Process1 = 0

10 For l = 1 To OPNOM(i)

Process = TOM + Process

Next

GoTo 40

20 For l = 1 To k

Process1 = TOM + Process1

Next

If Process1 + Process > Demand(i) * TOM Then

GoTo 50

40 If Process > Demand(i) * TOM Then

GoTo 30

Else:

GoTo 20

End If

50 j = j + k

GoTo 30

Else:

GoTo 10

30 End If

If i = 1 Then

GoTo 70

Else:

If (OPNOM(i) = 2) Then

k = k + 2

Else:

k = k + 1

End If

If (k > NOM(i - 1)) Then

k = NOM(i - 1)

Else: k = k

End If

End If

Next i

70 Changeover = j

ComputeFV.No_of_Changeovers.Value = Changeover

End Sub

Private Sub cmdClose_Click()

Unload ComputeFV

End Sub

Private Sub TextBox10_Change()

End Sub

Private Sub UserForm_QueryClose(Cancel As Integer, _

CloseMode As Integer)

If CloseMode = vbFormControlMenu Then

Cancel = True

MsgBox "Please use the button!"

End If

End Sub

  • Thanks a lot for the thorough reply! I did not expect someone to write the whole macro for this process as there are a few more omitted details (otherwise my post would be WAY too long). For instance 'time to change the moulds' or 'order already in production to take into consideration'. Nevertheless I'm quite confused by what exactly is TOM (time to operate). What does it achieve in the code? Moreover, I'm not used at all to the "GoTo" commands in VBA as I thought they were bad practise. In what part of the code would I "debug.print" in order to output info about WHEN/WHICH mould is changing? – emihir0 Sep 01 '15 at 11:49
  • Strangely enough when I input (1,2,3,3,2,1) as quantities to be produced and moulds available (1,2,3,3,2,1), it outputs the expected result (ie. 1 pair of each mould to be produced) - changeovers = 0. However, if I put order (100,200,300,300,200,100) - ie. 100 pairs of each size and the moulds available remain the same (1,2,3,3,2,1), I would expect changeovers = 0, but instead it is changeovers = 2. – emihir0 Sep 01 '15 at 12:02
  • How would you go about reversing the algorithm? Basically now it puts 1 of each mold at the start and then keeps changing them as required. How about "12 most demanded sizes" first? What I want to achieve is to have 1 mold each AT THE END so small re-orders they can be easily added (or if some pairs of specific size gets damaged). Now if, say, Size 40 (demand 30) gets damaged in the process, the moulds would need another changing at the end to procude the few damaged pairs again (ie. at the end, put size 40 mould back on to produce, say, 5 pairs). – emihir0 Sep 01 '15 at 14:58
  • Time to Operate is nothing but the time to make a shoe pair by the mold and the station. I started out making modules and did not quite understand your comment about "100 turns worth of molds" making the different customer orders. I have been a production guy worked in a pipe industry. Molds are mounted on the machine and chucks out pipes every 10 minutes for each pipe and runs for the whole shift without having to change unless it breaksdown. – Satish Ramanathan Sep 01 '15 at 15:31
  • contd.. A change over happens if you want to stop production of any type of pipe less than its capacity for a day and that you would want to changeover a different size of mold to produce some other pipe size (in this case I can relate the mold changing time and delay cost due to breakdown and others – Satish Ramanathan Sep 01 '15 at 15:31
  • Your question about 12 most demanded size may not be possible due to the maximum availability of molds of that particular shoe size. Nevertheless it is a wonderful idea. You can go about reversing and may be you can reduce the idle time by stations. – Satish Ramanathan Sep 01 '15 at 15:34
  • Initial distribution of OPNOM is rather tricky and you can change the code to accomodate but the principle remains the same. When something becomes available you use it for the next demanded pipe. I hated to use goto but did not quite understand your question first throughly and made adjustments based on my work ex. You can modularize process and process1 in order to avoid goto statements – Satish Ramanathan Sep 01 '15 at 15:38
  • Thank you, once again, for your great contribution and help! I might have omitted one important detail (it was "obvious" to me as I had no previous work experience in other factories). The 12 moulds are mounted on a circular machine, that means if a station is empty, it isn't simply "skipped". The time is still wasted (if it is skipped, then the material in other moulds does not have enough time to "ripe"). Basically the machine has to have 12 moulds on all the time (can be different orders). What I meant by "100 turns worth of molds" is basically "100 turns of the circular machine" ie. – emihir0 Sep 01 '15 at 20:37
  • if the setup of the moulds is (1,2,3,3,2,1) then if we run this machine for 100 "turns/circles" it will produce (100,200,300,300,200,100) pairs of a given shoe sizes. I will have to have a further look on how exactly does your algorithm achieves what it achieves as I had trouble understanding the GoTos. In either case, I will definitely be back with any progress I made. – emihir0 Sep 01 '15 at 20:40