Sei sulla pagina 1di 43

SUPPLY CHAIN MANAGEMENT USING MACHINE LEARNING

Thesis submitted to Visvesvaraya National Institute of Technology, Nagpur In partial fulfillment of requirement for the award of degree of

Bachelor of Technology
(Computer Science and Engineering)

by

Amlan Kumar Rath (BT08CSE008) Piyush Dilip Dungarwal (BT08CSE022) Parag Manohar Khachane (BT08CSE038)

Guide

Prof. R. B. Keskar

Department of Computer Science and Engineering Visvesvaraya National Institute of Technology Nagpur 440 010 (India) April 2012

Declaration
We, hereby declare that the thesis titled Supply Chain management using Machine Learning submitted herein has been carried out by us in the Department of Computer Science and Engineering of Visvesvaraya National Institute of Technology, Nagpur. The work is original and has not been submitted earlier as a whole or in part for the award of any degree / diploma at this or any other Institution / University.

Amlan Kumar Rath (BT08CSE008) Date:

Piyush Dilip Dungarwal (BT08CSE022) Date:

Parag Manohar Khachane (BT08CSE038) Date:

Certificate
The thesis titled Supply Chain management using Machine Learning submitted by Amlan Kumar Rath (BT08CSE008) Piyush Dilip Dungarwal (BT08CSE022) Parag Manohar Khachane (BT08CSE038) for the award of degree of Bachelor of Technology, has been carried out under my supervision at the Department of the Computer Science and Engineering of Visvesvaraya National Institute of Technology, Nagpur. The work is comprehensive, complete and fit for evaluation.

Dr. S. R. Sathe (Head of Department) Department of Computer Science and Engineering VNIT, Nagpur Date:

Mr. R. B. Keskar (Associate Professor) Department of Computer Science and Engineering VNIT, Nagpur Date:

Acknowledgement
We would like to take this opportunity to express our gratitude to our project guide Prof. R. B. Keskar for his tremendous patience and timely advice which helped us in completing this project successfully. We thank him for being a motivation through all our highs and importantly, our lows. We would also like to express our gratitude to Dr. S. R. Sathe, Head of Department of Computer Science and Engineering for providing us with the necessary facilities to enable us to fulfill our project requirements as best as possible.

Abstract
This report aims to discuss the concept of Supply Chain Management and Machine learning and their incorporation with each other. The project aims to predict different variable attributes in the Supply Chain process in order to maximize profit of the agent, using various machine learning techniques. The project tries to solve the problem of bid selection, bid pricing in reverse auction bidding and future demand prediction for the manufactured goods. An optimal Agent Algorithm is developed using K-Nearest Neighbour method, different learning factors with their learning mechanisms and time series analysis model which can compete with other similar Agent Algorithms. To test the performance of the Agent, a virtual model of Reverse-auction based Supply Chain Management game has been implemented. The performance measure of the Agent Algorithm for predicting bid prices has been left for future work whereas future demand prediction mechanism has been successfully tested.

Page |1

Table of Contents
CHAPTER 1 INTRODUCTION ............................................................................................................................. 3 1.1 SUPPLY CHAIN MANAGEMENT ............................................................................................................................. 4 1.1.1 Supply Chain Decisions ......................................................................................................................... 5 1.2 MACHINE LEARNING .......................................................................................................................................... 7 1.2.1 Algorithm types .................................................................................................................................... 8 1.2.2 Approaches........................................................................................................................................... 9 1.3 PROBLEM STATEMENT ....................................................................................................................................... 9 1.4 OVERVIEW OF THE REPORT .................................................................................................................................. 9 CHAPTER 2 THEORETICAL MODELS ................................................................................................................ 10 2.1 KNN ............................................................................................................................................................ 11 2.1.1 Definition ............................................................................................................................................ 11 2.1.2 Advantages ........................................................................................................................................ 11 2.1.3 Disadvantages .................................................................................................................................... 11 2.2 PRICING MECHANISM ...................................................................................................................................... 12 2.2.1 Definition ............................................................................................................................................ 12 2.2.2 Factors ................................................................................................................................................ 12 2.3 TIME SERIES ANALYSIS MODEL .......................................................................................................................... 14 2.3.1 Analysis of data .................................................................................................................................. 14 CHAPTER 3 GAME FLOW AND CONCEPTS....................................................................................................... 17 3.1 CONCEPTS ..................................................................................................................................................... 18 3.2 GAME FLOW .................................................................................................................................................. 19 CHAPTER 4 IMPLEMENTATION ...................................................................................................................... 21 4.1 IMPLEMENTATION OF 2-LEVEL K-NEAREST NEIGHBOUR .......................................................................................... 22 4.1.1 Level 1 of KNN .................................................................................................................................... 23 4.1.2 Level 2 of KNN ............................................................................................................................... 24 4.2 IMPLEMENTATION OF PRICING MECHANISM ......................................................................................................... 25 4.2.1 Demand Factor ................................................................................................................................... 25 4.2.2 Due Date Factor ................................................................................................................................. 26 4.2.3 Quantity Factor .................................................................................................................................. 26 4.2.4 Reserve Price Factor ........................................................................................................................... 27 4.2.5 Minimum Profit Factor ....................................................................................................................... 28 4.2.6 Final Bid Price Calculation .................................................................................................................. 28 4.3 IMPLEMENTATION OF TIME SERIES MODEL AND REGRESSION .................................................................................. 29 4.3.1 Deseasonalization .............................................................................................................................. 29 4.3.2 Measuring the Trend .......................................................................................................................... 29 4.3.3 Making the forecast ........................................................................................................................... 29 4.4 DATABASE SCHEMA ......................................................................................................................................... 30 4.4.1 Server Database ................................................................................................................................. 30 4.4.2 Agent Database .................................................................................................................................. 31 CHAPTER 5 RESULTS....................................................................................................................................... 33 5.1 TASK 1 AND 2................................................................................................................................................. 34 5.2 TASK 3 .......................................................................................................................................................... 35 CHAPTER 6 CONCLUSION AND FUTURE WORK............................................................................................... 36 6.1 CONCLUSION .................................................................................................................................................. 37 6.2 FUTURE WORK ............................................................................................................................................... 37 REFERENCES................................................................................................................................................... 38

Page |2

List of Figures

Figure 1 Simple Supply Chain ................................................................................................... 4 Figure 2 Supply Chain Decisions .............................................................................................. 5 Figure 3 WOMETCO Corp. Sales. Courtesy: [3] .................................................................... 14 Figure 4 Graphical Sales data of WOMETCO Corp. Courtesy: [3] ........................................ 15 Figure 5 Reverse Auction Bidding .......................................................................................... 18 Figure 6 Overview of Game Flow ........................................................................................... 19 Figure 7 Snapshot of the Game (Agent Screen) ...................................................................... 34 Figure 8 Snapshot of the Game (Demand prediction) ............................................................. 35 Figure 9 Graphical Analysis for future demand prediction for type 'a' laptop ........................ 35

Page |3

Chapter 1 INTRODUCTION

Page |4 In this chapter, we discuss the concepts of Supply Chain Management and decisions related to Supply Chain. We also discuss various Machine learning algorithms and approaches. Finally we give the problem statement and outline of the rest of the report.

1.1 Supply Chain Management


A supply chain is a network of facilities and distribution options that performs the functions of procurement of materials, transformation of these materials into intermediate and finished products, and the distribution of these finished products to customers. Supply chains exist in both service and manufacturing organizations, although the complexity of the chain may vary greatly from industry to industry and firm to firm. This is an example of a very simple supply chain for a single product, where raw material is procured from vendors, transformed into finished goods in a single step, and then transported to distribution centres, and ultimately, customers. Realistic supply chains have multiple end products with shared components, facilities and capacities.

Figure 1 Simple Supply Chain

Traditionally, marketing, distribution, planning, manufacturing, and the purchasing organizations along the supply chain operated independently. These organizations have their own objectives and these are often conflicting. Marketing's objective of high customer service and maximum sales dollars conflict with manufacturing and distribution goals. Many manufacturing operations are designed to maximize throughput and lower costs with little consideration for the impact on inventory levels and distribution capabilities. Purchasing contracts are often negotiated with very little information beyond historical buying patterns. The result of these factors is that there is not a single, integrated plan for the organization---there were as many plans as businesses.

Page |5 Clearly, there is a need for a mechanism through which these different functions can be integrated together. Supply chain management is a strategy through which such integration can be achieved.

1.1.1 Supply Chain Decisions


We classify the decisions for supply chain management into two broad categories -strategic and operational. As the term implies, strategic decisions are made typically over a longer time horizon. These are closely linked to the corporate strategy, and guide supply chain policies from a design perspective. On the other hand, operational decisions are short term, and focus on activities over a day-to-day basis. The effort in these types of decisions is to effectively and efficiently manage the product flow in the "strategically" planned supply chain.

Figure 2 Supply Chain Decisions

1. Location Decisions o The geographic placement of production facilities, stocking points, and sourcing points is the natural first step in creating a supply chain. The location of facilities involves a commitment of resources to a long-term plan. o Once the size, number, and location of these are determined, so are the possible paths by which the product flows through to the final customer. These decisions are of great significance to a firm since they represent the basic strategy for accessing customer markets, and will have a considerable impact on revenue, cost, and level of service. o These decisions should be determined by an optimization routine that considers production costs, taxes, duties and duty drawback, tariffs, local content, distribution costs, production limitations, etc. Although location decisions are primarily strategic, they also have implications on an operational level.

Page |6 2. Production Decisions o The strategic decisions include what products to produce, and which plants to produce them in, allocation of suppliers to plants, plants to DC's, and DC's to customer markets. As before, these decisions have a big impact on the revenues, costs and customer service levels of the firm. o These decisions assume the existence of the facilities, but determine the exact path(s) through which a product flows to and from these facilities. o Another critical issue is the capacity of the manufacturing facilities--and this largely depends the degree of vertical integration within the firm. Operational decisions focus on detailed production scheduling.

o These decisions include the construction of the master production schedules, scheduling production on machines, and equipment maintenance. Other considerations include workload balancing, and quality control measures at a production facility. 3. Inventory Decisions o These refer to means by which inventories are managed. Inventories exist at every stage of the supply chain as either raw material, semi-finished or finished goods. They can also be in-process between locations. o Their primary purpose to buffer against any uncertainty that might exist in the supply chain. Since holding of inventories can cost anywhere between 20 to 40 percent of their value, their efficient management is critical in supply chain operations. It is strategic in the sense that top management sets goals. o However, most researchers have approached the management of inventory from an operational perspective. These include deployment strategies (push versus pull), control policies --- the determination of the optimal levels of order quantities and reorder points, and setting safety stock levels, at each stocking location. o These levels are critical, since they are primary determinants of customer service levels.
4. Transportation Decisions

o The mode choice aspects of these decisions are the more strategic ones. These are closely linked to the inventory decisions, since the best choice of mode is often found by trading-off the cost of using the particular mode of transport with the indirect cost of inventory associated with that mode.

Page |7 o While air shipments may be fast, reliable, and warrant lesser safety stocks, they are expensive. Meanwhile shipping by sea or rail may be much cheaper, but they necessitate holding relatively large amounts of inventory to buffer against the inherent uncertainty associated with them. o Therefore customer service levels and geographic location play vital roles in such decisions. Since transportation is more than 30 percent of the logistics costs, operating efficiently makes good economic sense. o Shipment sizes (consolidated bulk shipments versus Lot-for-Lot), routing and scheduling of equipment are key in effective management of the firm's transport strategy.

1.2 Machine Learning


o Machine learning, a branch of artificial intelligence, is a scientific discipline concerned with the design and development of algorithms that allow computers to evolve behaviors based on empirical data, such as from sensor data or databases. o A learner can take advantage of examples (data) to capture characteristics of interest of their unknown underlying probability distribution. Data can be seen as examples that illustrate relations between observed variables. o A major focus of machine learning research is to automatically learn to recognize complex patterns and make intelligent decisions based on data; the difficulty lies in the fact that the set of all possible behaviors given all possible inputs is too large to be covered by the set of observed examples (training data).

o Hence the learner must generalize from the given examples, so as to be able to produce a useful output in new cases. The field of Machine Learning seeks to answer the question: How can we build computer systems that automatically improve with experience, and what are the fundamental laws that govern all learning processes? This question covers a broad range of learning tasks, such as how to design autonomous mobile robots that learn to navigate from their own experience, how to data mine historical medical records to learn which future patients will respond best to which treatments, and how to build search engines that automatically customize to their users interests.

Page |8 To be more precise, we say that a machine learns with respect to a particular task T, performance metric P, and type of experience E, if the system reliably improves its performance P at task T, following experience E. Depending on how we specify T, P, and E, the learning task might also be called by names such as data mining, autonomous discovery, database updating, programming by example, etc.

Generalization Generalization is the ability of a machine learning algorithm to perform accurately on new, unseen examples after training on a finite data set. The core objective of a learner is to generalize from its experience. The training examples from its experience come from some generally unknown probability distribution and the learner has to extract from them something more general, something about that distribution, which allows it to produce useful answers in new cases.

1.2.1 Algorithm types


Machine learning algorithms can be organized into a taxonomy based on the desired outcome of the algorithm.

Supervised learning generates a function that maps inputs to desired outputs (also called labels, because they are often provided by human experts labeling the training examples). For example, in a classification problem, the learner approximates a function mapping a vector into classes by looking at input-output examples of the function. Unsupervised learning models a set of inputs, like clustering. Semi-supervised learning combines both labeled and unlabeled examples to generate an appropriate function or classifier. Reinforcement learning learns how to act given an observation of the world. Every action has some impact in the environment, and the environment provides feedback in the form of rewards that guides the learning algorithm. Transduction, or transductive inference, tries to predict new outputs on specific and fixed (test) cases from observed, specific (training) cases. Learning to learn learns its own inductive bias based on previous experience.

Page |9

1.2.2 Approaches

Decision tree learning Association rule learning Artificial neural networks Genetic programming Inductive logic programming Support vector machines Clustering Bayesian networks Reinforcement learning Representation learning Sparse Dictionary Learning

1.3 Problem Statement


To predict different variable attributes in the Supply Chain process in order to maximize profit of the agent, using various machine learning techniques. Firm type - Laptop Manufacturing Firm Type of Laptops - 5 types with increasing cost price

1.4 Overview of the report


Chapter 2 discusses about various theoretical models used such as K-Nearest Neighbour, Pricing mechanisms and Time series analysis model. Chapter 3 talks about concepts used in the Supply Chain Management game and related concepts such as Game flow. Chapter 4 discusses the implementation of 2-level K-Nearest Neighbour model, various learning factors with their learning mechanisms and time series analysis model with regression analysis. It also gives the overview of the Database schema used. In Chapter 5, we discuss the results of the project.

P a g e | 10

Chapter 2 THEORETICAL MODELS

P a g e | 11 In this chapter, we discuss various theoretical models used in the project. We discuss general K-Nearest Neighbour model, its advantages and disadvantages. We also discuss Pricing Mechanism with different learning factors and Time Series Analysis model.

2.1 KNN

2.1.1 Definition
In pattern recognition, the k-nearest neighbor algorithm (KNN) is a method for classifying objects based on closest training examples in the feature space. KNN is a type of instancebased learning, or lazy learning where the function is only approximated locally and all computation is deferred until classification.

2.1.2 Advantages
1. Nonparametric architecture 2. Simple 3. Powerful 4. Requires no training time

2.1.3 Disadvantages
1. Memory intensive 2. Classification/estimation is slow The type of distant metric: Euclidean distance

Dist ( X , Y )

( Xi Yi)
i 1

The numbers of nearest neighbors (K) should be based on cross validation over a number of K settings. A good rule-of-thumb numbers is k should be less than the square root of the total number of training patterns.

P a g e | 12

2.2 Pricing Mechanism


2.2.1 Definition
Price mechanism is an economic term that refers to the buyers and sellers who negotiate prices of goods or services depending on demand and supply. The implementation of the pricing mechanism is based on the following factors:
1. 2. 3. 4. 5. Demand Factor, Due Date Factor, Quantity Factor, Reserve Price Factor, Minimum Profit Factor.

2.2.2 Factors Demand Factor:


Demand Factor is based upon Price elasticity of demand which is a measure used in economics to show the responsiveness, or elasticity, of the quantity demanded of a good or service to a change in its price. Revenue is maximized when demand factor is taken in consideration during the pricing of any commodity.

Due Date Factor:


Due Date Factor is based on the time based pricing mechanism which states about the economics of variation of price based upon the urgency of the product to be delivered. Greater the urgency of the product greater is the price of the product.

P a g e | 13

Quantity Factor:
Quantity factor is based upon the pricing mechanism where greater the quantity of goods purchased in a single order greater is the discount offered to the buyer. Such a discount mechanism helps maintain an optimum amount of profit margin.

Reserve Price Factor:


Reserve Price Factor is based on the fundamental of economic where the seller charges more to the buyer who is willing to pay more. Using this factor for increase in the price helps in increasing the profit margins and generates greater revenues. Greater the reserve price of the RFQ greater is the bid price suggested using this factor.

Minimum Profit Factor:


Minimum Profit Factor helps in maintaining optimum price levels by increasing or decreasing the profit earned thus helping in winning greater number of RFQ. It helps in maintaining the price levels between the maximum and the minimum winning price for each type of laptop in the previous turn.

P a g e | 14

2.3 Time Series Analysis Model


There are two main approaches for forecasting. Either the estimate of future quantity is based on an analysis of factors which are believed to influence new quantities ( Explanatory method) or else the prediction is based on an inferred study of the past general RFQ generation behavior over time (Extrapolation method). It is possible that both approaches will lead to the creation of accurate and useful forecasts, but it must be noted that even for a modest degree of desired accuracy, the former method is often more difficult to implement and validate than the latter approach. Because of this reason, the given task was tackled by the extrapolation or time series approach. Following is the example of WOMETCO Corporation for which future sales are predicted based on the past available sales data of the corporation. Past Sales of WOMETCO corporation:

Figure 3 WOMETCO Corp. Sales. Courtesy: [3]

2.3.1 Analysis of data


General analysis of the above figure shows that a variety of things are likely influence sales. In general, there are three types of sales components in time series analysis:
1. Seasonality: They are regular sales fluctuations which are repeated from year to year with about the same timing and level of intensity. 2. Growth or Decay Trends: They are tendencies for sales to increase or decrease fairly steadily over time 3. Irregularities: They are any sales fluctuations not classified as one of the above.

P a g e | 15 Graphical representation of the sales data:

Figure 4 Graphical Sales data of WOMETCO Corp. Courtesy: [3]

To be able to make a proper sales forecast, it must be known to what extent each of the above components is present in the sales data. Hence, in the forecast procedure, initially these component effects are removed from the data (decomposition). After the effects are measured, making a forecast requires putting back the components on new sales estimates (recomposition). STEP 1: Deseasonalizing the data Without deseasonalizing the data, it may be incorrectly inferred that recent sales growth patterns will continue indefinitely. To measure seasonal effects, a series of seasonal indices are calculated using the ratio-to-moving average approach. Seasonal indices measure how far above or below a given period stands in comparison to the expected sales period. The expected sales are represented by a seasonal index of 100. Procedure for deseasonalization:
1. 2. 3. 4. Compute a centred 13-period moving average for all possible periods for all given years. Compute the ratio of actual sales in each period to the moving average from step 1. Average the above ratios for periods 1-13 for all given years. Correct the averaged ratios from step 3 for possible round off error to get the 13-period seasonal index set. 5. Divide the original sales by the seasonal indices to get the deseasonalized sales levels.

P a g e | 16 STEP 2: Measuring the Sales trend The measurement of the trend component is done by fitting a line to the sales data for all given years. This fitted line is calculated by the method of least squares that represents the overall linear trend of the sales growth over time. Trend line equation: Y = A + B.X Where, Y = predicted sales level A = vertical intercept of the trend line equation B = sales growth rate per period (slope of the trend line equation) The trend line parameters A and B are calculated using mathematical formulas. STEP 3: Making the Sales forecasts The procedure for making the sales forecast is as follows:
1. Compute the future sales trend level using the trend line equation. 2. Multiply the sales trend level from step 1 by the period seasonal index to include seasonal effects.

P a g e | 17

Chapter 3 GAME FLOW AND CONCEPTS

P a g e | 18 In this chapter, we discuss the general concepts used in the Supply Chain Management game. We also discuss the Game Flow.

3.1 Concepts
1. Server Sever is the coordinator in-between Agents and Customers. Every RFQ request from Customers goes through the Server to Agents and every bid by Agents goes through Server to Customers. Server, in this case, acts as a Customer, generating RFQs for each turn and electing the winner for each RFQ by processing bids on behalf of Customers. 2. Agent Agent is any representative of the firm participating in the game. 3. Reverse Auction Mechanism Reverse auction is different from normal auction in the case that, in normal auction, there is only one selling price for the good and Buyers bid on that good. Whereas, in Reverse auction, there are many RFQs coming from Buyers and Sellers bid on them.

Figure 5 Reverse Auction Bidding

Reverse auction includes three steps: a. RFQs: In this step, Customers (Buyers) generate RFQs and send them to the Agents (Sellers). b. Bids: Before this step, all the agents have received all the RFQs. Now, Agents bid on the RFQs, they want and send these bids to the customers. c. Winner: After receiving all the bids, customer evaluate winner for each RFQ depending upon the reserve price of the RFQ and the price bid by Agents. Generally, Agent bidding lowest price for the RFQ wins.

P a g e | 19

4. RFQ (Request-for-quotes)

RFQs are basically demand requests from the customers. Each RFQ includes ID of the RFQ, turn number, type and quantity of laptop, reserve price per laptop, due duration and penalty per laptop. Reserve price is the maximum price per laptop customer is willing to pay. Due duration is the maximum period during which the order must be fulfilled. Penalty is the price to be paid by an Agent, if he cant fulfil the order within the due duration period.

3.2 Game Flow

Figure 6 Overview of Game Flow

The game of auction-bidding is played between many agents willing to sell their product in the market. Here, Server serves as the Customer side. Actual game flow is described as follows: 1. Generate RFQs: For each turn server generates the RFQs and sends them to each Agent 2. Process RFQ: Each Agent receives each RFQ from the server. Now its time for Agent to decide on which RFQs to bid on and how much.

P a g e | 20

3. Modifying learning factors: According to past data, Agent modifies the old learning factors and generates the new one. 4. Apply KNN: With reference to previous data, Agent applies 2-level KNN to get past RFQs which are closest to the RFQs in the current turn. These selected RFQs are then used to calculate minimum profit in the bid. 5. Calculate bid value for selected bids: Agent selects the RFQs to bid on using the Reserve price of RFQ and cost price of laptop. Then Agent calculates the final bid value for the selected RFQs by mathematical learning formulas giving proper weightage to each learning factor. 6. Bid: Now Agent sends the bids to the Server back. 7. Process Bids: Server now for each RFQ calculates the winner based on the bid price sent by agents. 8. Update Database: Both Server and Agent modify their databases based on current turn RFQs, highest and lowest bids and winners.

P a g e | 21

Chapter 4 IMPLEMENTATION

P a g e | 22 The objective of this chapter is to discuss the implementation of 2-level K-Nearest Neighbour algorithm, implementation of Pricing Mechanism and implementation of Time Series Analysis with Regression.

4.1 Implementation of 2-level K-Nearest Neighbour


The objective of this phase is to evaluate the k-Nearest neighbours for the given RFQ in the present turn so as to properly evaluate the bidding price. Calculating the nearest neighbours form the local knowledge base at the agent database and evaluating the winloss ratio in the neighbours helps us in proper fixation of the RFQs to be bid upon and also the proper price suggested to maximize the chance of winning the given RFQ. The implementation of this phase is done in two steps namely: Step 1.Selection of the RFQs which will maximize the profit of the organization. Step 2.Using the 2-level KNN scheme for finding the optimum set of the RFQs form the local Knowledge base (Table: localkb) which match the given RFQ.

Step 1:
Agent specifies the cost price associated with each of type of laptop in addition to the minimum percentage of profit which it wants to earn from the manufacturing of the laptop. The minimum profit which the manufacturer wants to earn along with the reserve price and the cost price helps in selection of RFQs on which the 2-level KNN has to be applied using the formula: Cost_price * (1 + minimum_profit_percentage) Reserve Price. The RFQs filtered through this process are be used in 2 -level KNN scheme for evaluation of the proper price for that particular RFQ. Ignore the remaining RFQs from further computation thereby improving the efficiency of the computation model.

P a g e | 23

Step 2:
The prime factor based on which any RFQ can classify as the neighbour of any other RFQ is the type of the laptop in the RFQ. In addition to the type of the laptop two other factors which can help in finding the neighbours to the given RFQ are
1. Due_date. 2. Reserve price

4.1.1 Level 1 of KNN Prime Factor used is Due_date Importance:


Due_date Factor or time based pricing is type offer or contract by a provider of a service or supplier of a commodity, in which the price depends on the time when the service is provided or the commodity is delivered.

Important Variables:
Due1: Progresses towards lower limit of due_date form the current due_date. Progresses toward upper_limit of due_date from the current due_date. Past data stored at the agent side. Neighbours of the current RFQ based on the due_date. Maximum neighbours to the current RFQ based on due_date.

Due2:

Past_data: Neighbours: K1:

Method:
Step 1.Initialise Due1 and Due2 as the due_date in the present RFQ. Step 2.Search through the past data with due_date in the past RFQs matching either Due1 or Due2.

P a g e | 24 Step 3.Add the past RFQ to the Neighbours list until count in the Neighbours reaches the desired limit i.e. K1. list

Step 4.If limit is not reached the gradually decrease Due1 and increase Due2 until the desired count of the neighbours is achieved.

4.1.2 Level 2 of KNN Prime Factor used is Reserve price Importance:


Reserve is an important factor as the pricing mechanism of the manufacturer often depends to a large extent on the price the buyer is willing to pay.

Important Variables:
Res1: Progresses towards lower_limit of reserve price from current reserve price. Res2: Progresses toward upper_limit of reserve price from the current reserve price. Past_data: Data received from the 1st level of KNN application.

Neighbours: Neighbours of the current RFQ based on the reserve price K2: Maximum neighbours to the current RFQ based on reserve price.

Method:
Step 1.Initialise Res1 and Res2 to reserve price in the present RFQ. Step 2.Search through past data with reserve price in the past RFQs matching either Res1 or Res2. Step 3.Add the past RFQ to the Neighbours list until count in the Neighbours reaches the desired limit i.e. K2. list

P a g e | 25

Step 4.If the limit is not reached the gradually decrease Res1 and increase Res2 until the desired count of the neighbours is achieved.

4.2 Implementation of Pricing Mechanism


The objective of this phase is to implement the pricing mechanism along with the different factors used in the process of fixation of the price for a RFQ to be bid upon. For keeping the factors as dynamic and time varying after each turn each factor is evaluated based on the win/loss ratio of the past data. This helps in keeping the price suggested by the algorithm in check and improves the efficiency of the algorithm. The implementation of the pricing mechanism is based on the following factors: 1. 2. 3. 4. 5. Demand Factor, Due Date Factor, Quantity Factor, Reserve Price Factor, Minimum Profit Factor.

4.2.1 Demand Factor


Implementation Details: The demand factor is different for each type of the laptop namely A, B, C, D, E. Past_data: Method: Demand factor helps in increasing or decreasing of the price based on the current demand for that type of laptop in the market. The factor is updated as follows: New_Factor = 0.9*old_factor + 0.2*(current demand/moving average of demand of last 5 turns). If the demand is increasing for any type of the laptop the factor corresponding to that type will increase resulting to greater pricing for that particular type. Data received from the 1st level of KNN application.

P a g e | 26

4.2.2 Due Date Factor


Implementation Details: Due Duration Factor is divided into two factors namely for due duration of comparatively shorter periods and other for comparatively longer duration. DueFactorH: For periods of longer duration (above 8 days). DueFactorL: days). Method: DueFactorH is used because higher the due duration for a particular product greater is the discount and similarly for DueFactorL lesser the due duration or greater the urgency of the product greater is the price. The factors are updated based on the loss percent in the previous turn as follows: New_Factor = 0.9*Old_factor + 0.2*(loss percent in previous turn of respective factors) In price evaluation if the due duration for a product is below 8 days the factor DueFactorL is added to the final price else if due duration if greater than 8 days the factor is subtracted from the price of the product. For periods of shorter duration or urgent products (below 8

4.2.3 Quantity Factor


Implementation Details: Quantity factor for the RFQs has been divided into two components namely for RFQs with large order and for RFQs with comparatively smaller quantities of order. QuantityFactorL: For RFQs with relatively low quantity of purchase. QuantityFactorH: For RFQs with relatively high quantity of purchase. Method: Greater the quantity of purchase greater must be the discount offered on the whole purchase.

P a g e | 27

QuantityFactorH is used to maintain this principle. Similarly lesser the quantity of purchase greater must be the cost associated with the product. QuantityFactorL is useful for greater pricing when the quantity ordered is low. The factors are updated based on the loss percent in the previous turn as follows: New_Factor = 0.9*Old_factor + 0.2*(loss percent in previous turn of respective factors).

4.2.4 Reserve Price Factor


Implementation Details: ReservePrice: The factor used for maintaining connection of price bid with the reserve price of the RFQ. Past Data: Nearest neighbours to the given RFQ found from the 2-level KNN scheme.

Method: Based on the past data the factor of reserve price is updated for each RFQ in each turn. The factor is updated on the basis of win/loss of the past data. The factor is updated as follows: New_factor = old_factor (current reserve price/past data reserve price) Win in the past data results in addition to the new factor while loss results in subtraction.

P a g e | 28

4.2.5 Minimum Profit Factor


Implementation: MinProfit: Profit factor which helps in keeping the bid suggested between the minimum and the maximum price for the type of laptop. The minimum and the maximum winning price of each type of laptop in the previous turn. Nearest neighbours of the given RFQ based on the 2-level KNN scheme.

Past Data1: Past Data2:

Method: Average (avg) of minimum and maximum winning price of each type of laptop in previous turn is calculated. Then MinProfit factor is updated as follows: MinProfit += (avg bid price in Past Data2)/avg. This helps check whether the price bid in last round was towards upper limit or the lower limit and thus we can accordingly adjust the price for the present turn

4.2.6 Final Bid Price Calculation


Bid Value = costPr + 0.03 * costPr * minProfitFactor + 0.03 * costPr * demandFactor 0.02 * costPr * quantityFactor 0.02 * costPr * dueDurationFactor + 0.03 * costPr * reservePriceFactor Where, costPr = Base Cost price of laptop

P a g e | 29

4.3 Implementation of Time Series Model and Regression


For prediction of future requests of laptops, we use Time series analysis model as described in the models used. In the game, Agent cannot use this approach until he is having enough data for prediction (usually after turn number five, Agent has enough data). To predict future quantities for each type of laptop, we use the quantity of laptops in the past RFQs. It is assumed that in the game the period of three turns constitutes a year.

4.3.1 Deseasonalization
1. We compute a 3-period moving average for all possible periods for all given years. 2. We compute the ratio of actual quantity in each period to the moving average from step 1. 3. We average the above ratios for periods 1-3 for all given years. 4. We correct the averaged ratios from step 3 for possible round off error to get the 3-period seasonal index set. 5. We divide the original sales by the seasonal indices to get the deseasonalized sales levels.

4.3.2 Measuring the Trend


We get the deseasonalized data from above steps. Now to get the trend line equation, we form the set of two simultaneous equations from this deseasonalized data: Y1 = A.X1 + B Y2 = A.X2 + B Hence, A = (Y2 Y1)/ (X2 X1) and B = (X1.Y2 X2.Y1) / (X1 X2) Now, for each set of equations we get a value of A and value of B. We calculate average of these values to get final value of A and B. Thus, we get a trend line equation: Y = A.X + B.

4.3.3 Making the forecast


Now we extend the trend line till the turn number for which we want the future demand. Then again we introduce the effects that we had removed from original data. i. e. we multiply the trend level value by period seasonal index. The above method of forecasting is repeated for each type of laptop separately.

P a g e | 30

4.4 Database Schema


4.4.1 Server Database
a. Agents table (Static) Agents table has primary information about all the agents/firms participating in the game. This is a static table. Primary Key: compId compId: Unique ID assigned to each firm/agent compName: Name of the firm b. RFQ table RFQ table is populated each time when new RFQs are generated for each turn. It contains information about each RFQ. Each RFQ exclusively has order for only one type of laptop. Primary Key: RFQId RFQId: Unique ID generated by Server for each RFQ (turn-wide unique) turnNo: Turn number of the current turn typeLaptop: Type of laptop requested by customer quantity: Quantity of laptops requested by customer reservePrice: Maximum price per laptop that customer is willing to pay dueDuration: Duration given by customer to fulfill the order penalty: Penalty per laptop charged by customer, if the order is not fulfilled in given due duration period winner: Winner firm/agent of the given RFQ c. Bids table Bids table contains all the information about bids made by different agents on the RFQs. Primary Key: RFQId, AgentId RFQId: RFQ ID of the RFQ on which bid is being made turnNo: Turn number of the RFQ agentId: ID of an Agent, who is bidding price: Bid price quoted by Agent d. Global Knowledge Base Global Knowledge Base is shared by all the participating agents. It contains the summary of the given turn number and type of laptop.

P a g e | 31

Primary Key: turnNo, typeLaptop turnNo: Turn number of the RFQ typeLaptop: Type of the laptop requested highestPrice: Highest price bid by any Agent in the given turn for given type of laptop lowestPrice: Lowest price bid by any Agent in the given turn for given type of laptop

4.4.2 Agent Database


a. RFQ table RFQ table contains the RFQs sent by Sever to the agent for each turn. This table is same as the RFQ table on the Server side except the Winner field. b. Cost Price table (Static) Cost Price table contains the basic price of each type of laptop decided by the agent. This is a static table. Primary Key: typeLaptop typeLaptop: Type of laptop cost: Base cost price of given type of laptop c. Future RFQ table Future RFQ table contains the future quantities for each type of laptop predicted by the agent. Primary Key: turnNo, typeLaptop turnNo: Turn number for which RFQs are predicted typeLaptop: Type of laptop quantity: Total quantity of laptop predicted for given type for given turn d. Factors table Factors table contains the learning factors and their current values used by an Agent algorithm. Primary Key: factor factor: Name of the Learning Factor value: Current value of the factor

P a g e | 32 e. Local Knowledge Base Local Knowledge Base is developed by each Agent on its own. It contains the information about the past RFQs, price bid by Agent, win/loss, profit. Primary Key: RFQId RFQId: ID of the RFQ turnNo: Turn number typeLaptop: Type of laptop quantity: Quantity of laptop priceBid: Price bid per laptop wonOrLost: Whether the bid on the RFQ was won or lost profit: Profit made by Agent, if the bid was won

P a g e | 33

Chapter 5 RESULTS

P a g e | 34 Aim of this chapter is to discuss the working of the Supply Chain Management game model and to discuss the output of RFQ selection, Bid price prediction and future demand prediction.

5.1 Task 1 and 2


Following is a snapshot from the running demo of project. It shows the Agent screen.

Figure 7 Snapshot of the Game (Agent Screen)

Turn_no: Shows current turn number i.e. 7. RFQId: Shows unique RFQ ID number Type: Denotes the type of laptop in RFQ Quantity: Displays the number of laptops ordered Reserve_price: Denotes the reserve price given by customer Due_Duration: Shows the duration within which the delivery is required Penalty: Displays the percentage of laptop price that must be paid by agent in case of late delivery.

P a g e | 35 Bid_sugg: Bids suggested by Agent for each RFQ. 0 denotes that User should not bid on the RFQ according to agent. Bid: Actual bid price quoted by User

5.2 Task 3
This is a snapshot of the demo where future quantities are predicted by an agent for each type of laptop for next turn i.e. turn number 8.

Figure 8 Snapshot of the Game (Demand prediction)

Following is the comparison for turn number 7 to turn number 21 of the Quantities of type of laptop a predicted by agent and actual quantities in RFQs.

Figure 9 Graphical Analysis for future demand prediction for type 'a' laptop

Series 1 shows the actual quantities in RFQs, whereas series 2 shows the quantities predicted by the agent. We wait till turn number 5 to gather enough history data to predict the future quantities. It is found that Agent predicts quantities with significance of 4.

P a g e | 36

Chapter 6 CONCLUSION AND FUTURE WORK

P a g e | 37

6.1 Conclusion
The replica of actual Reverse Auction bidding game was successfully implemented and tested using various test cases and found to run correctly as per expectations. According to the rigorous testing of the Server-Agent game, K-Nearest Neighbour and various pricing mechanisms were successfully incorporated into a single efficient algorithm to optimally predict the bid prices for the selected RFQs. Also it was found that Time series analysis and Regression techniques can be effectively used for forecasting future quantities for different types of laptops. The prediction output of the machine learning agent such as RFQ selection, Bid price prediction and future demand prediction can be supplied as an input to the agent working as a Game theory model to help stabilize the overall game.

6.2 Future Work


1. To check the performance of agent algorithm in real time environment i.e. comparing the performance of agent with other similar algorithms. 2. To improve the accuracy of constant factors which decide the contribution of the learning factors. 3. To develop the relationship between the learning factors which are currently individually considered. 4. To improve the performance of overall algorithm using Boosting techniques such as AdaBoost, BoosTexter, etc.

P a g e | 38

References
[1] The Discipline of Machine Learning, Tom M Mitchell, Carnegie Mellon University, Pittsburgh, USA: Tata McGraw Hill. [2] Bidding for Customer Orders in TAC SCM: A Learning Approach, David Pardoe, Peter Stone, University of Texas, USA. [3] Seasonal and cycling forecasting for the small firms (1985), Hossein Arsham, Stephen Shao, University of Baltimore. [4] The Supply Chain Management Game for the 2007 Trading Agent Competition (2007), John Collins, Raghu Arunachalam., Carnegie Mellon University, Pittsburgh, USA. [5] The 2009 Supply Chain Trading Agent Competition (2009), Michael Benisch, Perry Chu, Ramprasad Ravichandran, Carnegie Mellon University, Pittsburgh, USA. [6] Forecasting Market Prices in Supply Chain Game (2007), Christopher Keikntveld, Jason Miller, Patrick Jordan, University of Michigan, USA. [7] Machine Learning for Automated Supply Chain Management (2006), Selwyn Piramuthu, University of Florida, USA.

Potrebbero piacerti anche