90
Design of Map to Build Carts and Allocate Products To: Ms. Kristine Komives, Associate Director Supply Chain/Materiel Services, Michigan Medicine Mr. Arnold Yin, Industrial Engineer, University of Michigan Health System Ms. Yuting Ding, Performance Improvement Fellow, Michigan Medicine Dr. Mark Van Oyen, Professor, Industrial and Operations Engineering Ms. Mary Duck, Staff Specialist, UMH QI Michigan Quality System, Michigan Medicine From: IOE 481 Project Team #9 Stephen Criel Maggie Hafers Taylor Martell Carrianna Voellm Date: April 17, 2018

University of Michiganioe481/ioe481_past_reports/18W09.… · Web viewThe Greedy algorithm output has three main limitations that the PAR Team should be aware of when using the algorithm

  • Upload
    others

  • View
    3

  • Download
    0

Embed Size (px)

Citation preview

Page 1: University of Michiganioe481/ioe481_past_reports/18W09.… · Web viewThe Greedy algorithm output has three main limitations that the PAR Team should be aware of when using the algorithm

Design of Map to Build Carts and Allocate Products

To: Ms. Kristine Komives, Associate Director Supply Chain/Materiel Services, Michigan MedicineMr. Arnold Yin, Industrial Engineer, University of Michigan Health SystemMs. Yuting Ding, Performance Improvement Fellow, Michigan MedicineDr. Mark Van Oyen, Professor, Industrial and Operations EngineeringMs. Mary Duck, Staff Specialist, UMH QI Michigan Quality System, Michigan Medicine

From: IOE 481 Project Team #9 Stephen Criel Maggie Hafers Taylor Martell Carrianna Voellm

Date: April 17, 2018

Subject: Final Report

18W9-final-report

Page 2: University of Michiganioe481/ioe481_past_reports/18W09.… · Web viewThe Greedy algorithm output has three main limitations that the PAR Team should be aware of when using the algorithm

Table of ContentsExecutive Summary.........................................................................................................................3

Project Design Iterations......................................................................................................3Design Methods for the Greedy Algorithm and VBA Program..........................................3

Greedy Algorithm and VBA Program Findings and Conclusions.......................................4Model Output.......................................................................................................................4Recommendations for Future Development........................................................................5Expected Impact...................................................................................................................5

Introduction......................................................................................................................................6Background......................................................................................................................................6Key Issues........................................................................................................................................7Goals and Objectives.......................................................................................................................8Project Scope...................................................................................................................................8Project Design Iterations..................................................................................................................8Linear Program Methods, Findings, and Conclusions.....................................................................8Integer Program Methods, Findings, and Conclusions....................................................................9Greedy Algorithm and Integer Program Methods, Findings, and Conclusions...............................9

Simplified Integer Program................................................................................................10Reason for VBA Code for Greedy Algorithm...................................................................11

Design Methods, Requirements, Constraints, and Standards for the Greedy Algorithm and VBA Program..........................................................................................................................................11

Greedy Algorithm Description..........................................................................................11Greedy Algorithm Challenges...............................................................................11

VBA Program Description.................................................................................................11VBA Program Excel Output..................................................................................12VBA Program Challenges......................................................................................12

Design Requirements (Soft Constraints)...........................................................................12Soft Constraints on Greedy Algorithm..................................................................12Soft Constraints on VBA Program........................................................................13

Hard Constraints on the Design.........................................................................................13 Hard Constraints on Greedy Algorithm.................................................................13 Hard Constraints on VBA Program.......................................................................13

Standards............................................................................................................................13Greedy Algorithm and VBA Program Findings and Conclusions.................................................14Model Output.................................................................................................................................14

Limitations to the Model Output........................................................................................16Recommendations for Use.............................................................................................................16Recommendations for Future Development..................................................................................17 Expected Impact.............................................................................................................................17References......................................................................................................................................18Appendix A: Pugh Selection Matrix for Linear Program vs. Integer Program.............................19Appendix B: Pugh Selection Matrix for VBA Code vs. Python Code..........................................19Appendix C: Constraints and Standards Matrix............................................................................20Appendix D: Greedy Algorithm Code...........................................................................................22Appendix E: VBA Program Code..................................................................................................37

1

Page 3: University of Michiganioe481/ioe481_past_reports/18W09.… · Web viewThe Greedy algorithm output has three main limitations that the PAR Team should be aware of when using the algorithm

Appendix F: Instructional Document for the PAR Team..............................................................48List of Figures Figure 1. Greedy Algorithm Output.................................................................................................4Figure 2. Assignment Sheet Output.................................................................................................5Figure 3. Overflow Bins Sheet Output............................................................................................5Figure 4. Image of a Supply Cart with Products, Bins, and Shelves...............................................6Figure 5. Body System Orientation.................................................................................................7Figure 6. Integer Program Interface...............................................................................................10Figure 7. Greedy Algorithm Output...............................................................................................15Figure 8. Greedy Algorithm Overflow Output..............................................................................15Figure 9. Assignment Sheet Output...............................................................................................15Figure 10. Overflow Bins Sheet Output........................................................................................16

2

Page 4: University of Michiganioe481/ioe481_past_reports/18W09.… · Web viewThe Greedy algorithm output has three main limitations that the PAR Team should be aware of when using the algorithm

Executive Summary Michigan Medicine utilizes supply rooms throughout the hospital to store products for clinicians to treat patients. Each supply rooms contains anywhere from 1-20 carts. The carts contain multiples shelves, bins of varying sizes, and designated products. The Michigan Medicine Periodic Automatic Replenishing (PAR) Team is responsible for allocating products to bins, bins to shelves, and shelves to supply carts. The PAR Team can spend up to 40 hours building one cart in one supply room and the cart is built based on individual knowledge. An IOE 481 student team from the University of Michigan has designed a model to output a map that PAR Team members of all experience levels can use to build carts and allocate products. The map will decrease the amount of time it takes to build one cart, eliminate some of the guesswork involved in building a cart, and increase efficiency by reducing wasted space.

Project Design IterationsBecause of the magnitude of the problem, the student team went through several design iterations before deciding which method would produce the best output for the PAR Team. The student team began to address the allocation problem by designing a linear program. After the linear program proved infeasible because of the need for binary variables, the student team switched to designing an integer program. The integer program contained a decision variable with four indices, which proved infeasible given the size of the dataset. Therefore, the student team decided to split the model into designing a Greedy algorithm to allocate products to bins and then use the integer program for bins, shelves, and carts. However, the challenges associated with the integer program could not be mitigated, thus the student team decided to incorporate a VBA program. The final model uses a Greedy algorithm design to allocate products to bins and a VBA program design to allocate bins, shelves, and carts.

Design Methods for the Greedy Algorithm and VBA Program The Greedy algorithm design allocates products to bins by iterating through each product’s volume in the spreadsheet provided by the PAR Team and assigning each product to the smallest bins that it fits into. The algorithm outputs the assignment for each product into a sheet in Excel, which contains columns to the corresponding product ID, bin number, bin type, product description and other necessary information. The output of the Greedy algorithm acts as the input for the VBA program.

Once the Greedy algorithm assigns all products to bins, the VBA program assigns bins, shelves, and carts. The VBA program pulls in the bin number, height, and width into arrays where the data is stored and does the same for shelves and carts. The program initializes the current bin, shelf, and cart ID numbers to 1, and then enters a for loop to begin assignment. The loop contains several logic blocks that check if a bin will fit onto the current shelf, if a shelf will fit onto the current cart, and if a cart can fit into the current supply room. If all conditions are met, then the bin is assigned to that shelf on that cart. If the bin cannot fit one of the conditions, then the bin is assigned to overflow. The map of bins that fit onto a cart is in a tab called “Assignment” and the bins that do not fit are in a tab called “Overflow Bins.”

3

Page 5: University of Michiganioe481/ioe481_past_reports/18W09.… · Web viewThe Greedy algorithm output has three main limitations that the PAR Team should be aware of when using the algorithm

Greedy Algorithm and VBA Program Findings and ConclusionsThe student team found that the Greedy algorithm was the best way to allocate products to bins because using volume accounted for all product and all bin dimensions. Since all products were assigned to bins and these bins were of a larger volume than the desired product quantity, the student team was able to conclude that the output from the Greedy algorithm was sufficient to meet the needs of the PAR Team.

The student team found that the VBA program logic of assigning the tallest bins in each body system first minimized wasted space between shelves because bins of similar size appeared on one shelf. The student team also found that using technology allowed the team to produce a standardized system for use throughout the hospital because the PAR Team can easily change the inputs and receive a map output. Lastly, the student team found that the program correctly reduced overflow bin volume when adding an additional cart, which makes logical sense. From all of these findings, the student team was able to conclude that the VBA program was sufficient to produce a usable map for the PAR Team.

Model Output The model consists of the Greedy algorithm and VBA program and therefore produces several main outputs. First, the model outputs the product-to-bin allocation created by the Greedy algorithm, as shown in Figure 1.

Figure 1. Greedy Algorithm Output

The “Bin List” column indicates the total number of bins needed based on the products and the “Product ID” column indicates the product in the corresponding bin. The “Bin Type” column indicates the volume of the bin, numbered 1-11. For example, product ID 107 is assigned to bin #1, which has a bin type of size 6. If the bin type is size 11, then the product is either too large to fit into a bin or has too large of a quantity, as bin type 11 is a dummy bin. The output of the Greedy algorithm is used as an input for the VBA program. The first output of the VBA program is shown in Figure 2, and this is the map that the PAR Team will use to build the carts. For example, bin #1 contains product ID 107 and is assigned to shelf 1 on cart 1.

4

Page 6: University of Michiganioe481/ioe481_past_reports/18W09.… · Web viewThe Greedy algorithm output has three main limitations that the PAR Team should be aware of when using the algorithm

Figure 2. Assignment Sheet Output

The second output of the VBA program indicates which bins do not fit onto any carts in the supply room, as shown in Figure 3. This tab also calculates the overflow volume, which indicates how many cubic inches of volume is needed to fit all of the overflow bins.

Figure 3. Overflow Bins Sheet Output

Because of the extensive detail involved in this model, the student team created an instructional document for the PAR Team to use, which is included in Appendix F.

Recommendations for Future Development The model produces a map for the PAR Team to use when building supply rooms, but the model has certain limitations that are able to be improved upon by other senior design teams in the future. One improvement is for the Greedy algorithm design to take into account the flexibility of products, which will reduce the volume of the products. A second improvement would be to design a user interface that has the supply room information pre-populated. Therefore, the PAR Team could select the desired supply room and the program would automatically run. A third improvement would be to take into account the item footprints so that the items could be either laid down or stood up based on those footprints.

Expected ImpactThe model is expected to decrease time, increase accuracy, and increase efficiency. The model will decrease the 40 hours it takes to build one cart, as the map is already created for the PAR Team to use. Accuracy will be increased because much of the guesswork will be eliminated when it comes to allocating products, bins, shelves, and carts, as technology has been

5

Page 7: University of Michiganioe481/ioe481_past_reports/18W09.… · Web viewThe Greedy algorithm output has three main limitations that the PAR Team should be aware of when using the algorithm

incorporated. Lastly, the process will be more efficient because more products will fit onto carts with the program and wasted space will be reduced, as that was the main objective of the model. Introduction Michigan Medicine utilizes supply rooms throughout the hospital to store products for clinicians to treat patients. Each supply room contains several multi-shelf carts that hold bins of medical products such as IV bags, bandages, and catheters. The Michigan Medicine Periodic Automatic Replenishing (PAR) Team is responsible for allocating products to their supply carts. To keep the supply carts organized, the PAR Team has implemented two main components: a two-bin kanban system and a body system orientation. The two-bin kanban system sets the replenishment schedule and the body system orientation ensures that products serving a similar function are grouped together. However, the PAR Team is building carts and allocating products to bins on the carts by using individual knowledge.

The PAR Team and Associate Director of Supply Chain/Materiel Services asked the IOE 481 student team from the University of Michigan to design a model to output a map that PAR Team members of all experience levels can use to easily build carts and allocate products. Therefore, the student team initially developed a linear program and integer program, but both programs proved to be infeasible to solve given the size of the data set and the large number of constraints. The student team has written a Greedy algorithm using VBA that allocates products to bins, and has decided to create a VBA program for bin, shelf, and cart allocation in place of the integer program. This final report describes the outcomes of the student team’s work and the final model created from the Greedy algorithm and VBA program.

BackgroundThe University of Michigan Hospital consists of several supply rooms. Each supply room contains anywhere from 1-20 carts. The carts contain multiple shelves and the shelf heights can be easily adjusted. On the shelves, bins of varying sizes hold designated products, as shown in Figure 4. If the products are too large to fit onto a cart, then they are placed on a “PAR Board,” which is a peg board inside the supply room. Latex items and potassium items are placed in red bins to indicate high-risk items, while all other items are placed in the same color bin.

6

Page 8: University of Michiganioe481/ioe481_past_reports/18W09.… · Web viewThe Greedy algorithm output has three main limitations that the PAR Team should be aware of when using the algorithm

Figure 4. Image of a Supply Cart with Products, Bins, and Shelves

The PAR Team has previously implemented certain systems for the supply carts. First, the carts are organized using a body system orientation. The body system orientation mandates that the products on the carts are in the same order as the body system from head-to-toe. For example, all cardiovascular items are placed together and before musculoskeletal items. Figure 5 shows the body system orientation.

Figure 5. Body System Orientation

In addition, each cart utilizes a two-bin kanban system. The kanban system indicates that the product needs to be replenished. When one bin is empty, the bin is placed on the top shelf and the second bin is moved forward. If only one bin is there, that indicates the next order needs to be placed.

Finally, the carts are being built and organized based on individual knowledge. First, the PAR Team fills the bins with products. Next, the PAR Team builds the carts from the last shelf of the last body system to the first shelf of the first body system, which means that the PAR Team builds carts from back-to-front. All of this is completed based on the PAR Team knowledge and no technological system is in place to assist in the process. According to the PAR Team, one cart takes 40 hours to build. If products cannot completely fit onto the carts because of space constraints, the PAR Team utilizes several countermeasures to fit more products. This project will only focus on the most effective countermeasure of altering the cart height, as the additional countermeasures are not used as often. If several products do not fit into the room, the cart heights can be raised a few inches in hope that more products will fit.

Key Issues The following issues are the key drivers behind the problem described:

● The PAR Team is allocating products to bins and bins to carts based on individual knowledge, thus lacking technological standardization of the process

● Certain products are identified as high-risk, but there is no label on the products for this information

7

Page 9: University of Michiganioe481/ioe481_past_reports/18W09.… · Web viewThe Greedy algorithm output has three main limitations that the PAR Team should be aware of when using the algorithm

● Larger products cannot fit on the carts, which means that these products need to be placed elsewhere

Goals and Objectives The primary goal of the project is to design a model that will output a standardized map to build carts for every supply room throughout the University of Michigan hospital. To create the map, the following design objectives have been accomplished:

● Gather product identifiers and product information from the PAR Team ● Use a Greedy algorithm to allocate products to bins● Design a VBA program that allocates the bin output from the Greedy algorithm to

shelves and carts● Identify high-risk and large products in the end map

Project Scope The scope of the project includes data from the Cardiovascular Center, but it is generalizable to all supply rooms in the hospital because the project does not include constraints and information that are specific to one unit. In addition, the cart layout within the rooms is fixed so the student team was not concerned with any cart rearrangement. The cart sizes and layout were an input into the model. Finally, the student team accounted for any number of products, bins, shelves, and carts within the model, as the student team knew that all products had to fit into the supply room.

Project Design IterationsBefore discussing the methods and final model output, the flow of the project from the beginning stages until the finished product should be identified. The student team began to address the allocation problem by using a linear program. After the linear program proved infeasible, the student team switched to an integer program. When the challenge of a four indice decision variable in the integer program could not be mitigated, the student team decided to use a Greedy algorithm in VBA to allocate products to bins and the integer program to allocate bins, shelves, and carts. However, the integer program still failed to incorporate several design requirements, and therefore, the student team decided to use VBA for the entire problem. The Greedy algorithm is used to allocate products to bins and a VBA Program is used to allocate bins, shelves, and carts. When referring to the “model,” the student team is referring to the Greedy algorithm and VBA program together, as they produce the final map. The subsequent sections discuss the described steps in further detail.

Linear Program Methods, Findings, and ConclusionsThe student team brainstormed the best way to formulate variables, constraints, and an objective function using a linear program. Since the problem involves a yes/no decision regarding the placement of an object, the team realized that binary variables would be the most logical way to formulate the constraints. A linear program is useful when determining how much of an object to incorporate, but the problem instead required the placement of these objects. The team created a Pugh matrix, shown in Appendix A, to decide if an integer program was a better model than a linear program. A linear program and integer program both provided user-friendly output and a simple way to alter the input information, but an integer program ranked higher because it provided yes/no information regarding the placement of a bin on a shelf. Therefore, the team

8

Page 10: University of Michiganioe481/ioe481_past_reports/18W09.… · Web viewThe Greedy algorithm output has three main limitations that the PAR Team should be aware of when using the algorithm

concluded that an integer program was more feasible than a linear program, as shown by the Pugh matrix.

Integer Program Methods, Findings, and ConclusionsAfter determining that an integer program was a better way to approach the problem, the student team formulated the overall sets, parameters, decision variables, objective function, and initial constraints. Using the spreadsheet supplied by the PAR Team, the student team was also able to identify the different groups of data that needed to be separated as sets for inclusion in the model, and analyzed how the data could be pulled into Excel Solver. However, many challenges surfaced and were mitigated during the integer program design:

● One of the initial formulations of the integer program assumed the incremental height between each shelf to be the same. After further discussions with the PAR Team, the student team learned that changing the shelf height is a countermeasure the client expects to be incorporated within the model itself.

● The student team had multiple options for what to maximize or minimize in the model. A literature search was conducted and the team considered using goal programming to formulate the most effective objective function because goal programming allows for several objectives to be accomplished [1]. After multiple client meetings, the student team decided to stick to integer programming, and concluded that the ideal objective function was to minimize the wasted space between cart shelves.

● For the two-bin kanban product replenishing system, some bins are placed side-to-side and others are placed front-to-back depending on the depth of the bins. To mitigate this issue, the team created a binary parameter to determine whether the width of the bins should be doubled in the model as a result of the kanban orientation.

Despite mitigating the above issues, the following challenges proved the integer program to be an infeasible solution for the PAR Team:

● The model would need to be divided into eleven separate objective functions for each body system to place the bins in the correct order around the supply room. Since ease of use was one of the main asks from the PAR Team, the student team decided against compromising on this aspect of the design and searched for a different solution.

● The integer program required a decision variable with four indices representing products, bins, shelves, and carts. For a problem of this magnitude, it was infeasible to sum over four indices and produce a working model. Therefore, the team determined the problem needed a more flexible solution.

Because of the challenges that could not be mitigated, the team concluded that using an integer program on its own was not going to provide a feasible outcome.

Greedy Algorithm and Integer Program Methods, Findings, and ConclusionsTo simplify the integer program, the team decided to use a Greedy algorithm in VBA to eliminate the product index by first assigning each product to the correct bin size. Therefore, the integer program only required a variable with three indices, representing bins, shelves, and carts. The Greedy algorithm was chosen based on performing a literature search that showed an example of a knapsack problem solved with a Greedy algorithm [2]. Although the student team is not solving a true knapsack problem, the knapsack problem was similar enough to the student

9

Page 11: University of Michiganioe481/ioe481_past_reports/18W09.… · Web viewThe Greedy algorithm output has three main limitations that the PAR Team should be aware of when using the algorithm

team’s allocation problem for the Greedy algorithm to be used. The product-assigned bin output of the Greedy algorithm could then be used as an input to the integer program. The functionality of the Greedy algorithm will be outlined in the subsequent section that describes the final model.Simplified Integer ProgramAfter the student team created a working Greedy algorithm, the simplified integer program was further developed. An Excel template was created that calculated all of the parameters necessary for the objective function and the initial constraints. An image of the integer program template for one cart is shown below in Figure 6. The calculated bin inputs and supplementary information pulled from the PAR Team data set are shown on the left in dark orange. The cart and shelf dimensional information is contained in the blue cells across the top. The white cells are the binary decision variables that dictate whether a bin is assigned to a particular shelf and cart, and the objective function is calculated in the light orange row towards the bottom.

Figure 6: Integer Program Interface

The integer program proved to be an infeasible solution to the program requirements because of three challenges. First, Excel solver and opensolver have difficulty processing large data sets. Open solver continually outputted “nonlinear constraints” when the team attempted to run it on just one supply room worth of data (about 700 products) and multiple constraints. Second, the student team recognized that the integer program spreadsheet was more complicated than the PAR Team was hoping for. Figure 6 represented only half of the rows and only one cart worth of columns. However, each supply room could have up to twenty carts, so the size of the spreadsheet would be very difficult to deal with and would take away from the user friendly design. Finally, the the body system constraint remained infeasible to incorporate into the integer program because it would require breaking the model into 11 different parts and then running the model 11 different times.

10

Page 12: University of Michiganioe481/ioe481_past_reports/18W09.… · Web viewThe Greedy algorithm output has three main limitations that the PAR Team should be aware of when using the algorithm

Reason for VBA Code for Greedy AlgorithmTherefore, the student team set up a meeting with the course Graduate Student Instructor and talked through an alternative programming method of assigning bins to shelves and shelves to carts. The two best options identified were VBA or Python. As shown in Appendix B, the team created a Pugh matrix to compare the two potential options. The chosen method was VBA code, largely due to the student team’s experience level with VBA and quicker access to the data set, as all of the PAR team product information is entered into Excel spreadsheets.

Design Methods, Requirements, Constraints, and Standards for the Greedy Algorithm and VBA ProgramThe final model consisted of the Greedy algorithm to allocate products to bins and a VBA program to allocate bins, shelves, and carts. The Greedy algorithm was mentioned above and will be described in this section with the VBA program. The Greedy algorithm and VBA program are tied together by an Excel user interface, which incorporates two buttons that run each macro.

Greedy Algorithm DescriptionTo allocate the products to bins, the Greedy algorithm iterates through each product volume in the spreadsheet provided by the PAR Team and assigns each product to the smallest bin that it can fit into based on volume. The algorithm outputs the assignment for each product into a sheet called “Bin Input,” which has columns for the corresponding product ID, bin number, bin type, product description, and other information per the PAR Team’s request. The algorithm populates each column with the appropriate information. To assign each product the correct bin size, the algorithm uses a variable with the corresponding inner volume and an if-else statement to compare the product volumes to bin volumes. The Greedy algorithm assigns products to bins for use in the VBA program. The Greedy algorithm also includes code that sorts the list of bins in descending order according to height, grouped by body system, with the last body system being assigned first. This sorting occurs because the PAR Team builds from the last body system on the last cart and therefore the student team wanted the output to be representative of what is currently done.

Greedy Algorithm ChallengesThe main challenge associated with the Greedy algorithm was determining the best output for the VBA program. Since the student team created the Greedy algorithm before creating the VBA program, the team wasn’t sure of the necessary inputs that the VBA program would need. The Greedy algorithm outputs needed to be the inputs for the VBA program, which proved challenging to write the output before knowing the inputs. This challenge resulted in several iterations of the Greedy algorithm as the team created the VBA program.

VBA Program DescriptionOnce the Greedy algorithm assigns all products to bins and numbers the bins, the VBA program is used to assign bins to shelves and carts. The VBA program pulls in the bin number, height, and width into arrays where the data is stored. The program then does the same for the shelves

11

Page 13: University of Michiganioe481/ioe481_past_reports/18W09.… · Web viewThe Greedy algorithm output has three main limitations that the PAR Team should be aware of when using the algorithm

and carts. Each bin, shelf, and cart has an ID number in order for the program to keep track of what is being assigned. The program initializes the current bin, shelf, and cart ID numbers to 1, then enters a for loop to begin assignment. The loop contains several logic blocks that check whether a bin will fit on the current shelf according to the current shelf width used, whether the shelf will fit on the current cart according to the available space left before hitting the maximum allowable height, and whether a cart can fit into the supply room based on the given supply room layout. Depending on if a condition is met or not, the program will increment the current shelf or cart ID and update the values of shelf width used and current cart height. Once a permissible condition has been met for a shelf and cart, the bin is assigned and the value of the current bin, shelf, and cart ID, as well as the height of the current shelf, are printed to the output sheet. The loop then increments to the next bin.

VBA Program Excel OutputThe program creates two sheets for the output: “Assignment” and “Overflow Bins.” Assignment is created first, and outputs the bin number, product ID, product quantity, shelf number, shelf height, cart number, bin volume, max PAR, and flagged information. The assignment sheet also calculates the additive shelf height of the carts. This calculation happens because the shelf height column only gives the actual height of each individual shelf and not the height from the bottom of the cart. Once the assignment sheet has been completely populated, the program goes through and removes all overflow bins to a new sheet called “OverflowBins.” In this sheet, the same information is displayed, but the information is in its own sheet to show which products will not actually fit on a cart. The overflow sheet also calculates the total volume of bins that do not fit on a cart.

VBA Program ChallengesThe main challenge of the VBA program was associated with following the correct order of assignment, so that off-by-one errors were avoided and the correct values were produced in the output. In order for the program to work correctly, the height of the shelf above the current shelf ID had to be calculated while bins were assigned to the current shelf. This calculation happens because the height of the next shelf depends on the height of the bins on the current shelf, and must be updated while simultaneously assigning bins. Similarly, the height of the cart needs to be continuously updated while assigning bins to shelves and shelves to carts, so that if the height of the bins on the top shelf of the cart exceeds the limit, the cart ID is incremented and shelves are assigned to the bottom of a new cart.

Design Requirements (Soft Constraints)Both the Greedy algorithm and the VBA program require soft constraints that steer the direction of the team’s design choices. The team gathered these requirements from meetings with the PAR Team. The soft constraints for both design tasks are listed below.

Soft Constraints on Greedy AlgorithmThe Greedy algorithm design incorporated the following soft constraints:

● The code should be easily utilized by PAR Team employees● The student team should write the code in a program that they have prior experience with

to produce the correct output

12

Page 14: University of Michiganioe481/ioe481_past_reports/18W09.… · Web viewThe Greedy algorithm output has three main limitations that the PAR Team should be aware of when using the algorithm

● The data given to the student team is already in Excel so the code should be easily pulled from Excel

● The code output should be easily formatted as inputs to the VBA program

Soft Constraints on VBA ProgramThe VBA program design incorporated the following soft constraints:

● The VBA program should allow PAR Team members to identify when countermeasures will need to be used

● The output should be in an easily understood, visual format● Supplementary information, such as flagged products, should be immediately identifiable

in the program output

Hard Constraints on the DesignThe PAR Team provided a clear set of hard constraints that the student team’s designs needs to include regarding the output. Once the student team separated the problem into the Greedy algorithm and VBA Program, the necessary inputs and outputs for each were assessed based on these constraints.

Hard Constraints on Greedy AlgorithmThe Greedy algorithm design incorporated the following hard constraints:

● The code must output a bin assignment for each type of product in the supply room● The code must be adaptable to function for any product list, i.e. any supply room● The bin allocation must take into account the necessary quantity of product at two

standard deviations from the mean expected demand

Hard Constraints on VBA ProgramThe VBA program design incorporated the following hard constraints:

● The program must output a map that allows the PAR Team to construct supply carts easily and efficiently

● The program must allocate bins onto shelves and shelves onto carts, following the body system orientation

● The PAR Team must have a simple way to change the number and size of the carts in the supply room being modeled

StandardsThe student team identified two standards for the model design:

1. NFPA 13, Standard for the Installation of Sprinkler Systems (National Fire Protection Association 2016). Available: https://www.nfpa.org/codes-and-standards/all-codes-and-standards/list-of-codes-and-standards/detail?code=13 [Accessed March 10, 2018].

This code states that shelving directly under sprinklers cannot be within 18 inches of the sprinkler. Because the student team does not know the locations of the sprinklers in every supply room, the model inputs allow the PAR Team to indicate the maximum cart height for each supply room.

13

Page 15: University of Michiganioe481/ioe481_past_reports/18W09.… · Web viewThe Greedy algorithm output has three main limitations that the PAR Team should be aware of when using the algorithm

2. Occupational Safety and Health Administration. Occupational safety and health standards: Materials Handling and Storage (Standard No. 1910.176(b)). Available: https://www.osha.gov/pls/oshaweb/owadisp.show_document?p_table=STANDARDS&p_id=9824 [Accessed March 10, 2018].

This OSHA standard states that the storage of materials cannot create a hazard. For this project, the bins must be placed on a shelf and not on the ground. All bins are either placed onto a shelf or placed into overflow.

The team searched the respective websites for design standards on March 10, 2018 from 11am-1pm with keywords shelving, storage, supply room, hospital, reaching, but found no relevant standards from ASTM, ASCE, IEEE, SAE, ACI, HIPAA, or AWWA.

Greedy Algorithm and VBA Program Findings and ConclusionsThe Greedy algorithm proved to be a simple way to allocate products to bins for the student team. The code required looking through several bin volumes and matching those volumes to the product volumes. The student team found that volume was the best comparison to make because volume took into account all product and all bin dimensions. Based on the fact that all products were assigned to bins and these bins were of a larger volume than the desired product quantity, the student team was able to conclude that the output from the Greedy algorithm was sufficient to meet the needs of the PAR Team.

The VBA program showed that the logic of assigning the tallest bins in each body system first and placing shelves onto carts from the bottom up was the most effective way to minimize wasted space on the carts between shelves because bins of similar size appeared on one shelf. The student team also found that the program produced a standardized system for allocating bins, shelves, and carts, that the PAR Team will be able to use and adjust for all rooms in the hospital based on the implementation of technology. Lastly, the student team found that the program correctly shows a large reduction in overflow bin volume when an additional cart is added to the room. From all of these findings, the student team was able to conclude that the VBA program was sufficient to produce a usable map for the PAR Team.

Model OutputThe output from the Greedy algorithm is one sheet, called “Bin Input.” This sheet, displayed in Figure 7, serves as the input for the VBA program. The data used to populate this sheet comes from the “Analysis” spreadsheet given to the student team from the PAR Team. The column “Bin List” numbers the bins and each of the other columns represents a characteristic of that bin. For example, bin #1 has a height of 6 inches, width of 11.125 inches, contains product ID 107, and so on. The “Bin Type” column represents the bin volume that was given to the product ID, as 11 different bin sizes are given and therefore 11 different bin types are considered. If a product is assigned to bin type 11, the product is oversized or has too large of a quantity, as bin type 11 is a dummy variable with a volume of 10 billion cubic inches. Lastly, the Greedy algorithm outputs whether the bin contains a latex or potassium product in order to flag these

14

Page 16: University of Michiganioe481/ioe481_past_reports/18W09.… · Web viewThe Greedy algorithm output has three main limitations that the PAR Team should be aware of when using the algorithm

items for red bins. This output will be used by the PAR Team to allocate products into bins before building the carts.

Figure 7. Greedy Algorithm Output

As mentioned, a bin type of size 11 means that the product is oversized or contains too large of a quantity to fit into a bin. The Greedy algorithm outputs separate columns to highlight these products. Figure 8 shows the columns in the bin input sheet that contain oversized items.

Figure 8. Greedy Algorithm Overflow Output

As discussed previously, the output from the VBA program is divided into two sheets: “Assignment” and “OverflowBins.” Figure 9 shows the assignment tab, and Figure 10 shows the overflow bins sheet. If a bin appears in the “Assignment” sheet, then that bin has been assigned to a shelf on a cart. For example, bin #1 containing product ID 107 has been assigned to shelf 1 on cart 1. Figure 9 is the map that the PAR Team will use to build the carts.

15

Page 17: University of Michiganioe481/ioe481_past_reports/18W09.… · Web viewThe Greedy algorithm output has three main limitations that the PAR Team should be aware of when using the algorithm

Figure 9. Assignment Sheet Output

All bins will not fit onto the carts and therefore, the “OverflowBins” tab, shown in Figure 10, indicates which bins do not fit. This tab also calculates “Overflow Volume” to tell the PAR Team how many cubic inches of volume is needed to fit all of the bins.

Figure 10. Overflow Bins Sheet Output

Because of the extensive detail of this model, the student team has written an instructional document for the PAR Team, which is attached in Appendix F. This model output section of the report gives a brief description of the output, but the instructional document goes into full detail and tells the PAR Team, or any other user, how to run the model from start to finish. For more details regarding the model output, please refer to Appendix F.

Limitations to the Model OutputThe Greedy algorithm output has three main limitations that the PAR Team should be aware of when using the algorithm. First, the Greedy algorithm does not account for flexible items, such as catheters. The data given to the student team did not have information on the flexibility of the items and therefore, the Greedy algorithm could not take this information into account. In this case, items that are flexible could be bent and thus more of that item could be placed into the bin. In addition, the Greedy algorithm is unaware of the item footprints. The items are all fit based on volume, but the items could either be laid down or stood up. Items such as hand sanitizer would be stood up, however, the Greedy algorithm does not take this into account and thus does not allow the height of a product to be higher than that of a bin. Lastly, the Greedy algorithm outputs items that do not fit into bins into a dummy node. However, the Greedy algorithm does not identify whether these items are physically too large for a bin or whether these items have too large a quantity, as both reasons could cause items to not fit into a bin.

The VBA program also has two main limitations that the PAR Team should be aware of. The VBA program requires that an item is slotted into a bin and therefore, the program does not account for items without bins, such as isolation gowns. In order to be allocated to a cart, the VBA program requires that the item is in a bin. In addition, the VBA program may leave a blank space on a shelf if a new body system begins on that shelf and the size of the new bin exceeds the allowable space left on that shelf. This blank space will only occur on rare occasions.

Recommendations For UseThe PAR Team should use the model when building a new supply room. The necessary information to run the model includes product information, bin sizes, and cart information. The

16

Page 18: University of Michiganioe481/ioe481_past_reports/18W09.… · Web viewThe Greedy algorithm output has three main limitations that the PAR Team should be aware of when using the algorithm

output of the model will provide the map for the PAR Team to build the supply room from the last shelf of the last body system to the first shelf of the first body system. As mentioned, the student team has included an instructional document, as shown in Appendix F, that explains how to run the Greedy algorithm and VBA program.

Recommendations for Future Development Although the Greedy algorithm and the VBA program are able to produce a solution to the problem, certain limitations are able to be improved upon by other senior design teams in the future. One improvement is to design the Greedy algorithm to take into account the flexibility of certain products and the ability to decrease the overall volume by fitting the products into a smaller bin type. This improvement could be accomplished by including a binary indicator to indicate product flexibility. If the product is flexible, then the volume could be divided in half so that the product quantity will fit into a smaller bin size.

Another modification would be to create a user interface to include a drop-down menu with pre-populated information specific to each supply room. This improvement could be accomplished by loading all of the supply room information into Excel and then creating the drop-down menu. In addition, an improvement could also be made to the Greedy algorithm to account for the products that meet the width and length requirements of a bin size but extend past the height by not increasing the next shelf height on a cart automatically. For example, a hand sanitizer bottle may extended a few centimeters past the height of the bin, but the current Greedy algorithm does not allow for that. To accomplish this task, information on the item footprints would be needed.

Expected ImpactThe model is expected to decrease time, increase accuracy, and increase efficiency. The model will decrease the 40 hours it takes to build one cart, as the map is already created for the PAR Team to use. Accuracy will be increased because much of the guesswork will be eliminated when it comes to allocating products, bins, shelves, and carts, as technology has been incorporated. The PAR Team will only have to make minor adjustments based on the model output to get the layout to be optimal, instead of making changes as they build carts from the ground up. Lastly, the process will be more efficient because more products will fit onto carts with the program and wasted space will be reduced, as that was the main objective of the model. Because more products will fit into the supply rooms, the model will improve the quality of care for patients and the accessibility of medical products for clinicians.

17

Page 19: University of Michiganioe481/ioe481_past_reports/18W09.… · Web viewThe Greedy algorithm output has three main limitations that the PAR Team should be aware of when using the algorithm

References[1] Chang, Ching-Ter, “Multi-choice goal programming,” Omega, vol 35, issue 4, August 2007, p.389-396. [Online]. Available: https://www-sciencedirect-com.proxy.lib.umich.edu/science/article/pii/S0305048305000988 [Accessed February 18, 2018].

[2] Y. Akcay, H. Li, and S. Xu, “Greedy algorithm for the general multidimensional knapsack program,” Annals of Operations Research, vol 150, December 2006. [Online]. Available:https://www.researchgate.net/profile/Haijun_Li3/publication/225487545_Greedy_algorithm_for_the_general_multidimensional_knapsack_problem/links/0a85e53a21bb4b8916000000.pdf. [Accessed February 20, 2018].

18

Page 20: University of Michiganioe481/ioe481_past_reports/18W09.… · Web viewThe Greedy algorithm output has three main limitations that the PAR Team should be aware of when using the algorithm

Appendix A: Pugh Selection Matrix for Linear Program vs. Integer Program

Appendix B: Pugh Selection Matrix for VBA Code vs. Python Code

19

Page 21: University of Michiganioe481/ioe481_past_reports/18W09.… · Web viewThe Greedy algorithm output has three main limitations that the PAR Team should be aware of when using the algorithm

Appendix C: Constraints and Standards Matrix

20

Entry # 1 2 3

Req

uire

men

ts

R-A. Organizational Policy (R-A-1)R-B. Ethical N.A.R-C. Health & Safety (R-C-1)R-D. Economic N.A.R-E. Implementability (R-E-1) (R-E-2) (R-E-3)R-F. User Acceptance (R-F-1) (R-F-2) (R-F-3)R-G. Patient Acceptance N.A.R-H. Task Duration (R-H-1)R-I. Feasibility N.A.Entry # 1 2 3

Con

stra

ints

C-A. Organizational Policy (C-A-1) (C-A-2)C-B. Ethical N.A

C-C. Health & Safety (C-C-1)

C-D. Economic N.A.

C-E. Implementability (C-E-1)

C-F. User Acceptance (C-F-1) (C-F-2)

C-G. Patient Acceptance N.A.

C-H. Task Duration (C-H-1)

C-I. Feasibility (C-I-1)

Entry # 1 2 3

Stan

dard

s

S-1. HIPPA N.A.S-2. Organization's Std. N.A.

S-3. AWWA N.A.

S-4. ASTM N.A.

S-5. Code (S-5-1)

S-6 OSHA (S-6-1)

S-7 IEEE N.A.

Standards that are not of consequence

ASCE SAE ACI

Page 22: University of Michiganioe481/ioe481_past_reports/18W09.… · Web viewThe Greedy algorithm output has three main limitations that the PAR Team should be aware of when using the algorithm

Requirements (Soft Constraints) in detail: (R-A-1) The output should be in an easily understood, visual format. (R-C-1) Supplementary information, such as flagged products, should be immediately

identifiable in the VBA program output. (R-E-1) The code should be easily utilized by PAR Team employees when the employees

run the code. (R-E-2) The data given to the student team is already in Excel so the code should be

easily pulled from Excel. (R-E-3) The code output should be easily formatted as inputs to the VBA program in

Excel. (R-F-1) The PAR Team should be able to accept the output that the code gives as useful. (R-F-2) The PAR Team should be able to easily identify the inputs to the VBA program. (R-F-3) The VBA program should allow PAR Team members to identify when

countermeasures will need to be used. (R-H-1) The data should not require a significant amount of time to pull into the system,

even though the data set is large.

Hard Constraints in detail: (C-A-1) The code must output a bin assignment for each type of product in the supply

room. (C-A-2) The VBA program must allocate bins onto shelves and shelves onto carts,

following the body system orientation. (C-C-1) Two standard deviations from the mean expected demand is required so that it is

unlikely products will run out before the next ordering period. (C-E-1) The bin allocation must take into account the necessary quantity of product at

two standard deviations from the mean expected demand. (C-F-1) The VBA program must output a map that allows the PAR Team to construct

supply carts easily and efficiently. (C-F-2) The PAR Team must have a simple way to change the number and size of carts

in the supply room being modeled. (C-H-1) The map output must be efficient enough to decrease the time it takes the PAR

Team to build a supply cart. (C-I-1) The code must be adaptable to function for any product list and any supply room.

Standards in detail: (S-5-1) This code states that shelving directly under sprinklers cannot be within 18 inches

of the sprinkler. Because the student team does not know the locations of the sprinklers in every supply room, the model allows the PAR Team to manually input the cart height.

(S-6-1) This OSHA standard states that the storage of materials cannot create a hazard. For this project, the bins must be placed on a shelf and not on the ground.

21

Page 23: University of Michiganioe481/ioe481_past_reports/18W09.… · Web viewThe Greedy algorithm output has three main limitations that the PAR Team should be aware of when using the algorithm

Appendix D: Greedy Algorithm Code

Sub GreedyAlgorithm_Click()

'Creates BinInput sheet for the outputSheets.AddActiveSheet.Name = "BinInput"

'Define variablesDim I As LongDim J As LongDim Bin1vol As DoubleDim Bin2vol As DoubleDim Bin3vol As DoubleDim Bin4vol As DoubleDim Bin5vol As DoubleDim Bin6vol As DoubleDim Bin7vol As DoubleDim Bin8vol As DoubleDim Bin9vol As DoubleDim Bin10vol As DoubleDim NumProducts As Long

'Define bin volumesBin1vol = Worksheets("Dimensional Data").Cells(3, 5).ValueBin2vol = Worksheets("Dimensional Data").Cells(4, 5).ValueBin3vol = Worksheets("Dimensional Data").Cells(5, 5).ValueBin4vol = Worksheets("Dimensional Data").Cells(6, 5).ValueBin5vol = Worksheets("Dimensional Data").Cells(7, 5).ValueBin6vol = Worksheets("Dimensional Data").Cells(8, 5).ValueBin7vol = Worksheets("Dimensional Data").Cells(9, 5).ValueBin8vol = Worksheets("Dimensional Data").Cells(10, 5).ValueBin9vol = Worksheets("Dimensional Data").Cells(11, 5).ValueBin10vol = Worksheets("Dimensional Data").Cells(12, 5).Value

J = 2 'j is rows in sheet Bin Type 'create column names for the output sheet Cells(1, 4).Value = "Product ID" Cells(1, 1).Value = "Bin Number" Cells(1, 8).Value = "Bin Type" Cells(1, 9).Value = "Product Description" Cells(1, 5).Value = "Product QTY" Cells(1, 6).Value = "Max PAR" Cells(1, 10).Value = "Group" Cells(1, 2).Value = "Bin Height"

22

Page 24: University of Michiganioe481/ioe481_past_reports/18W09.… · Web viewThe Greedy algorithm output has three main limitations that the PAR Team should be aware of when using the algorithm

Cells(1, 3).Value = "Bin Width w/ Kanban" Cells(1, 7).Value = "Bin Volume" Cells(1, 11).Value = "Body System ID" Cells(1, 12).Value = "Bin List" Cells(1, 13).Value = "Latex" Cells(1, 14).Value = "Potassium"

Cells(1, 15).Value = "Product ID" Cells(1, 16).Value = "Product Description" Cells(1, 17).Value = "Product QTY" Cells(1, 18).Value = "Max PAR" Cells(1, 19).Value = "Group" Cells(1, 20).Value = "Bin Type" Cells(1, 21).Value = "Body System ID" Cells(1, 22).Value = "Latex" Cells(1, 23).Value = "Potassium"

'Set the number of products equal to cell in Dimensional Data sheetNumProducts = Sheets("Dimensional Data").Cells(15, 2).Value 'Loop through all products and assign necessary columns For I = 2 To NumProducts 'If the product fits in bin size 1, assign it bin type 1 and output relevant information If Sheets("Updated Analysis").Cells(I, 6).Value <= Bin1vol Then Cells(J, 8).Value = 1 Cells(J, 2).Value = Sheets("Dimensional Data").Cells(3, 4).Value Cells(J, 3).Value = Sheets("Dimensional Data").Cells(3, 7).Value Cells(J, 7).Value = Sheets("Dimensional Data").Cells(3, 5).Value Cells(J, 4).Value = Sheets("Updated Analysis").Cells(I, 1).Value Cells(J, 9).Value = Sheets("Updated Analysis").Cells(I, 2).Value Cells(J, 5).Value = Sheets("Updated Analysis").Cells(I, 4).Value Cells(J, 6).Value = Sheets("Updated Analysis").Cells(I, 5).Value Cells(J, 10).Value = Sheets("Updated Analysis").Cells(I, 3).Value Cells(J, 13).Value = Sheets("Updated Analysis").Cells(I, 7).Value Cells(J, 14).Value = Sheets("Updated Analysis").Cells(I, 8).Value Cells(J, 1) = J - 1 'outputs the body system id from Dimensional Data If Cells(J, 10) = Sheets("Dimensional Data").Cells(3, 14).Value Then Cells(J, 11) = Sheets("Dimensional Data").Cells(3, 15).Value ElseIf Cells(J, 10) = Sheets("Dimensional Data").Cells(4, 14).Value Then Cells(J, 11) = Sheets("Dimensional Data").Cells(4, 15).Value ElseIf Cells(J, 10) = Sheets("Dimensional Data").Cells(5, 14).Value Then Cells(J, 11) = Sheets("Dimensional Data").Cells(5, 15).Value

23

Page 25: University of Michiganioe481/ioe481_past_reports/18W09.… · Web viewThe Greedy algorithm output has three main limitations that the PAR Team should be aware of when using the algorithm

ElseIf Cells(J, 10) = Sheets("Dimensional Data").Cells(6, 14).Value Then Cells(J, 11) = Sheets("Dimensional Data").Cells(6, 15).Value ElseIf Cells(J, 10) = Sheets("Dimensional Data").Cells(7, 14).Value Then Cells(J, 11) = Sheets("Dimensional Data").Cells(7, 15).Value ElseIf Cells(J, 10) = Sheets("Dimensional Data").Cells(8, 14).Value Then Cells(J, 11) = Sheets("Dimensional Data").Cells(8, 15).Value ElseIf Cells(J, 10) = Sheets("Dimensional Data").Cells(9, 14).Value Then Cells(J, 11) = Sheets("Dimensional Data").Cells(9, 15).Value ElseIf Cells(J, 10) = Sheets("Dimensional Data").Cells(10, 14).Value Then Cells(J, 11) = Sheets("Dimensional Data").Cells(10, 15).Value ElseIf Cells(J, 10) = Sheets("Dimensional Data").Cells(11, 14).Value Then Cells(J, 11) = Sheets("Dimensional Data").Cells(11, 15).Value ElseIf Cells(J, 10) = Sheets("Dimensional Data").Cells(12, 14).Value Then Cells(J, 11) = Sheets("Dimensional Data").Cells(12, 15).Value ElseIf Cells(J, 10) = Sheets("Dimensional Data").Cells(13, 14).Value Then Cells(J, 11) = Sheets("Dimensional Data").Cells(13, 15).Value ElseIf Cells(J, 10) = Sheets("Dimensional Data").Cells(14, 14).Value Then Cells(J, 11) = Sheets("Dimensional Data").Cells(14, 15).Value ElseIf Cells(J, 10) = Sheets("Dimensional Data").Cells(15, 14).Value Then Cells(J, 11) = Sheets("Dimensional Data").Cells(15, 15).Value ElseIf Cells(J, 10) = Sheets("Dimensional Data").Cells(16, 14).Value Then Cells(J, 11) = Sheets("Dimensional Data").Cells(16, 15).Value Else: Cells(J, 11) = Sheets("Dimensional Data").Cells(17, 15).Value

End If 'If the product fits in bin size 2, assign it bin type 2 and output relevant information ElseIf Sheets("Updated Analysis").Cells(I, 6).Value <= Bin2vol Then Cells(J, 8).Value = 2 Cells(J, 2).Value = Sheets("Dimensional Data").Cells(4, 4).Value Cells(J, 3).Value = Sheets("Dimensional Data").Cells(4, 7).Value Cells(J, 7).Value = Sheets("Dimensional Data").Cells(4, 5).Value Cells(J, 4).Value = Sheets("Updated Analysis").Cells(I, 1).Value Cells(J, 9).Value = Sheets("Updated Analysis").Cells(I, 2).Value Cells(J, 5).Value = Sheets("Updated Analysis").Cells(I, 4).Value Cells(J, 6).Value = Sheets("Updated Analysis").Cells(I, 5).Value Cells(J, 10).Value = Sheets("Updated Analysis").Cells(I, 3).Value Cells(J, 13).Value = Sheets("Updated Analysis").Cells(I, 7).Value Cells(J, 14).Value = Sheets("Updated Analysis").Cells(I, 8).Value Cells(J, 1) = J - 1 'outputs the body system id from Dimensional Data If Cells(J, 10) = Sheets("Dimensional Data").Cells(3, 14).Value Then Cells(J, 11) = Sheets("Dimensional Data").Cells(3, 15).Value ElseIf Cells(J, 10) = Sheets("Dimensional Data").Cells(4, 14).Value Then Cells(J, 11) = Sheets("Dimensional Data").Cells(4, 15).Value

24

Page 26: University of Michiganioe481/ioe481_past_reports/18W09.… · Web viewThe Greedy algorithm output has three main limitations that the PAR Team should be aware of when using the algorithm

ElseIf Cells(J, 10) = Sheets("Dimensional Data").Cells(5, 14).Value Then Cells(J, 11) = Sheets("Dimensional Data").Cells(5, 15).Value ElseIf Cells(J, 10) = Sheets("Dimensional Data").Cells(6, 14).Value Then Cells(J, 11) = Sheets("Dimensional Data").Cells(6, 15).Value ElseIf Cells(J, 10) = Sheets("Dimensional Data").Cells(7, 14).Value Then Cells(J, 11) = Sheets("Dimensional Data").Cells(7, 15).Value ElseIf Cells(J, 10) = Sheets("Dimensional Data").Cells(8, 14).Value Then Cells(J, 11) = Sheets("Dimensional Data").Cells(8, 15).Value ElseIf Cells(J, 10) = Sheets("Dimensional Data").Cells(9, 14).Value Then Cells(J, 11) = Sheets("Dimensional Data").Cells(9, 15).Value ElseIf Cells(J, 10) = Sheets("Dimensional Data").Cells(10, 14).Value Then Cells(J, 11) = Sheets("Dimensional Data").Cells(10, 15).Value ElseIf Cells(J, 10) = Sheets("Dimensional Data").Cells(11, 14).Value Then Cells(J, 11) = Sheets("Dimensional Data").Cells(11, 15).Value ElseIf Cells(J, 10) = Sheets("Dimensional Data").Cells(12, 14).Value Then Cells(J, 11) = Sheets("Dimensional Data").Cells(12, 15).Value ElseIf Cells(J, 10) = Sheets("Dimensional Data").Cells(13, 14).Value Then Cells(J, 11) = Sheets("Dimensional Data").Cells(13, 15).Value ElseIf Cells(J, 10) = Sheets("Dimensional Data").Cells(14, 14).Value Then Cells(J, 11) = Sheets("Dimensional Data").Cells(14, 15).Value ElseIf Cells(J, 10) = Sheets("Dimensional Data").Cells(15, 14).Value Then Cells(J, 11) = Sheets("Dimensional Data").Cells(15, 15).Value ElseIf Cells(J, 10) = Sheets("Dimensional Data").Cells(16, 14).Value Then Cells(J, 11) = Sheets("Dimensional Data").Cells(16, 15).Value Else: Cells(J, 11) = Sheets("Dimensional Data").Cells(17, 15).Value

End If 'If the product fits in bin size 3, assign it bin type 3 and output relevant information ElseIf Sheets("Updated Analysis").Cells(I, 6).Value <= Bin3vol Then Cells(J, 8).Value = 3 Cells(J, 2).Value = Sheets("Dimensional Data").Cells(5, 4).Value Cells(J, 3).Value = Sheets("Dimensional Data").Cells(5, 7).Value Cells(J, 7).Value = Sheets("Dimensional Data").Cells(5, 5).Value Cells(J, 4).Value = Sheets("Updated Analysis").Cells(I, 1).Value Cells(J, 9).Value = Sheets("Updated Analysis").Cells(I, 2).Value Cells(J, 5).Value = Sheets("Updated Analysis").Cells(I, 4).Value Cells(J, 6).Value = Sheets("Updated Analysis").Cells(I, 5).Value Cells(J, 10).Value = Sheets("Updated Analysis").Cells(I, 3).Value Cells(J, 13).Value = Sheets("Updated Analysis").Cells(I, 7).Value Cells(J, 14).Value = Sheets("Updated Analysis").Cells(I, 8).Value Cells(J, 1) = J - 1 'outputs the body system id from Dimensional Data If Cells(J, 10) = Sheets("Dimensional Data").Cells(3, 14).Value Then Cells(J, 11) = Sheets("Dimensional Data").Cells(3, 15).Value

25

Page 27: University of Michiganioe481/ioe481_past_reports/18W09.… · Web viewThe Greedy algorithm output has three main limitations that the PAR Team should be aware of when using the algorithm

ElseIf Cells(J, 10) = Sheets("Dimensional Data").Cells(4, 14).Value Then Cells(J, 11) = Sheets("Dimensional Data").Cells(4, 15).Value ElseIf Cells(J, 10) = Sheets("Dimensional Data").Cells(5, 14).Value Then Cells(J, 11) = Sheets("Dimensional Data").Cells(5, 15).Value ElseIf Cells(J, 10) = Sheets("Dimensional Data").Cells(6, 14).Value Then Cells(J, 11) = Sheets("Dimensional Data").Cells(6, 15).Value ElseIf Cells(J, 10) = Sheets("Dimensional Data").Cells(7, 14).Value Then Cells(J, 11) = Sheets("Dimensional Data").Cells(7, 15).Value ElseIf Cells(J, 10) = Sheets("Dimensional Data").Cells(8, 14).Value Then Cells(J, 11) = Sheets("Dimensional Data").Cells(8, 15).Value ElseIf Cells(J, 10) = Sheets("Dimensional Data").Cells(9, 14).Value Then Cells(J, 11) = Sheets("Dimensional Data").Cells(9, 15).Value ElseIf Cells(J, 10) = Sheets("Dimensional Data").Cells(10, 14).Value Then Cells(J, 11) = Sheets("Dimensional Data").Cells(10, 15).Value ElseIf Cells(J, 10) = Sheets("Dimensional Data").Cells(11, 14).Value Then Cells(J, 11) = Sheets("Dimensional Data").Cells(11, 15).Value ElseIf Cells(J, 10) = Sheets("Dimensional Data").Cells(12, 14).Value Then Cells(J, 11) = Sheets("Dimensional Data").Cells(12, 15).Value ElseIf Cells(J, 10) = Sheets("Dimensional Data").Cells(13, 14).Value Then Cells(J, 11) = Sheets("Dimensional Data").Cells(13, 15).Value ElseIf Cells(J, 10) = Sheets("Dimensional Data").Cells(14, 14).Value Then Cells(J, 11) = Sheets("Dimensional Data").Cells(14, 15).Value ElseIf Cells(J, 10) = Sheets("Dimensional Data").Cells(15, 14).Value Then Cells(J, 11) = Sheets("Dimensional Data").Cells(15, 15).Value ElseIf Cells(J, 10) = Sheets("Dimensional Data").Cells(16, 14).Value Then Cells(J, 11) = Sheets("Dimensional Data").Cells(16, 15).Value Else: Cells(J, 11) = Sheets("Dimensional Data").Cells(17, 15).Value

End If 'If the product fits in bin size 4, assign it bin type 4 and output relevant information ElseIf Sheets("Updated Analysis").Cells(I, 6).Value <= Bin4vol Then Cells(J, 8).Value = 4 Cells(J, 2).Value = Sheets("Dimensional Data").Cells(6, 4).Value Cells(J, 3).Value = Sheets("Dimensional Data").Cells(6, 7).Value Cells(J, 7).Value = Sheets("Dimensional Data").Cells(6, 5).Value Cells(J, 4).Value = Sheets("Updated Analysis").Cells(I, 1).Value Cells(J, 9).Value = Sheets("Updated Analysis").Cells(I, 2).Value Cells(J, 5).Value = Sheets("Updated Analysis").Cells(I, 4).Value Cells(J, 6).Value = Sheets("Updated Analysis").Cells(I, 5).Value Cells(J, 10).Value = Sheets("Updated Analysis").Cells(I, 3).Value Cells(J, 13).Value = Sheets("Updated Analysis").Cells(I, 7).Value Cells(J, 14).Value = Sheets("Updated Analysis").Cells(I, 8).Value Cells(J, 1) = J - 1 'outputs the body system id from Dimensional Data

26

Page 28: University of Michiganioe481/ioe481_past_reports/18W09.… · Web viewThe Greedy algorithm output has three main limitations that the PAR Team should be aware of when using the algorithm

If Cells(J, 10) = Sheets("Dimensional Data").Cells(3, 14).Value Then Cells(J, 11) = Sheets("Dimensional Data").Cells(3, 15).Value ElseIf Cells(J, 10) = Sheets("Dimensional Data").Cells(4, 14).Value Then Cells(J, 11) = Sheets("Dimensional Data").Cells(4, 15).Value ElseIf Cells(J, 10) = Sheets("Dimensional Data").Cells(5, 14).Value Then Cells(J, 11) = Sheets("Dimensional Data").Cells(5, 15).Value ElseIf Cells(J, 10) = Sheets("Dimensional Data").Cells(6, 14).Value Then Cells(J, 11) = Sheets("Dimensional Data").Cells(6, 15).Value ElseIf Cells(J, 10) = Sheets("Dimensional Data").Cells(7, 14).Value Then Cells(J, 11) = Sheets("Dimensional Data").Cells(7, 15).Value ElseIf Cells(J, 10) = Sheets("Dimensional Data").Cells(8, 14).Value Then Cells(J, 11) = Sheets("Dimensional Data").Cells(8, 15).Value ElseIf Cells(J, 10) = Sheets("Dimensional Data").Cells(9, 14).Value Then Cells(J, 11) = Sheets("Dimensional Data").Cells(9, 15).Value ElseIf Cells(J, 10) = Sheets("Dimensional Data").Cells(10, 14).Value Then Cells(J, 11) = Sheets("Dimensional Data").Cells(10, 15).Value ElseIf Cells(J, 10) = Sheets("Dimensional Data").Cells(11, 14).Value Then Cells(J, 11) = Sheets("Dimensional Data").Cells(11, 15).Value ElseIf Cells(J, 10) = Sheets("Dimensional Data").Cells(12, 14).Value Then Cells(J, 11) = Sheets("Dimensional Data").Cells(12, 15).Value ElseIf Cells(J, 10) = Sheets("Dimensional Data").Cells(13, 14).Value Then Cells(J, 11) = Sheets("Dimensional Data").Cells(13, 15).Value ElseIf Cells(J, 10) = Sheets("Dimensional Data").Cells(14, 14).Value Then Cells(J, 11) = Sheets("Dimensional Data").Cells(14, 15).Value ElseIf Cells(J, 10) = Sheets("Dimensional Data").Cells(15, 14).Value Then Cells(J, 11) = Sheets("Dimensional Data").Cells(15, 15).Value ElseIf Cells(J, 10) = Sheets("Dimensional Data").Cells(16, 14).Value Then Cells(J, 11) = Sheets("Dimensional Data").Cells(16, 15).Value Else: Cells(J, 11) = Sheets("Dimensional Data").Cells(17, 15).Value

End If 'If the product fits in bin size 5, assign it bin type 5 and output relevant information ElseIf Sheets("Updated Analysis").Cells(I, 6).Value <= Bin5vol Then Cells(J, 8).Value = 5 Cells(J, 2).Value = Sheets("Dimensional Data").Cells(7, 4).Value Cells(J, 3).Value = Sheets("Dimensional Data").Cells(7, 7).Value Cells(J, 7).Value = Sheets("Dimensional Data").Cells(7, 5).Value Cells(J, 4).Value = Sheets("Updated Analysis").Cells(I, 1).Value Cells(J, 9).Value = Sheets("Updated Analysis").Cells(I, 2).Value Cells(J, 5).Value = Sheets("Updated Analysis").Cells(I, 4).Value Cells(J, 6).Value = Sheets("Updated Analysis").Cells(I, 5).Value Cells(J, 10).Value = Sheets("Updated Analysis").Cells(I, 3).Value Cells(J, 13).Value = Sheets("Updated Analysis").Cells(I, 7).Value Cells(J, 14).Value = Sheets("Updated Analysis").Cells(I, 8).Value Cells(J, 1) = J - 1

27

Page 29: University of Michiganioe481/ioe481_past_reports/18W09.… · Web viewThe Greedy algorithm output has three main limitations that the PAR Team should be aware of when using the algorithm

'outputs the body system id from Dimensional Data If Cells(J, 10) = Sheets("Dimensional Data").Cells(3, 14).Value Then Cells(J, 11) = Sheets("Dimensional Data").Cells(3, 15).Value ElseIf Cells(J, 10) = Sheets("Dimensional Data").Cells(4, 14).Value Then Cells(J, 11) = Sheets("Dimensional Data").Cells(4, 15).Value ElseIf Cells(J, 10) = Sheets("Dimensional Data").Cells(5, 14).Value Then Cells(J, 11) = Sheets("Dimensional Data").Cells(5, 15).Value ElseIf Cells(J, 10) = Sheets("Dimensional Data").Cells(6, 14).Value Then Cells(J, 11) = Sheets("Dimensional Data").Cells(6, 15).Value ElseIf Cells(J, 10) = Sheets("Dimensional Data").Cells(7, 14).Value Then Cells(J, 11) = Sheets("Dimensional Data").Cells(7, 15).Value ElseIf Cells(J, 10) = Sheets("Dimensional Data").Cells(8, 14).Value Then Cells(J, 11) = Sheets("Dimensional Data").Cells(8, 15).Value ElseIf Cells(J, 10) = Sheets("Dimensional Data").Cells(9, 14).Value Then Cells(J, 11) = Sheets("Dimensional Data").Cells(9, 15).Value ElseIf Cells(J, 10) = Sheets("Dimensional Data").Cells(10, 14).Value Then Cells(J, 11) = Sheets("Dimensional Data").Cells(10, 15).Value ElseIf Cells(J, 10) = Sheets("Dimensional Data").Cells(11, 14).Value Then Cells(J, 11) = Sheets("Dimensional Data").Cells(11, 15).Value ElseIf Cells(J, 10) = Sheets("Dimensional Data").Cells(12, 14).Value Then Cells(J, 11) = Sheets("Dimensional Data").Cells(12, 15).Value ElseIf Cells(J, 10) = Sheets("Dimensional Data").Cells(13, 14).Value Then Cells(J, 11) = Sheets("Dimensional Data").Cells(13, 15).Value ElseIf Cells(J, 10) = Sheets("Dimensional Data").Cells(14, 14).Value Then Cells(J, 11) = Sheets("Dimensional Data").Cells(14, 15).Value ElseIf Cells(J, 10) = Sheets("Dimensional Data").Cells(15, 14).Value Then Cells(J, 11) = Sheets("Dimensional Data").Cells(15, 15).Value ElseIf Cells(J, 10) = Sheets("Dimensional Data").Cells(16, 14).Value Then Cells(J, 11) = Sheets("Dimensional Data").Cells(16, 15).Value Else: Cells(J, 11) = Sheets("Dimensional Data").Cells(17, 15).Value

End If 'If the product fits in bin size 6, assign it bin type 6 and output relevant information ElseIf Sheets("Updated Analysis").Cells(I, 6).Value <= Bin6vol Then Cells(J, 8).Value = 6 Cells(J, 2).Value = Sheets("Dimensional Data").Cells(8, 4).Value Cells(J, 3).Value = Sheets("Dimensional Data").Cells(8, 7).Value Cells(J, 7).Value = Sheets("Dimensional Data").Cells(8, 5).Value Cells(J, 4).Value = Sheets("Updated Analysis").Cells(I, 1).Value Cells(J, 9).Value = Sheets("Updated Analysis").Cells(I, 2).Value Cells(J, 5).Value = Sheets("Updated Analysis").Cells(I, 4).Value Cells(J, 6).Value = Sheets("Updated Analysis").Cells(I, 5).Value Cells(J, 10).Value = Sheets("Updated Analysis").Cells(I, 3).Value Cells(J, 13).Value = Sheets("Updated Analysis").Cells(I, 7).Value

28

Page 30: University of Michiganioe481/ioe481_past_reports/18W09.… · Web viewThe Greedy algorithm output has three main limitations that the PAR Team should be aware of when using the algorithm

Cells(J, 14).Value = Sheets("Updated Analysis").Cells(I, 8).Value Cells(J, 1) = J - 1 'outputs the body system id from Dimensional Data If Cells(J, 10) = Sheets("Dimensional Data").Cells(3, 14).Value Then Cells(J, 11) = Sheets("Dimensional Data").Cells(3, 15).Value ElseIf Cells(J, 10) = Sheets("Dimensional Data").Cells(4, 14).Value Then Cells(J, 11) = Sheets("Dimensional Data").Cells(4, 15).Value ElseIf Cells(J, 10) = Sheets("Dimensional Data").Cells(5, 14).Value Then Cells(J, 11) = Sheets("Dimensional Data").Cells(5, 15).Value ElseIf Cells(J, 10) = Sheets("Dimensional Data").Cells(6, 14).Value Then Cells(J, 11) = Sheets("Dimensional Data").Cells(6, 15).Value ElseIf Cells(J, 10) = Sheets("Dimensional Data").Cells(7, 14).Value Then Cells(J, 11) = Sheets("Dimensional Data").Cells(7, 15).Value ElseIf Cells(J, 10) = Sheets("Dimensional Data").Cells(8, 14).Value Then Cells(J, 11) = Sheets("Dimensional Data").Cells(8, 15).Value ElseIf Cells(J, 10) = Sheets("Dimensional Data").Cells(9, 14).Value Then Cells(J, 11) = Sheets("Dimensional Data").Cells(9, 15).Value ElseIf Cells(J, 10) = Sheets("Dimensional Data").Cells(10, 14).Value Then Cells(J, 11) = Sheets("Dimensional Data").Cells(10, 15).Value ElseIf Cells(J, 10) = Sheets("Dimensional Data").Cells(11, 14).Value Then Cells(J, 11) = Sheets("Dimensional Data").Cells(11, 15).Value ElseIf Cells(J, 10) = Sheets("Dimensional Data").Cells(12, 14).Value Then Cells(J, 11) = Sheets("Dimensional Data").Cells(12, 15).Value ElseIf Cells(J, 10) = Sheets("Dimensional Data").Cells(13, 14).Value Then Cells(J, 11) = Sheets("Dimensional Data").Cells(13, 15).Value ElseIf Cells(J, 10) = Sheets("Dimensional Data").Cells(14, 14).Value Then Cells(J, 11) = Sheets("Dimensional Data").Cells(14, 15).Value ElseIf Cells(J, 10) = Sheets("Dimensional Data").Cells(15, 14).Value Then Cells(J, 11) = Sheets("Dimensional Data").Cells(15, 15).Value ElseIf Cells(J, 10) = Sheets("Dimensional Data").Cells(16, 14).Value Then Cells(J, 11) = Sheets("Dimensional Data").Cells(16, 15).Value Else: Cells(J, 11) = Sheets("Dimensional Data").Cells(17, 15).Value

End If 'If the product fits in bin size 7, assign it bin type 7 and output relevant information ElseIf Sheets("Updated Analysis").Cells(I, 6).Value <= Bin7vol Then Cells(J, 8).Value = 7 Cells(J, 2).Value = Sheets("Dimensional Data").Cells(9, 4).Value Cells(J, 3).Value = Sheets("Dimensional Data").Cells(9, 7).Value Cells(J, 7).Value = Sheets("Dimensional Data").Cells(9, 5).Value Cells(J, 4).Value = Sheets("Updated Analysis").Cells(I, 1).Value Cells(J, 9).Value = Sheets("Updated Analysis").Cells(I, 2).Value Cells(J, 5).Value = Sheets("Updated Analysis").Cells(I, 4).Value Cells(J, 6).Value = Sheets("Updated Analysis").Cells(I, 5).Value

29

Page 31: University of Michiganioe481/ioe481_past_reports/18W09.… · Web viewThe Greedy algorithm output has three main limitations that the PAR Team should be aware of when using the algorithm

Cells(J, 10).Value = Sheets("Updated Analysis").Cells(I, 3).Value Cells(J, 13).Value = Sheets("Updated Analysis").Cells(I, 7).Value Cells(J, 14).Value = Sheets("Updated Analysis").Cells(I, 8).Value Cells(J, 1) = J - 1 'outputs the body system id from Dimensional Data If Cells(J, 10) = Sheets("Dimensional Data").Cells(3, 14).Value Then Cells(J, 11) = Sheets("Dimensional Data").Cells(3, 15).Value ElseIf Cells(J, 10) = Sheets("Dimensional Data").Cells(4, 14).Value Then Cells(J, 11) = Sheets("Dimensional Data").Cells(4, 15).Value ElseIf Cells(J, 10) = Sheets("Dimensional Data").Cells(5, 14).Value Then Cells(J, 11) = Sheets("Dimensional Data").Cells(5, 15).Value ElseIf Cells(J, 10) = Sheets("Dimensional Data").Cells(6, 14).Value Then Cells(J, 11) = Sheets("Dimensional Data").Cells(6, 15).Value ElseIf Cells(J, 10) = Sheets("Dimensional Data").Cells(7, 14).Value Then Cells(J, 11) = Sheets("Dimensional Data").Cells(7, 15).Value ElseIf Cells(J, 10) = Sheets("Dimensional Data").Cells(8, 14).Value Then Cells(J, 11) = Sheets("Dimensional Data").Cells(8, 15).Value ElseIf Cells(J, 10) = Sheets("Dimensional Data").Cells(9, 14).Value Then Cells(J, 11) = Sheets("Dimensional Data").Cells(9, 15).Value ElseIf Cells(J, 10) = Sheets("Dimensional Data").Cells(10, 14).Value Then Cells(J, 11) = Sheets("Dimensional Data").Cells(10, 15).Value ElseIf Cells(J, 10) = Sheets("Dimensional Data").Cells(11, 14).Value Then Cells(J, 11) = Sheets("Dimensional Data").Cells(11, 15).Value ElseIf Cells(J, 10) = Sheets("Dimensional Data").Cells(12, 14).Value Then Cells(J, 11) = Sheets("Dimensional Data").Cells(12, 15).Value ElseIf Cells(J, 10) = Sheets("Dimensional Data").Cells(13, 14).Value Then Cells(J, 11) = Sheets("Dimensional Data").Cells(13, 15).Value ElseIf Cells(J, 10) = Sheets("Dimensional Data").Cells(14, 14).Value Then Cells(J, 11) = Sheets("Dimensional Data").Cells(14, 15).Value ElseIf Cells(J, 10) = Sheets("Dimensional Data").Cells(15, 14).Value Then Cells(J, 11) = Sheets("Dimensional Data").Cells(15, 15).Value ElseIf Cells(J, 10) = Sheets("Dimensional Data").Cells(16, 14).Value Then Cells(J, 11) = Sheets("Dimensional Data").Cells(16, 15).Value Else: Cells(J, 11) = Sheets("Dimensional Data").Cells(17, 15).Value

End If 'If the product fits in bin size 8, assign it bin type 8 and output relevant information ElseIf Sheets("Updated Analysis").Cells(I, 6).Value <= Bin8vol Then Cells(J, 8).Value = 8 Cells(J, 2).Value = Sheets("Dimensional Data").Cells(10, 4).Value Cells(J, 3).Value = Sheets("Dimensional Data").Cells(10, 7).Value Cells(J, 7).Value = Sheets("Dimensional Data").Cells(10, 5).Value Cells(J, 4).Value = Sheets("Updated Analysis").Cells(I, 1).Value Cells(J, 9).Value = Sheets("Updated Analysis").Cells(I, 2).Value

30

Page 32: University of Michiganioe481/ioe481_past_reports/18W09.… · Web viewThe Greedy algorithm output has three main limitations that the PAR Team should be aware of when using the algorithm

Cells(J, 5).Value = Sheets("Updated Analysis").Cells(I, 4).Value Cells(J, 6).Value = Sheets("Updated Analysis").Cells(I, 5).Value Cells(J, 10).Value = Sheets("Updated Analysis").Cells(I, 3).Value Cells(J, 13).Value = Sheets("Updated Analysis").Cells(I, 7).Value Cells(J, 14).Value = Sheets("Updated Analysis").Cells(I, 8).Value Cells(J, 1) = J - 1 'outputs the body system id from Dimensional Data If Cells(J, 10) = Sheets("Dimensional Data").Cells(3, 14).Value Then Cells(J, 11) = Sheets("Dimensional Data").Cells(3, 15).Value ElseIf Cells(J, 10) = Sheets("Dimensional Data").Cells(4, 14).Value Then Cells(J, 11) = Sheets("Dimensional Data").Cells(4, 15).Value ElseIf Cells(J, 10) = Sheets("Dimensional Data").Cells(5, 14).Value Then Cells(J, 11) = Sheets("Dimensional Data").Cells(5, 15).Value ElseIf Cells(J, 10) = Sheets("Dimensional Data").Cells(6, 14).Value Then Cells(J, 11) = Sheets("Dimensional Data").Cells(6, 15).Value ElseIf Cells(J, 10) = Sheets("Dimensional Data").Cells(7, 14).Value Then Cells(J, 11) = Sheets("Dimensional Data").Cells(7, 15).Value ElseIf Cells(J, 10) = Sheets("Dimensional Data").Cells(8, 14).Value Then Cells(J, 11) = Sheets("Dimensional Data").Cells(8, 15).Value ElseIf Cells(J, 10) = Sheets("Dimensional Data").Cells(9, 14).Value Then Cells(J, 11) = Sheets("Dimensional Data").Cells(9, 15).Value ElseIf Cells(J, 10) = Sheets("Dimensional Data").Cells(10, 14).Value Then Cells(J, 11) = Sheets("Dimensional Data").Cells(10, 15).Value ElseIf Cells(J, 10) = Sheets("Dimensional Data").Cells(11, 14).Value Then Cells(J, 11) = Sheets("Dimensional Data").Cells(11, 15).Value ElseIf Cells(J, 10) = Sheets("Dimensional Data").Cells(12, 14).Value Then Cells(J, 11) = Sheets("Dimensional Data").Cells(12, 15).Value ElseIf Cells(J, 10) = Sheets("Dimensional Data").Cells(13, 14).Value Then Cells(J, 11) = Sheets("Dimensional Data").Cells(13, 15).Value ElseIf Cells(J, 10) = Sheets("Dimensional Data").Cells(14, 14).Value Then Cells(J, 11) = Sheets("Dimensional Data").Cells(14, 15).Value ElseIf Cells(J, 10) = Sheets("Dimensional Data").Cells(15, 14).Value Then Cells(J, 11) = Sheets("Dimensional Data").Cells(15, 15).Value ElseIf Cells(J, 10) = Sheets("Dimensional Data").Cells(16, 14).Value Then Cells(J, 11) = Sheets("Dimensional Data").Cells(16, 15).Value Else: Cells(J, 11) = Sheets("Dimensional Data").Cells(17, 15).Value

End If 'If the product fits in bin size 9, assign it bin type 9 and output relevant information ElseIf Sheets("Updated Analysis").Cells(I, 6).Value <= Bin9vol Then Cells(J, 8).Value = 9 Cells(J, 2).Value = Sheets("Dimensional Data").Cells(11, 4).Value Cells(J, 3).Value = Sheets("Dimensional Data").Cells(11, 7).Value Cells(J, 7).Value = Sheets("Dimensional Data").Cells(11, 5).Value

31

Page 33: University of Michiganioe481/ioe481_past_reports/18W09.… · Web viewThe Greedy algorithm output has three main limitations that the PAR Team should be aware of when using the algorithm

Cells(J, 4).Value = Sheets("Updated Analysis").Cells(I, 1).Value Cells(J, 9).Value = Sheets("Updated Analysis").Cells(I, 2).Value Cells(J, 5).Value = Sheets("Updated Analysis").Cells(I, 4).Value Cells(J, 6).Value = Sheets("Updated Analysis").Cells(I, 5).Value Cells(J, 10).Value = Sheets("Updated Analysis").Cells(I, 3).Value Cells(J, 13).Value = Sheets("Updated Analysis").Cells(I, 7).Value Cells(J, 14).Value = Sheets("Updated Analysis").Cells(I, 8).Value Cells(J, 1) = J - 1 'outputs the body system id from Dimensional Data If Cells(J, 10) = Sheets("Dimensional Data").Cells(3, 14).Value Then Cells(J, 11) = Sheets("Dimensional Data").Cells(3, 15).Value ElseIf Cells(J, 10) = Sheets("Dimensional Data").Cells(4, 14).Value Then Cells(J, 11) = Sheets("Dimensional Data").Cells(4, 15).Value ElseIf Cells(J, 10) = Sheets("Dimensional Data").Cells(5, 14).Value Then Cells(J, 11) = Sheets("Dimensional Data").Cells(5, 15).Value ElseIf Cells(J, 10) = Sheets("Dimensional Data").Cells(6, 14).Value Then Cells(J, 11) = Sheets("Dimensional Data").Cells(6, 15).Value ElseIf Cells(J, 10) = Sheets("Dimensional Data").Cells(7, 14).Value Then Cells(J, 11) = Sheets("Dimensional Data").Cells(7, 15).Value ElseIf Cells(J, 10) = Sheets("Dimensional Data").Cells(8, 14).Value Then Cells(J, 11) = Sheets("Dimensional Data").Cells(8, 15).Value ElseIf Cells(J, 10) = Sheets("Dimensional Data").Cells(9, 14).Value Then Cells(J, 11) = Sheets("Dimensional Data").Cells(9, 15).Value ElseIf Cells(J, 10) = Sheets("Dimensional Data").Cells(10, 14).Value Then Cells(J, 11) = Sheets("Dimensional Data").Cells(10, 15).Value ElseIf Cells(J, 10) = Sheets("Dimensional Data").Cells(11, 14).Value Then Cells(J, 11) = Sheets("Dimensional Data").Cells(11, 15).Value ElseIf Cells(J, 10) = Sheets("Dimensional Data").Cells(12, 14).Value Then Cells(J, 11) = Sheets("Dimensional Data").Cells(12, 15).Value ElseIf Cells(J, 10) = Sheets("Dimensional Data").Cells(13, 14).Value Then Cells(J, 11) = Sheets("Dimensional Data").Cells(13, 15).Value ElseIf Cells(J, 10) = Sheets("Dimensional Data").Cells(14, 14).Value Then Cells(J, 11) = Sheets("Dimensional Data").Cells(14, 15).Value ElseIf Cells(J, 10) = Sheets("Dimensional Data").Cells(15, 14).Value Then Cells(J, 11) = Sheets("Dimensional Data").Cells(15, 15).Value ElseIf Cells(J, 10) = Sheets("Dimensional Data").Cells(16, 14).Value Then Cells(J, 11) = Sheets("Dimensional Data").Cells(16, 15).Value Else: Cells(J, 11) = Sheets("Dimensional Data").Cells(17, 15).Value

End If 'If the product fits in bin size 10, assign it bin type 10 and output relevant information ElseIf Sheets("Updated Analysis").Cells(I, 6).Value <= Bin10vol Then Cells(J, 8).Value = 10 Cells(J, 2).Value = Sheets("Dimensional Data").Cells(12, 4).Value

32

Page 34: University of Michiganioe481/ioe481_past_reports/18W09.… · Web viewThe Greedy algorithm output has three main limitations that the PAR Team should be aware of when using the algorithm

Cells(J, 3).Value = Sheets("Dimensional Data").Cells(12, 7).Value Cells(J, 7).Value = Sheets("Dimensional Data").Cells(12, 5).Value Cells(J, 4).Value = Sheets("Updated Analysis").Cells(I, 1).Value Cells(J, 9).Value = Sheets("Updated Analysis").Cells(I, 2).Value Cells(J, 5).Value = Sheets("Updated Analysis").Cells(I, 4).Value Cells(J, 6).Value = Sheets("Updated Analysis").Cells(I, 5).Value Cells(J, 10).Value = Sheets("Updated Analysis").Cells(I, 3).Value Cells(J, 13).Value = Sheets("Updated Analysis").Cells(I, 7).Value Cells(J, 14).Value = Sheets("Updated Analysis").Cells(I, 8).Value Cells(J, 1) = J - 1 'outputs the body system id from Dimensional Data If Cells(J, 10) = Sheets("Dimensional Data").Cells(3, 14).Value Then Cells(J, 11) = Sheets("Dimensional Data").Cells(3, 15).Value ElseIf Cells(J, 10) = Sheets("Dimensional Data").Cells(4, 14).Value Then Cells(J, 11) = Sheets("Dimensional Data").Cells(4, 15).Value ElseIf Cells(J, 10) = Sheets("Dimensional Data").Cells(5, 14).Value Then Cells(J, 11) = Sheets("Dimensional Data").Cells(5, 15).Value ElseIf Cells(J, 10) = Sheets("Dimensional Data").Cells(6, 14).Value Then Cells(J, 11) = Sheets("Dimensional Data").Cells(6, 15).Value ElseIf Cells(J, 10) = Sheets("Dimensional Data").Cells(7, 14).Value Then Cells(J, 11) = Sheets("Dimensional Data").Cells(7, 15).Value ElseIf Cells(J, 10) = Sheets("Dimensional Data").Cells(8, 14).Value Then Cells(J, 11) = Sheets("Dimensional Data").Cells(8, 15).Value ElseIf Cells(J, 10) = Sheets("Dimensional Data").Cells(9, 14).Value Then Cells(J, 11) = Sheets("Dimensional Data").Cells(9, 15).Value ElseIf Cells(J, 10) = Sheets("Dimensional Data").Cells(10, 14).Value Then Cells(J, 11) = Sheets("Dimensional Data").Cells(10, 15).Value ElseIf Cells(J, 10) = Sheets("Dimensional Data").Cells(11, 14).Value Then Cells(J, 11) = Sheets("Dimensional Data").Cells(11, 15).Value ElseIf Cells(J, 10) = Sheets("Dimensional Data").Cells(12, 14).Value Then Cells(J, 11) = Sheets("Dimensional Data").Cells(12, 15).Value ElseIf Cells(J, 10) = Sheets("Dimensional Data").Cells(13, 14).Value Then Cells(J, 11) = Sheets("Dimensional Data").Cells(13, 15).Value ElseIf Cells(J, 10) = Sheets("Dimensional Data").Cells(14, 14).Value Then Cells(J, 11) = Sheets("Dimensional Data").Cells(14, 15).Value ElseIf Cells(J, 10) = Sheets("Dimensional Data").Cells(15, 14).Value Then Cells(J, 11) = Sheets("Dimensional Data").Cells(15, 15).Value ElseIf Cells(J, 10) = Sheets("Dimensional Data").Cells(16, 14).Value Then Cells(J, 11) = Sheets("Dimensional Data").Cells(16, 15).Value Else: Cells(J, 11) = Sheets("Dimensional Data").Cells(17, 15).Value

End If 'If the product does not fit in a bin assign it the dummy bin, bin type 11 Else: Cells(J, 20).Value = 11

33

Page 35: University of Michiganioe481/ioe481_past_reports/18W09.… · Web viewThe Greedy algorithm output has three main limitations that the PAR Team should be aware of when using the algorithm

Cells(J, 15).Value = Sheets("Updated Analysis").Cells(I, 1).Value Cells(J, 16).Value = Sheets("Updated Analysis").Cells(I, 2).Value Cells(J, 17).Value = Sheets("Updated Analysis").Cells(I, 4).Value Cells(J, 18).Value = Sheets("Updated Analysis").Cells(I, 5).Value Cells(J, 19).Value = Sheets("Updated Analysis").Cells(I, 3).Value Cells(J, 22).Value = Sheets("Updated Analysis").Cells(I, 7).Value Cells(J, 23).Value = Sheets("Updated Analysis").Cells(I, 8).Value

'outputs the body system id from Dimensional Data If Cells(J, 10) = Sheets("Dimensional Data").Cells(3, 14).Value Then Cells(J, 21) = Sheets("Dimensional Data").Cells(3, 15).Value ElseIf Cells(J, 10) = Sheets("Dimensional Data").Cells(4, 14).Value Then Cells(J, 21) = Sheets("Dimensional Data").Cells(4, 15).Value ElseIf Cells(J, 10) = Sheets("Dimensional Data").Cells(5, 14).Value Then Cells(J, 21) = Sheets("Dimensional Data").Cells(5, 15).Value ElseIf Cells(J, 10) = Sheets("Dimensional Data").Cells(6, 14).Value Then Cells(J, 21) = Sheets("Dimensional Data").Cells(6, 15).Value ElseIf Cells(J, 10) = Sheets("Dimensional Data").Cells(7, 14).Value Then Cells(J, 21) = Sheets("Dimensional Data").Cells(7, 15).Value ElseIf Cells(J, 10) = Sheets("Dimensional Data").Cells(8, 14).Value Then Cells(J, 21) = Sheets("Dimensional Data").Cells(8, 15).Value ElseIf Cells(J, 10) = Sheets("Dimensional Data").Cells(9, 14).Value Then Cells(J, 21) = Sheets("Dimensional Data").Cells(9, 15).Value ElseIf Cells(J, 10) = Sheets("Dimensional Data").Cells(10, 14).Value Then Cells(J, 21) = Sheets("Dimensional Data").Cells(10, 15).Value ElseIf Cells(J, 10) = Sheets("Dimensional Data").Cells(11, 14).Value Then Cells(J, 21) = Sheets("Dimensional Data").Cells(11, 15).Value ElseIf Cells(J, 10) = Sheets("Dimensional Data").Cells(12, 14).Value Then Cells(J, 21) = Sheets("Dimensional Data").Cells(12, 15).Value ElseIf Cells(J, 10) = Sheets("Dimensional Data").Cells(13, 14).Value Then Cells(J, 21) = Sheets("Dimensional Data").Cells(13, 15).Value ElseIf Cells(J, 10) = Sheets("Dimensional Data").Cells(14, 14).Value Then Cells(J, 21) = Sheets("Dimensional Data").Cells(14, 15).Value ElseIf Cells(J, 10) = Sheets("Dimensional Data").Cells(15, 14).Value Then Cells(J, 21) = Sheets("Dimensional Data").Cells(15, 15).Value ElseIf Cells(J, 10) = Sheets("Dimensional Data").Cells(16, 14).Value Then Cells(J, 21) = Sheets("Dimensional Data").Cells(16, 15).Value Else: Cells(J, 21) = Sheets("Dimensional Data").Cells(17, 15).Value

End If

End If J = J + 1

34

Page 36: University of Michiganioe481/ioe481_past_reports/18W09.… · Web viewThe Greedy algorithm output has three main limitations that the PAR Team should be aware of when using the algorithm

Next I 'Delete blank rows after moving overflow bins to side of sheet Cells.Select Selection.SpecialCells(xlCellTypeBlanks).Select Selection.Delete Shift:=xlUp

' Sorting Macro'Filter bins in descending order according to height BY body system, number and move bin list column Range("A1:N1").Select Selection.AutoFilter Range("B2").Select ActiveWorkbook.Worksheets("BinInput").AutoFilter.Sort.SortFields.Clear ActiveWorkbook.Worksheets("BinInput").AutoFilter.Sort.SortFields.Add Key:= _ Range("B1"), SortOn:=xlSortOnValues, Order:=xlDescending, DataOption:= _ xlSortNormal With ActiveWorkbook.Worksheets("BinInput").AutoFilter.Sort .Header = xlYes .MatchCase = False .Orientation = xlTopToBottom .SortMethod = xlPinYin .Apply End With ActiveWorkbook.Worksheets("BinInput").AutoFilter.Sort.SortFields.Clear ActiveWorkbook.Worksheets("BinInput").AutoFilter.Sort.SortFields.Add Key:= _ Range("K1"), SortOn:=xlSortOnValues, Order:=xlDescending, DataOption:= _ xlSortNormal With ActiveWorkbook.Worksheets("BinInput").AutoFilter.Sort .Header = xlYes .MatchCase = False .Orientation = xlTopToBottom .SortMethod = xlPinYin .Apply End With Selection.AutoFilter Range("L2").Select ActiveCell.FormulaR1C1 = "1" Range("L3").Select ActiveCell.FormulaR1C1 = "2" Range("L4").Select ActiveCell.FormulaR1C1 = "3" Range("L2:L4").Select Selection.AutoFill Destination:=Range("L2:L10000")

35

Page 37: University of Michiganioe481/ioe481_past_reports/18W09.… · Web viewThe Greedy algorithm output has three main limitations that the PAR Team should be aware of when using the algorithm

Range("L2:L10000").Select Columns("A:A").Select Selection.Insert Shift:=xlToRight Columns("M:M").Select Selection.Cut Destination:=Columns("A:A") Columns("M:M").Select Selection.Delete Shift:=xlToLeft Range("N4").Select Columns("B:B").Select Selection.SpecialCells(xlCellTypeBlanks).Select Selection.EntireRow.Delete'Formatting the Information in Bin InputRange("A1:W1").Columns.AutoFitRange("A1:W1").Font.FontStyle = "Bold"Range("A1:N1").Interior.ColorIndex = 37Range("O1:W1").Interior.ColorIndex = 36

End Sub

Appendix E: VBA Program Code

Sub VBAProgram_Click()

'Setting up BinInput as the worksheet we input all bin data from

Dim BinInput As WorksheetSet BinInput = Sheets("BinInput")

Dim BinInputRange As Range

With BinInput Set BinInputRange = .Range("A2:I2", .Range("A2:I2").End(xlDown))

36

Page 38: University of Michiganioe481/ioe481_past_reports/18W09.… · Web viewThe Greedy algorithm output has three main limitations that the PAR Team should be aware of when using the algorithm

End With

'Inputing all of the information relevant to each binDim NumBins As IntegerDim BinList(1000) As IntegerDim BinNumber(1000) As IntegerDim BinHeight(1000) As DoubleDim BinWidth(1000) As DoubleDim ProductID(1000) As StringDim ProductQTY(1000) As LongDim BinVolume(1000) As DoubleDim MaxPAR(1000) As LongDim Latex(1000) As StringDim Potassium(1000) As String

For Each thing In BinInputRange BinList(thing.Row - 1) = BinInput.Cells(thing.Row, 1).Value BinNumber(thing.Row - 1) = BinInput.Cells(thing.Row, 2).Value BinHeight(thing.Row - 1) = BinInput.Cells(thing.Row, 3).Value BinWidth(thing.Row - 1) = BinInput.Cells(thing.Row, 4).Value ProductID(thing.Row - 1) = BinInput.Cells(thing.Row, 5).Value ProductQTY(thing.Row - 1) = BinInput.Cells(thing.Row, 6).Value MaxPAR(thing.Row - 1) = BinInput.Cells(thing.Row, 7).Value BinVolume(thing.Row - 1) = BinInput.Cells(thing.Row, 8).Value Latex(thing.Row - 1) = BinInput.Cells(thing.Row, 13).Value Potassium(thing.Row - 1) = BinInput.Cells(thing.Row, 14).Value NumBins = thing.Row - 1 Next thing

Dim CurrentBinID As Integer

'Setting up ShelfInput as the worksheet we input all shelf data fromDim ShelfInput As WorksheetSet ShelfInput = Sheets("ShelfInput")

Dim ShelfInputRange As Range

With ShelfInput Set ShelfInputRange = .Range("A2:D2", .Range("A2:D2").End(xlDown))End With

'Inputing all of the information relevant to each shelfDim ShelfList(500) As IntegerDim ShelfWidthUsed(500) As Double

37

Page 39: University of Michiganioe481/ioe481_past_reports/18W09.… · Web viewThe Greedy algorithm output has three main limitations that the PAR Team should be aware of when using the algorithm

Dim ShelfHeight(500) As IntegerDim CurrentShelfID As IntegerDim MaxBinHeight(500) As DoubleDim NumShelves As Integer For Each thing In ShelfInputRange ShelfList(thing.Row - 1) = ShelfInput.Cells(thing.Row, 1).Value ShelfHeight(thing.Row - 1) = ShelfInput.Cells(thing.Row, 2).Value ShelfWidthUsed(thing.Row - 1) = ShelfInput.Cells(thing.Row, 3).Value MaxBinHeight(thing.Row - 1) = ShelfInput.Cells(thing.Row, 4).Value NumShelves = thing.Row - 1 Next

'Setting up CartInput as the worksheet we input all shelf data fromDim CartInput As WorksheetSet CartInput = Sheets("CartInput")

Dim CartInputRange As Range

With CartInput Set CartInputRange = .Range("A2:B2", .Range("A2:B2").End(xlDown))End With

'Inputing all of the information relevant to each cartDim CartWidth(50) As DoubleDim CartCurrentHeight(50) As DoubleDim CartList(50) As Integer For Each thing In CartInputRange CartList(thing.Row - 1) = CartInput.Cells(thing.Row, 1).Value CartWidth(thing.Row - 1) = CartInput.Cells(thing.Row, 2).Value CartCurrentHeight(thing.Row - 1) = CartInput.Cells(thing.Row, 3).Value Next Dim CartMaxHeight As DoubleDim NumOfCarts As IntegerDim CurrentCartID As Integer

'Referencing the CartMaxHeight number Inputted by the PAR teamCartMaxHeight = Sheets("CartInput").Cells(1, 6).Value

'Input number of carts from sheetNumOfCarts = Sheets("CartInput").Cells(3, 6).Value 'Initializing code for first bin, shelf, cart, body system, shelfwidthused and maxbinheightCurrentShelfID = 1CurrentCartID = 1CurrentBinID = 1

38

Page 40: University of Michiganioe481/ioe481_past_reports/18W09.… · Web viewThe Greedy algorithm output has three main limitations that the PAR Team should be aware of when using the algorithm

ShelfWidthUsed(500) = 0MaxBinHeight(1) = BinHeight(1)

'Initializing the outuput spreadsheet called AssignmentSheets.AddActiveSheet.Name = "Assignment"Cells(1, 1).Value = "Bin Number"Cells(1, 2).Value = "Product ID"Cells(1, 3).Value = "Product QTY"Cells(1, 4).Value = "Shelf Number"Cells(1, 5).Value = "Shelf Height"Cells(1, 6).Value = "Cart Number"Cells(1, 7).Value = "Additive Shelf Height"Cells(1, 8).Value = "Bin Volume"Cells(1, 9).Value = "Max PAR"Cells(1, 10).Value = "Latex"Cells(1, 11).Value = "Potassium"

'Loop through all of the Bin ID'sFor CurrentBinID = 1 To NumBins

'If BinVolume(CurrentBinID) <> 0 Then

'If the current bin will fit on the current shelf If ShelfWidthUsed(CurrentShelfID) + BinWidth(CurrentBinID) <= CartWidth(CurrentCartID) Then 'Update shelf width used to include width of current bin ShelfWidthUsed(CurrentShelfID) = BinWidth(CurrentBinID) + ShelfWidthUsed(CurrentShelfID) 'Check if current bin is taller than previously assigned MaxBinHeight(relevant only for the first bin on a cart or if moving to next body system) If BinHeight(CurrentBinID) > MaxBinHeight(CurrentShelfID) Then 'This line is taking into account the first shelf on every cart, ensuring the cart current height is set to 5 or 7 inches CartCurrentHeight(CurrentCartID) = CartCurrentHeight(CurrentCartID) - MaxBinHeight(CurrentShelfID) - 0.75 MaxBinHeight(CurrentShelfID) = BinHeight(CurrentBinID) 'Update the shelf height of the shelf above to be the max bin height of the current shelf plus 3/4' reach space ShelfHeight(CurrentShelfID + 1) = MaxBinHeight(CurrentShelfID) + 0.75

39

Page 41: University of Michiganioe481/ioe481_past_reports/18W09.… · Web viewThe Greedy algorithm output has three main limitations that the PAR Team should be aware of when using the algorithm

'If the current shelf does not exceed the maximum cart height and can be assigned to the current cart If CartCurrentHeight(CurrentCartID) + ShelfHeight(CurrentShelfID + 1) <= CartMaxHeight Then 'Update cart current height to include the current shelf CartCurrentHeight(CurrentCartID) = CartCurrentHeight(CurrentCartID) + ShelfHeight(CurrentShelfID + 1) 'Assign bin to current shelf and cart Cells(CurrentBinID + 1, 1).Value = CurrentBinID Cells(CurrentBinID + 1, 2).Value = ProductID(CurrentBinID) Cells(CurrentBinID + 1, 3).Value = ProductQTY(CurrentBinID) Cells(CurrentBinID + 1, 4).Value = CurrentShelfID Cells(CurrentBinID + 1, 5).Value = ShelfHeight(CurrentShelfID) Cells(CurrentBinID + 1, 6).Value = CurrentCartID Cells(CurrentBinID + 1, 8).Value = BinVolume(CurrentBinID) Cells(CurrentBinID + 1, 9).Value = MaxPAR(CurrentBinID) Cells(CurrentBinID + 1, 10).Value = Latex(CurrentBinID) Cells(CurrentBinID + 1, 11).Value = Potassium(CurrentBinID) 'If the current shelf would exceed the max cart height and we are not on the last cart in the room ElseIf CurrentCartID + 1 <= NumOfCarts Then 'Move on to the next cart CurrentCartID = CurrentCartID + 1 'Need to initialize starting height of each cart as 5" for new cart CartCurrentHeight(CurrentCartID) = 5

'Need to initialize the height of the first shelf on a cart to zero ShelfHeight(CurrentShelfID) = 0 'Update cart current height to initially include the height of the shelf above it CartCurrentHeight(CurrentCartID) = CartCurrentHeight(CurrentCartID) + ShelfHeight(CurrentShelfID + 1) 'Assign current bin to current shelf and cart Cells(CurrentBinID + 1, 1).Value = CurrentBinID Cells(CurrentBinID + 1, 2).Value = ProductID(CurrentBinID) Cells(CurrentBinID + 1, 3).Value = ProductQTY(CurrentBinID) Cells(CurrentBinID + 1, 4).Value = CurrentShelfID Cells(CurrentBinID + 1, 5).Value = ShelfHeight(CurrentShelfID) Cells(CurrentBinID + 1, 6).Value = CurrentCartID Cells(CurrentBinID + 1, 8).Value = BinVolume(CurrentBinID) Cells(CurrentBinID + 1, 9).Value = MaxPAR(CurrentBinID)

40

Page 42: University of Michiganioe481/ioe481_past_reports/18W09.… · Web viewThe Greedy algorithm output has three main limitations that the PAR Team should be aware of when using the algorithm

Cells(CurrentBinID + 1, 10).Value = Latex(CurrentBinID) Cells(CurrentBinID + 1, 11).Value = Potassium(CurrentBinID) 'If run out of carts in the room to assign bins and shelves to, assign bins and shelves to an overflow cart Else Cells(CurrentBinID + 1, 1).Value = CurrentBinID Cells(CurrentBinID + 1, 2).Value = ProductID(CurrentBinID) Cells(CurrentBinID + 1, 3).Value = ProductQTY(CurrentBinID) Cells(CurrentBinID + 1, 4).Value = 999 Cells(CurrentBinID + 1, 5).Value = 0 Cells(CurrentBinID + 1, 6).Value = 99 Cells(CurrentBinID + 1, 8).Value = BinVolume(CurrentBinID) Cells(CurrentBinID + 1, 9).Value = MaxPAR(CurrentBinID) Cells(CurrentBinID + 1, 10).Value = Latex(CurrentBinID) Cells(CurrentBinID + 1, 11).Value = Potassium(CurrentBinID) ShelfWidthUsed(CurrentShelfID) = ShelfWidthUsed(CurrentShelfID) - BinWidth(CurrentBinID) CurrentShelfID = CurrentShelfID - 1 End If 'If current bin height is not greater than the current MaxBinHeight Else 'Update the shelf height above to be the MaxBinHeight of the shelf below it plus reach space ShelfHeight(CurrentShelfID + 1) = MaxBinHeight(CurrentShelfID) + 0.75 'Assign current bin to current shelf and cart Cells(CurrentBinID + 1, 1).Value = CurrentBinID Cells(CurrentBinID + 1, 2).Value = ProductID(CurrentBinID) Cells(CurrentBinID + 1, 3).Value = ProductQTY(CurrentBinID) Cells(CurrentBinID + 1, 4).Value = CurrentShelfID Cells(CurrentBinID + 1, 5).Value = ShelfHeight(CurrentShelfID) Cells(CurrentBinID + 1, 6).Value = CurrentCartID Cells(CurrentBinID + 1, 8).Value = BinVolume(CurrentBinID) Cells(CurrentBinID + 1, 9).Value = MaxPAR(CurrentBinID) Cells(CurrentBinID + 1, 10).Value = Latex(CurrentBinID) Cells(CurrentBinID + 1, 11).Value = Potassium(CurrentBinID) End If 'If the current bin does not fit onto the current shelf Else

41

Page 43: University of Michiganioe481/ioe481_past_reports/18W09.… · Web viewThe Greedy algorithm output has three main limitations that the PAR Team should be aware of when using the algorithm

'Move on to the next shelf CurrentShelfID = CurrentShelfID + 1 'The MaxBinHeight is initialized as the first bin on that shelf MaxBinHeight(CurrentShelfID) = BinHeight(CurrentBinID) ShelfWidthUsed(CurrentShelfID) = BinWidth(CurrentBinID) 'The shelf height of the next shelf is updated ShelfHeight(CurrentShelfID + 1) = MaxBinHeight(CurrentShelfID) + 0.75 'If the current shelf does not exceed the maximum cart height and can be assigned to the current cart If CartCurrentHeight(CurrentCartID) + ShelfHeight(CurrentShelfID + 1) <= CartMaxHeight Then 'Update cart current height to include the current shelf CartCurrentHeight(CurrentCartID) = CartCurrentHeight(CurrentCartID) + ShelfHeight(CurrentShelfID + 1) 'Assign bin to current shelf and cart Cells(CurrentBinID + 1, 1).Value = CurrentBinID Cells(CurrentBinID + 1, 2).Value = ProductID(CurrentBinID) Cells(CurrentBinID + 1, 3).Value = ProductQTY(CurrentBinID) Cells(CurrentBinID + 1, 4).Value = CurrentShelfID Cells(CurrentBinID + 1, 5).Value = ShelfHeight(CurrentShelfID) Cells(CurrentBinID + 1, 6).Value = CurrentCartID Cells(CurrentBinID + 1, 8).Value = BinVolume(CurrentBinID) Cells(CurrentBinID + 1, 9).Value = MaxPAR(CurrentBinID) Cells(CurrentBinID + 1, 10).Value = Latex(CurrentBinID) Cells(CurrentBinID + 1, 11).Value = Potassium(CurrentBinID) 'If the current shelf would exceed the max cart height and we are not on the last cart in the room ElseIf CurrentCartID + 1 <= NumOfCarts Then 'Move on to the next cart CurrentCartID = CurrentCartID + 1 'Need to initialize starting height of each cart as 5" for new cart CartCurrentHeight(CurrentCartID) = 5

'Need to initialize the height of the first shelf on a cart to zero ShelfHeight(CurrentShelfID) = 0 ShelfWidthUsed(CurrentShelfID) = BinWidth(CurrentBinID)

42

Page 44: University of Michiganioe481/ioe481_past_reports/18W09.… · Web viewThe Greedy algorithm output has three main limitations that the PAR Team should be aware of when using the algorithm

'Update cart current height to initially include the height of the shelf above it CartCurrentHeight(CurrentCartID) = CartCurrentHeight(CurrentCartID) + ShelfHeight(CurrentShelfID + 1) 'Assign current bin to current shelf and cart Cells(CurrentBinID + 1, 1).Value = CurrentBinID Cells(CurrentBinID + 1, 2).Value = ProductID(CurrentBinID) Cells(CurrentBinID + 1, 3).Value = ProductQTY(CurrentBinID) Cells(CurrentBinID + 1, 4).Value = CurrentShelfID Cells(CurrentBinID + 1, 5).Value = ShelfHeight(CurrentShelfID) Cells(CurrentBinID + 1, 6).Value = CurrentCartID Cells(CurrentBinID + 1, 8).Value = BinVolume(CurrentBinID) Cells(CurrentBinID + 1, 9).Value = MaxPAR(CurrentBinID) Cells(CurrentBinID + 1, 10).Value = Latex(CurrentBinID) Cells(CurrentBinID + 1, 11).Value = Potassium(CurrentBinID) 'If run out of carts in the room to assign bins and shelves to, assign bins and shelves to an overflow cart Else Cells(CurrentBinID + 1, 1).Value = CurrentBinID Cells(CurrentBinID + 1, 2).Value = ProductID(CurrentBinID) Cells(CurrentBinID + 1, 3).Value = ProductQTY(CurrentBinID) Cells(CurrentBinID + 1, 4).Value = 999 Cells(CurrentBinID + 1, 5).Value = 0 Cells(CurrentBinID + 1, 6).Value = 99 Cells(CurrentBinID + 1, 8).Value = BinVolume(CurrentBinID) Cells(CurrentBinID + 1, 9).Value = MaxPAR(CurrentBinID) Cells(CurrentBinID + 1, 10).Value = Latex(CurrentBinID) Cells(CurrentBinID + 1, 11).Value = Potassium(CurrentBinID) CurrentShelfID = CurrentShelfID - 1 ShelfWidthUsed(CurrentShelfID) = ShelfWidthUsed(CurrentShelfID) End If End If 'Move on to the next bin Next CurrentBinID

'All of the code below this point is to format the Assignment Sheet Differently for the PAR team

'Setting Assignment as the worksheet we input all of our data from

43

Page 45: University of Michiganioe481/ioe481_past_reports/18W09.… · Web viewThe Greedy algorithm output has three main limitations that the PAR Team should be aware of when using the algorithm

Dim Assignment As WorksheetSet Assignment = Sheets("Assignment")

Dim AssignmentRange As Range

With Assignment Set AssignmentRange = .Range("A2:F2", .Range("A2:F2").End(xlDown))End With

'Inputing all of the information contained in AssignmentDim NumBin As IntegerDim Bin As IntegerDim ShelfNumber(1000) As IntegerDim ShelfHeight2(1000) As IntegerDim AdditiveShelfHeight(1000) As IntegerDim CartNumber(1000) As Integer For Each thing In AssignmentRange ShelfNumber(thing.Row - 1) = BinInput.Cells(thing.Row, 2).Value ShelfHeight2(thing.Row - 1) = BinInput.Cells(thing.Row, 3).Value CartNumber(thing.Row - 1) = BinInput.Cells(thing.Row, 4).Value AdditiveShelfHeight(thing.Row - 1) = ShelfInput.Cells(thing.Row, 5).Value NumBin = thing.Row - 1 Next

'Initializing Bin to 2 to skip the heading rows in the sheetBin = 2

'Looping through vaues contained in assignmentFor Bin = 2 To NumBin + 1

'If first bin in the sheet then set additive shelf height to zero If Bin = 2 Then AdditiveShelfHeight(Bin) = 0 Cells(Bin, 7).Value = AdditiveShelfHeight(Bin) End If

'If moving on to a new cart and not an overflow bin, then set the additive shelf height to zero If Cells(Bin - 1, 6).Value <> Cells(Bin, 6).Value And Cells(Bin, 6).Value <> 99 And Cells(Bin - 1, 6).Value <> 99 Then AdditiveShelfHeight(Bin) = 0 Cells(Bin, 7).Value = AdditiveShelfHeight(Bin)

'If Currently on an overflow bin ElseIf Cells(Bin, 6).Value = 99 Then

44

Page 46: University of Michiganioe481/ioe481_past_reports/18W09.… · Web viewThe Greedy algorithm output has three main limitations that the PAR Team should be aware of when using the algorithm

'Keep additive shelf height the same as the bin above it AdditiveShelfHeight(Bin) = AdditiveShelfHeight(Bin - 1) Cells(Bin, 7).Value = AdditiveShelfHeight(Bin) 'Not a new cart or an overflow bin Else 'If on the same shelf and the row before, then additive shelf height stays the same If Cells(Bin - 1, 4).Value = Cells(Bin, 4).Value Then AdditiveShelfHeight(Bin) = Cells(Bin - 1, 7).Value Cells(Bin, 7).Value = AdditiveShelfHeight(Bin)

'If on a new shelf, then add the height of the shelf above it to the current shelf height Else AdditiveShelfHeight(Bin) = Cells(Bin - 1, 7).Value + Cells(Bin, 5).Value Cells(Bin, 7).Value = AdditiveShelfHeight(Bin)

End If 'Catch all if last cart in room continues assigning shelves above max height If AdditiveShelfHeight(Bin) > CartMaxHeight Then Cells(Bin, 4) = 999 Cells(Bin, 6) = 99 End If

End If

Next Bin

'Changing the color and style of assignment spreadsheet titlesRange("A1:K1").Columns.AutoFitRange("A1:K1").Font.FontStyle = "Bold"Range("A1:K1").Interior.ColorIndex = 37

'Initializing new input spreadsheet for overflow binsSheets.AddActiveSheet.Name = "OverflowBins"Cells(1, 1).Value = "Bin Number"Cells(1, 2).Value = "Product ID"Cells(1, 3).Value = "Product QTY"Cells(1, 4).Value = "Shelf Number"Cells(1, 5).Value = "Shelf Height"Cells(1, 6).Value = "Cart Number"Cells(1, 7).Value = "Additive Shelf Height"Cells(1, 8).Value = "Bin Volume"Cells(1, 9).Value = "Max PAR"

45

Page 47: University of Michiganioe481/ioe481_past_reports/18W09.… · Web viewThe Greedy algorithm output has three main limitations that the PAR Team should be aware of when using the algorithm

Cells(1, 10).Value = "Latex"Cells(1, 11).Value = "Potassium"Cells(1, 12).Value = "Overflow Volume"

'Macro that deletes overflow bins from Assignment sheet and assigns them to new overflow bins sheet Dim xRg As Range Dim xCell As Range Dim I As Long Dim J As Long Dim K As Long I = Worksheets("Assignment").UsedRange.Rows.Count J = Worksheets("OverflowBins").UsedRange.Rows.Count If J = 1 Then If Application.WorksheetFunction.CountA(Worksheets("OverflowBins").UsedRange) = 0 Then J = 0 End If Set xRg = Worksheets("Assignment").Range("F1:F" & I) On Error Resume Next Application.ScreenUpdating = False For K = 1 To xRg.Count If xRg(K).Value = 99 Then xRg(K).EntireRow.Copy Destination:=Worksheets("OverflowBins").Range("A" & J + 1) xRg(K).EntireRow.Delete If xRg(K).Value = 99 Then K = K - 1 End If J = J + 1 End If Next Application.ScreenUpdating = True

'Calculate the total overflow bin volumeSheets("OverflowBins").Cells(2, 12).Value = "=Sum(H:H)"

'Changing color and style of Overflow bins spreadsheet titlesRange("A1:L1").Columns.AutoFitRange("A1:L1").Font.FontStyle = "Bold"Range("A1:L1").Interior.ColorIndex = 36Cells(2, 12).Interior.ColorIndex = 43

End Sub

46

Page 48: University of Michiganioe481/ioe481_past_reports/18W09.… · Web viewThe Greedy algorithm output has three main limitations that the PAR Team should be aware of when using the algorithm

Appendix F: Instructional Document for the PAR Team

Running Greedy AlgorithmPurpose:The Greedy algorithm assigns products to bins by iterating through each product in the spreadsheet and assigning the product to the smallest possible bin that it can fit into. The Greedy algorithm checks the two times standard deviation quantity volume provided by the PAR Team and compares this volume to the 10 different inner bin volumes.

Data Preparation Process: 1. Open the IOE 481 Team 9 - Template2. Click on the “Updated Analysis” tab. Copy and paste the relevant data needed for the program to run, as detailed below.

Data Formatting of Updated Analysis Tab:The Greedy algorithm runs using specific column references. Therefore, it is essential that the data is placed in the exact columns for it to run properly:

Product ID: Column A

47

Page 49: University of Michiganioe481/ioe481_past_reports/18W09.… · Web viewThe Greedy algorithm output has three main limitations that the PAR Team should be aware of when using the algorithm

Description: Column B Group: Column C Bin Qty @ 2 Std. Dev.: Column D Max PAR: Column E Volume at Max: Column F Latex: Column G

K/K Free: Column H will automatically update due to the formula contained in the cells.

3. Ensure the “Dimensional Data” tab is formatted like Figure 1.

Figure 1. Dimensional Data Tab

Dimensional Data Tab Explanation:The student team assigned Bin Types 1-10, and a dummy Bin Type 11 for oversized products, as shown in column A of the above figure. The Bin Type numbers align with the 10 different bin sizes. The bin dimensions and volumes can be found in columns B - E. Column G takes into account whether the Bin Type has a kanban bin placed front-to-back or side-to-side and is used as the input bin width to the assignment program.

Column N contains the body system groups. The student team assigned an ID value from 1-15 for each body system, as shown in Column O, and the Body System ID values are used as an input to the Greedy algorithm.

4. (This step is only relevant if Cell B15 of the Dimensional Data Tab is showing up as “#Ref!”). Delete the formula in the Number of Products highlighted cell (B15 of the Dimensional Data spreadsheet). Copy and paste the formula listed just below the cell into B15 instead. The cell B15, as well as the formula that should be copy and pasted in cell B15, are shown in Figure 2.

48

Page 50: University of Michiganioe481/ioe481_past_reports/18W09.… · Web viewThe Greedy algorithm output has three main limitations that the PAR Team should be aware of when using the algorithm

Figure 2. Updating Number of Products Cell Reference

5. Make sure that the Developer tab is open in the Excel toolbar. If not, go to Files -> Options -> Customize Ribbon -> Click Developer.

6. Click the “Assign products to bins” Button on the far right of the “Dimensional Data” tab to run the program (See Figure 1).

Output Explanation: The first output of the Greedy algorithm is shown in Figure 3 below.

Figure 3. Greedy Algorithm Product Bin Assignment Output

Output Columns Explanation:

49

Page 51: University of Michiganioe481/ioe481_past_reports/18W09.… · Web viewThe Greedy algorithm output has three main limitations that the PAR Team should be aware of when using the algorithm

The program assigns each product to a bin if it fits based on volume. Bin Height, Bin Width with Kanban, and Bin Volume are all taken from the “Dimensional Data” tab and are outputted simply as inputs to the Assignment program. Product ID and Product Quantity are taken from the “Updated Analysis” tab.

The output in Figure 3 indicates the product placement. The PAR Team should put the Product Quantity contained in column F of Product ID in column E into a Bin Type 1-10 contained in column I. For example, Product Quantity 5 of Product ID 107 will be placed into a Bin Type 6. The Bin Type column corresponds to the bin types previously explained in the “Dimensional Data” tab (Refer back to Figure 1). Columns M and N flag whether the product in the bin contains latex or potassium and therefore should be put into a red bin.

Sorting and Bin List Explanation:Once the Greedy algorithm assigns all products to bin types, the algorithm sorts the output from last-to-first body system. Next, the algorithm sorts by tallest-to-smallest bin within each body system. The program then assigns the bins a number in the Bin List column (column A).

As shown in column L, the Body System ID is sorted in descending order from 15-1. The student team sorted the bins because it was the best way to ensure that the bins were being assigned in the correct body system order within the Assignment program. This sorting is also most representative of how the PAR Team currently builds the carts. The “Bin Number” column (column B) is irrelevant for the PAR Team’s purposes and may be hidden.

As shown in Figure 4, the Greedy algorithm also outputs information on the products that do not fit into bins.

Figure 4. Products that Cannot Fit into Bins

Bin Type 11 Explanation:If a product either has too large of a quantity or the product itself is too large, the Greedy algorithm automatically assigns the product to Bin Type 11 and the rest of the product information to columns O-W, as shown in Figure 4. These products are not

50

Page 52: University of Michiganioe481/ioe481_past_reports/18W09.… · Web viewThe Greedy algorithm output has three main limitations that the PAR Team should be aware of when using the algorithm

assigned to an actual bin type and are therefore not an input into the Assignment program.

Valuable Adjustment Features:If a product is assigned to a Bin Type 11, the PAR Team can update the Bin Qty @ 2 Std. Dev. (column 4) of the “Updated Analysis” tab and rerun the Greedy algorithm. This update will allow the PAR Team to experiment with the quantity of product needed to fit into one of the 10 bin sizes.

Rerunning the Greedy Algorithm:To rerun the algorithm, the PAR Team needs to delete the “Bin Input” tab and then click the “Assign products to bins” button again. This rerun will create a new “Bin Input” tab with updated information.

Running VBA Allocation ProgramPurpose:The VBA program assigns bins to shelves and shelves to carts. The goal of the VBA program is to minimize the wasted space between each shelf. The VBA program assigns the tallest bins in a body system first and then builds the carts from the bottom up.

Input Preparation Process: 1. Ensure that the Greedy algorithm has already been run and a “Bin Input” tab is shown within the spreadsheet. 2. Ensure that the “Shelf Input” tab in the sheet has the exact layout shown in Figure 5 below.

51

Page 53: University of Michiganioe481/ioe481_past_reports/18W09.… · Web viewThe Greedy algorithm output has three main limitations that the PAR Team should be aware of when using the algorithm

Figure 5: Shelf Input Tab Layout

3. Populate the highlighted cells in the “Cart Input” tab with all the cart information from the supply room, as shown in Figure 6.

Figure 6: Cart Input Tab Information

Cart Input Tab Instructions:

1. Add the number of carts needed in column A. For example, a supply room with 8 carts will have 8 Cart IDs in column A. Then, add the width of the two carts in inches in column B. Drag down the formula in the Cart Current Height column. Cart Current Height is equal to the first shelf height plus 0.75. If the first shelf height is 7 inches off the ground, update cell F2 to read 7 inches and column C will automatically update to 7.75.

2. Update cell F1, the Cart Height, to be the total allowable height of a cart based on regulations.

3. Cell F3, Num Carts, automatically updates based on the amount of Cart ID’s present in column A and should not be changed.

4. Click the “Assign bins to shelves and carts” Button on the far right of the “Dimensional Data” tab to run the program.

52

Page 54: University of Michiganioe481/ioe481_past_reports/18W09.… · Web viewThe Greedy algorithm output has three main limitations that the PAR Team should be aware of when using the algorithm

Output Explanation:The Assignment program creates two tabs: “Assignment” and “Overflow Bins.” The first sheet, “Assignment,” is shown in Figure 7 below.

Figure 7: Assignment Tab Output

Assignment Tab Output Explanation:This output is the map that dictates bin, shelf, and cart allocation. For example, Bin Number 1 is assigned to Shelf Number 1 on Cart Number 1. This cart number corresponds to the Cart ID entered in column A of the “Cart Input tab.” In this case, cart 1 would be a 36 inch cart (refer back to Figure 6). Cart 1 refers to the last cart in the room, which contains the last body system. The max PAR as well as latex and potassium information is also outputted. The Bin Volume column can be ignored/ hidden.

Additive Shelf Height Explanation:Column G, shown in Figure 7, provides an easy way for the PAR Team to look at the output and build the carts. Based on the output above, the PAR Team would build shelf 1 on the bottom notch of the pole, and then shelf 2, 3, and 4 at the 7, 19, 31, and 43 inch marks. The 0 is with respect to the notch increments on the poles so the first shelf should be either 5 or 7 inches off the ground.

The second sheet, “Overflow Bins,” is shown in Figure 8 below.

53

Page 55: University of Michiganioe481/ioe481_past_reports/18W09.… · Web viewThe Greedy algorithm output has three main limitations that the PAR Team should be aware of when using the algorithm

Figure 8: Overflow Bins Tab

Overflow Bins Tab Explanation:The “Overflow Bins” tab represents all of the Bin Numbers, and the products contained within them, that were unable to fit on any cart within the supply room. The Bin Numbers have a shelf number of 999 and a cart number of 99 because that is how the student team assigned overflow bins within the code, but these values can be ignored. The additive shelf height column can also be ignored on this sheet. The green cell in column L represents the total volume of bins that could not fit within the supply room. Note that this volume is just of the bins that contain products and does not include the volume of the empty Kanban bins placed behind or next to the full bins.

Valuable Adjustment Features:The PAR Team can experiment with adding more carts in the room by adding Cart ID’s and their respective widths in the “Cart Input” tab and then rerunning the program. The “Assignment” sheet will update and assign bins to the additional carts. The “Overflow Bins” tab will give a new estimate of how many bins still do not fit within the room and the decreased overflow bin volume.

Rerunning the Program:In order to rerun the program, the PAR Team needs to delete the “Assignment” and “Overflow Bins” tabs and then click the “Assign bins to shelves and carts” button again.

54