University of Manchester School of Computer Science. Deterministic and Probabilistic Cellular Automata: Simulating new product diffusion in a market

Size: px
Start display at page:

Download "University of Manchester School of Computer Science. Deterministic and Probabilistic Cellular Automata: Simulating new product diffusion in a market"

Transcription

1 University of Manchester School of Computer Science Deterministic and Probabilistic Cellular Automata: Simulating new product diffusion in a market Author: Elvin Ibishli Supervisor: Dr. Carole Twining Project Report April, 2014

2 Abstract New product diffusion is the one of the most demanding market research problems. Commercial organisations spend huge amounts of money on market analysis in order to grow and increase their profit. Several business models have been formulated to forecast the sales of innovative products in order to achieve a competitive advantage. Cellular Automata is a discrete model used in science to simulate various problems as an abstract computational system. Recently, it has been used in business models, especially to analyse a homogenous market structure, in which all customers are considered with the same adoption characteristics. This report represents the cellular automata simulation of new product diffusion in a heterogeneous market, in which various customer segments demonstrate distinctive behaviours. After analysis of the research papers, a new model is formulated, implemented and evaluated. Key Words: new product diffusion, cellular automata, business model, marketing, innovation, imitation, segmentation 2

3 Acknowledgements Thank you to my supervisor Dr. Carole Twining for the continuous support and the valuable advices given during the whole project. I would also like to thank my family just for being my Mum, Dad and Brother. 3

4 Table of Contents Chapter Introduction Inception Aims New product diffusion in the market Cellular automata basics One dimensional cellular automata Two dimensional cellular automata Deterministic Cellular Automata Probabilistic Cellular Automata Report Structure Chapter Research and Background Research area Bass model GLM Model Other Research Papers Results of the research Chapter Designing The motivation of designing a new model Original Bass model as the cellular automata recreation Heterogeneous market segmentation Mathematical design of the model Transforming Coupled Bass model to cellular automata model Initial source code research Software Design Requirement Gathering Use Cases Architecture of the System Chapter Implementation Implementation Methodology Heterogeneous Market Testing deterministic code

5 3.1 Implementation of the Innovators and Imitators Implementation of the Innovation Implementation of the imitation Creating a Torus Structure GUI Counting Innovators And Imitators Plotting Testing Chapter Testing and Evaluation Evaluating Probabilistic Market Evaluating Ordinary Bass Model Evaluating Probabilistic Coupled Bass Model Evaluating Latest Coupled Bass Model Comparing Coupled Bass Model with Matlab Simulation Evaluating market saturation Chapter Conclusion and Future Works Overview of the project Future Works

6 Chapter 1 Introduction This chapter is the general overview of the project. After identifying the main purposes of the project, an emerging business problem, which is new product diffusion, will be briefly introduced. The rest of the chapter will concentrate on what a basic cellular automata is, with some examples. 1.1 Inception Over the past 10 years, companies expenditures on new products Research and Development (R&D) facilities have increased enormously. The key players in the computing and electronics industry such as Samsung, Apple and Sony, spend billions of dollars to analyse the market, before they launch new products (see Appendix Figure A). However, new product failure rates have variously been reported in the range of 40 to 90 percent [1]. Over the last few years, R&D teams of top companies have started using new methods to gather a better and deeper understanding of customer needs and to monitor the diffusion of the innovation over time. According to a survey conducted by Booz and Co among 350 global companies, about $52 billion was invested in software tools, to help predict the market, in 2013 [2]. The main purpose of the project is to further investigate the issues mentioned above by using a cellular automata technique. It is one of the widespread models used in many fields of science such as mathematics, physics and biology. The basic idea is very simple. There is a collection of the cells on a grid with a finite number of states (e.g. on and off) that changes in the discrete time steps according to a set of rules, based on states of the neighbouring cells. [3]. On the other hand, although it has a great perspective to solve many business problems, the technique has been applied to a sector only in the last few years. Consequently, the idea of developing software to forecast market by using cellular automata seemed quite meaningful as well as beneficial. 1.2 Aims The fundamental aims of the project are: Designing a new model that concerns new product diffusion in the market. Using this model to develop a cellular automata simulation programme. 6

7 The first one was the initial main part of the project. The goal was to design a more complicated heterogeneous marketplace in which, more than one type of customers take part. The second phase of the project was aimed to transform the proposed model into a software piece and build a cellular automata simulator. One of the main challenges through the project s lifetime was paying attention to business aspects that crosscut the development process. That is because the purpose of the project was not just developing a cellular automata programme, but one that was directly related with the emerging business problem. 1.3 New Product Diffusion In The Market. The process by which a market adopts an innovation and purchase new products is referred to as the process of diffusion. According to Rogers, there are five main categories of adopters, which together creates product life cycle curve, as shown in Figure 1, [4]. Figure 1: The process of diffusion, copied from Rogers [4]. Innovators are the group that forms % 2.5 of the buying population, and are often well educated, confident, and financially strong people. They like new ideas and therefore kick-start the adoption process, which means they are more likely to take risks, associated with the new products [4]. According to Bass, these early owners influence the rest of the groups to adopt it. Thus, the other four groups are referred to as imitators, who spread the innovation in the market through the word of mouth principle [5]. The diffusion rate is a function of the speed at which sales occur and the size of the market. This means that diffusion does not occur at the constant or predictable speed; it may be fast or slow [4]. Diffusion of the new products can be compared with the idea of the epidemiology, like spreading a virus. In the first diffusion case, customers who invented the product influence others to buy it, and in the second one, people who caught the disease, may then spread it to those around 7

8 them. The main difference between the two cases is that the aim of the marketing manager is to sell more products and influence as many potential customers as possible, while the epidemiologist s goal is to prevent against the illness and decrease the number of the people influenced. 1.4 Cellular Automata Basics Since cellular automata (CA) is the core idea behind the implementation, it was necessary to become familiar with the main concepts. Cellular automata are complex systems containing large numbers of identical components with local interactions. Typical cellular automata consist of an N- dimensional (e.g. 1, 2, 3) lattice of cells. Each cell has a finite set of possible values, which may synchronously change according to transition rules over discrete time steps. The value of the cell is determined by previous values of the neighbourhood of cells around it [6] One-dimensional Cellular Automata One-dimensional cellular automata is the simplest form of the systems, where each cell has two neighbours. Stephen Wolfram spent considerable time contributing to the study of the 256 different one-dimensional cellular automata rules. Figure 2 shows one of them, the Rule 90 from his A New Kind of Science book [3]. Each cells is coloured either in black (1) or white (0). The above section is the rule itself where top row shows the possible combinations of colours for cell and its immediate neighbours. The bottom row specifies what colour the centre cell should be on the next step in each of these cases. The section below is the result of the Rule 90 after being implemented 15 times [3]. Figure 2: One dimensional cellular automata with Rule 90. Copied from Stephen Wolfram[3]. 8

9 1.4.2 Two-dimensional Cellular Automata In 1970, John Conway introduced a Game of Life, the two-dimensional cellular automata which was very influential. The game is the zero-player game which means no participation is required after initial configuration. The evolution occurs with the defined 4 rules, and then various interesting behaviours can be observed [3]. Similarly, in this project, the decision was made to develop lattice as a 2D square grid based on the Moore neighbourhood where each cell has 8 neighbours. This will give us 512( 29) possible patterns in 2 coloured(state) system. Figure 3 shows the Moore neighbourhood, where the centre cell is coloured in black and its neighbours in white. It also specifies a structure of cell coordinates used in the project. (-1, -1) (0, -1) (1, -1) (-1, 0) (0, 0) (1, 0) (-1, 1) (0, 1) (1, 1) Figure 3: Moore neighbourhood with coordinates Deterministic Cellular Automata A deterministic cellular automaton is one whose behaviour depends on rules, which take into account the current state of the cell and its neighbours to determine their next state [7]. In mathematical terms one-dimensional deterministic cellular automaton can be described by an evolution of the form ( ) ( ( ) ( ) ( )) where each lattice site and discrete time, ( ) belong to a fixed finite set, (e.g. ) [8]. Both Stephen Wolfram s book and John Conway s Game discussed in the previous section, are examples of the deterministic CA. (1) 9

10 1.4.4 Probabilistic Cellular Automata In probabilistic cellular automata, the rule determines the probability of various outputs, rather than determining them absolutely [7]. This project is an example of probabilistic implementation, where states of the sales change according to some advanced stochastic rules, which will be discussed later. In a basic form, the probability of an adoption of a product by any customer is equal to ½, which means that, each cell has 50% chance of either buying a product or not. Excessive usage of the probabilistic elements may result in the noisy and sometimes annoying behaviour. One such behaviour, encountered during the project will be discussed in Chapter 4, which was later avoided by an alternative implementation. Still probabilistic cellular automata were used a lot in the system to investigate into a dynamical behaviour of the customers. 1.5 Report Structure The rest of the report will include the following chapters: Chapter 2, Research and Background: covers the main product diffusion models - Bass and GLM, which are the fundamentals of the project. Chapter 3, Designing: provides information about the new model, how it can be transformed to cellular automata rule, also a short description about the architecture of the software. Chapter 4, Implementation: covers the methodology used in the development process and some of the algorithms written as important functions of the software. Chapter 5, Evaluating: presents the results of the simulations and their analysis. Chapter 6, Conclusion: evaluates achievements in the whole project and underlines some of the future works could be done for improvement. 10

11 Chapter 2 Research and Background The previous chapter briefly introduced the new product diffusion and the cellular automata concepts. This chapter will highlight the Bass model, which is the main diffusion model that our project is based on. The rest of the chapter will focus on the GLM model, which was also influenced by the Bass model, but concerns the advantages of the cellular automata in it. 2.1 Research Area There are various marketing models, each attempting to clarify the diffusion of real-life products such as retailing, service, consumer durable, technology and agriculture [9]. Adoption rates of the products of these industries are different from one another. For example, the purchase of the retailing and service products occurred more often than that of the technology and consumer durable products. During the research and development processes of the project, technology and consumer durable products such as smartphones, pads and TVs were considered as the main objects. Thus, the diffusion models surveyed are more suitable for these kinds of products. 2.2 Bass Model A mathematical theory of the product diffusion was being born during the early 1960s. Some pioneering papers had been released (1, see foot note) before Roger s Diffusion of Innovation book [10] was published in The book was very successful but it only concerns the sociological aspect of the adaptation and diffusion processes. Relatively, this descriptive work was largely literary and did not include a mathematical theory. Later, in 1969, Professor Frank M. Bass published the Bass model, which was based on Roger s book. He managed to express the idea of innovation and imitation as a mathematical uation. According to his model the probability of adopting by those who have not yet adopted is a linear function of those who had previously adopted [5]. ( ) ( ) ( ) (2) 1 Fourt and Woodlock s Early prediction of market success of new grocery products [20] and Mansfield s Technical change and rate of imitation [21] 11

12 The three main parameters that define the Bass Model for a specific product are: - The potential market - Coefficient of innovation - Coefficient of imitation The potential market is the one that the organisation targets to sell its products to. The constant shows the number of members of this social system within which word of mouth from past adopters is the driver of new adoptions. The shows the coefficient of the innovation. As described in the previous part, its contribution to new adoptions does not depend on the number of prior adoptions. Since these inventions were, owing to some impact, outside the social system, it is called the "parameter of external influence. Advertisements are the most influential external factor. The shows the coefficient of the imitation. Its effect is relative to cumulative adoptions A(t) implying that the number of adoptions at time t is proportional to the number of prior adopters. It means the more people purchase products, the more others will be influenced in the social system. For this reason, it is also named the "parameter of internal influence [5]. The Figure 4 is the graph of the Bass model, which shows the number of the new adopters over the time. The innovators start from the highest point and steadily go down. This shows that the number of the people who buy new products without any internal influence is decreasing within the time, because as soon as a product becomes familiar in the market, less people invent it. Conversely, the effects of the internal influence start increasing until the middle of the interval, where sales reach the peak. This is the maturity cycle of the product. After that period, a decline cycle starts and the number of the people internally influenced decreases. Figure 4: Bass Diffusion Model. Copied from Wikipedia [37]. 12

13 The other variables in the Bass Model principle are: ( ) The portion of M that adopts at time t. ( ) The portion of M that has adopted by time t, ( ) Cumulative adopters at time t [5]. Although more than 40 years have passed, the Bass model is still remainings one of the most influential and widely cited papers of all time in marketing science [5]. Figure 5: Citation of the Bass Diffusion Model paper since published ( ) Copied from Management Science Journal [5]. 2.3 GLM Model The study of new product diffusion by using cellular automata is quite recent. The earlier one that was found during the research was Analysis of Cellular Automata Diffusion Models in Marketing [11] which was published in The paper analyses the Bass model by changing some parameters, and also introduces the new Cellular Automata GLM model. The changes were due to improve the Bass model by using cellular automata. It is suggested in the paper that one of the limitations of the Bass model - the coefficients of the innovators and imitators being the same for all members of the population - can be avoided with cellular automata implementation. Another identified difference between the two is that; time is discrete in cellular automata but continues in the Bass model. The adoption probability suggested by Goldenberg, Libai and Muller (GLM) considers an individual j- as the member of population who has not yet adopted and Aj- as the number of adopters amongst neighbours of j. Then the probability that individual j will adopt during the next step of the simulation will be: 13

14 ( ) ( ) ( ) The equation resembles that the probability of adoption is the complement of the probability of not adopting during this step, and the probability of not adopting is the product of the probabilities of the not adopting due to external influences ([ ( )]), and of not adopting owing to internal influences from each of the neighbouring adopters ( ( ) ). [11] The rest of the paper illustrates the relationship between different versions of both the Bass and GLM models. The Figure 6 shows that the GLM model converges to the Bass models in two ways, as t 0 (discrete time t goes to zero) and M (the number of members of the potential market M goes to infinity). (3) Figure 6: Relationship between different models. Copied from GLM [11]. In the first one, the GLM model initially converges to a Linear model when the t 0, which is later converges to the Bass model when and t 0. The Linear model is one of the transitive models introduced in the paper, which does not have a spatial structure. It assumes that, there is the population of size M and in time t = 0 - none of the members of the population have adopted the product. Again, we have external and internal influences in this model. (see the reference [11] for detailed description and equations of the model). The second way is, when, the GLM model converges to the Time-Discrete GLM model, which later converges to the Bass model as t Other Research Papers During the research phase, a lot of relevant papers were found which clarified different managerial aspects of the diffusion models. These comprise effects of the marketing mix elements such as promotion [12] and price [13], and also some other variables including product quality [14], market entry timing [15] and achieving competitive advantages [16]. The diffusion of innovation literature has grown considerably and continues to expand. Most of it involves developments that are extensions of the Bass Model [17]. One of them was published by Frank Bass, himself and John Norton in 1986 [18]. The paper deals not only with the diffusion but 14

15 also with the substitution of the high-technology products by successive generations. Each new generation of the product competes with the earlier one, since innovations in technologies are continually changing. The theoretical formula is simplified as: ( ) ( ) ( ) ( ) ( ) { ( ) ( ) } (4) and the variables are: shows the sales of the generation product at time t. equals to, where is the average repeat buying rate among adopters and is the incremental number of ultimate adopters of the th generation product [17]. In the model, the sales of generation one at time t are a function of before generation two arrives. The sales of generation two at time t are a function of and before generation three arrives, and then are a function of plus minus what the third steals, and so on. The same innovation and imitation rates were used for all generations [17]. Figure 7 shows the described process, (see Appendix Figure B, for a real data diagram). Figure 7: Illustrates the substitution and adoption of the high-technology products by successive generations, copied from Frank M. Bass and John A. Norton [18] In another recent paper, an extension of the Bass model, which is called Household Level Bass Model was used to analyse the adoption of the photo-voltaic (PV) solar panels. The various preferences of the segments were experimented according to cost and market awareness of the product, age and education level of the customer etc. [19].(see Appendix Figure C for detailed table). 15

16 2.5 Results of the Research After analysis of the Bass model and its extensions, a general conclusion was drawn that, cellular automata might be helpful in overwhelming the limitations of the mathematical models. For example, the Bass model generalises the entire market and is only concerned with the total number of adopters at the given time. In other words, it is an aggregate model that does not know about the real customers and their places in the individual level. Thus, the idea of transforming the Bass model into cellular automata seems quite reasonable, as suggested by GLM. This may help us model the individual consumer behaviour to identify the needs of the specific customers segments and measure the different adoption rates at the same time, as well as to use the important feature of the cellular automata which is representing customers behaviour in a visual way. All the papers discussed in this chapter have been found very valuable, since they investigate the behaviour of a homogeneous market more in depth. They were used as the fundamentals to create a new diffusion model, which will be covered in the next chapter. On the other hand, the new model is focused on studying the heterogeneous rather than homogenous market structure with the cellular automata which is different from the earlier discussed models. 16

17 Chapter 3 Designing This chapter covers the designing phase of a new diffusion model, which is based on a Bass model. The chapter also demonstrates how the new equation was transformed into a cellular automata model. 3.1 The Motivation of Designing a New Model Building software standing on a new model was very risky, since there were not previous works that could be directly referred in the designing and implementation phases. On the one hand, whether valuable results would be achieved or not was ambiguous. On the other hand, the concepts discussed in the previous chapter were found very interesting and inspiring. As a result, it was decided to spend considerable time on designing, implementing and analysing this new model. 3.2 Original Bass Model as the Cellular Automata Recreation It has already been discussed that, the Bass model considers an entire market as being composed of customers with the same characteristics, namely being homogenous. The number of the states in the model was three in total, one initial cell state and two after innovation and imitation rules applied. As a cellular automata rule, the system starts with an initial condition where customer does not have a product, then its state changes when the new product is bought, because of either external or internal influences. Virgin state: when customer has not adopted innovation yet. Innovation state: when customer buys a new product because of the impact of the external factors. Imitation state: when customer purchases a new product because of the internal factors. 3.3 Heterogeneous Market Segmentation In recent years the growing use of the marketing segmenting process has occurred because of the increasing prevalence of the greater diversity in customer needs [4]. People have different beliefs, wants and social statuses. They cannot be the same. That is the main reason why companies identify different segments, and then target one or more and position themselves to achieve a competitive advantage in this direction. [4] To achieve a more realistic market structure, a decision was made to have more than one segment in the new model. In marketing, consumer segmentation is done with three main criteria: 17

18 behavioural, psychographic and profile. Then they are divided into several sub-criteria according to factors such as purchase occasion, product usage and lifestyle. Since we already have three cell states for the single population in the Bass model, to achieve market heterogeneity by using all the above elements, would make it very complex to observe changes visually in the simulation. Thus, one of the most accurate segmentation indicators, purchase/transaction occasion of the behavioural criteria was taken, to do a market segmentation for the new model. Potential customer segments are derived from their transactions variables if there was previous occurrence or not. These are named as: Old customers: The group of people who had previously purchased a product from a company. New customers: The group of people who had not purchased any product from a company before. 3.4 Mathematical Design of the Model As soon as the general concept was formalised, it was time to represent it with a mathematical formula. The original Bass equation was not suitable for a heterogeneous market structure, since it considers all potential buyers as being the same. Thus, it was needed to generate a new formula. The equation (5) is the algebraic manipulation of the original Bass model. There are various representations of the Bass Model using different symbols, and they may seem to be a different equation, but they are all equivalent and can be obtained from the Bass model principle [5] The general idea is still the same; sale at time is equal to the total market size minus the number of cumulative adopters at time, ( ) This will give us the total number of non-adopters or in marketing terms potential customers. Then we multiply it by the sum of the proportion of innovators ( ) and the proportion of imitators ( ) which depends on the share of the people who have bought ( ). ( )( ) (5) Now let, us assume that our total market M consists of those two segments we discussed in the previous section; share of old ( ) and new ( ) customers. The total number of adopters was also divided into two parts; old customers who adopt at time t will be and new customers who adopt at time t will be. Consequently, by giving different innovation ( and ) and imitation rates ( and ) to two segments we achieve two sub-formulas. But then the question is; what is going to be? If we just say and for two populations we will have the Bass model copied twice with different parameters. On the other hand, we want the two segments to be influenced by each other. Sales to one segment should also be affected by sales to the other. Therefore, the proportion of the people who have adopted will influence non-adopters with given time to the first segment will be:. The sale at the 18

19 ( )( ) (6) The sale at the given time to the second segment will be: ( )( ) (7) If the parameters are the same for both sub-formulae such as = and = then we will return to an ordinary Bass model. If they are different, then we will achieve our differential formula, which is named as Coupled Bass model. The relationship between the two sub-formulae of the new model is shown in Figure 8. The total sale at the given time will be equal to the sum of the sales to the first segment and the sales to the second segment (St = St1 + St2). Figure 8: Coupled Bass Model, showing sales to one segment dependent on the number of buyers from both segments. The Matlab simulation was conducted to test the heterogenetic ability of the new model with a simple scenario. The first half of the population were characterised as being strong innovators and followers of the previous adopters. The other half of the population, never innovate ( ) and do not follow so strongly ( < ). Figure 9 illustrates the result of the simulation, which demonstrates an interesting behaviour of the populations. This cannot be achieved by a simple Bass model. The blue line is the sales to the first population, which quickly peak and then immediately fall when they have all bought the product. The red line shows the sales to the second population, which increase slowly and go down steadily with a longer tail. Companies are less interested in the segments which behave like the second population. Since external factors such as marketing campaigns, only influence the first population, they should be launched mostly in the earlier stages, when this group is more active. 19

20 Figure 9: Result of Matlab simulation, sales to two populations. 3.5 Transforming Coupled Bass Model to Cellular Automata Model As soon as the general concept - with the mathematical logic behind it - is achieved, the idea is ready to be transformed into the cellular automata version, as shown in Figure 10. Figure 10: Design structure of the cellular automata. In the designing, was decided to have a square cell representing potential customers and a grid of cells representing the market that a company wants to target with its new product. Those two different segments of our market, old and new customers, were designed with their own cell characteristics. Thus, in total we achieved six various cell states. These states are: 20

21 Initial State One - Cell can be an old customer without a product. Initial State Two - Cell can be a new customer without a product. Final State One - Old customers can innovate product Final State Two - Old customers can imitate product Final State Three - New customers can innovate product Final State Four- New customers can imitate product. The first two of them were before and the others were after the rule was implemented as shown in Figure 11: Figure 11: shows cell states, above two circles are the initial conditions, below four are the final states. The transition rule that changes a cell s state is presented in Figure 12. The first column illustrates the customer segments and the first row shows the number of the neighbours. Again, and are the proportion of the innovators of the two segments. They buy a new product even though none of their neighbours have bought it. The and are the proportion of the imitators of the two groups. The rule was designed to achieve different imitation rates of the segments, by adding a constant number to the balance of one group. So, the probability of the new customers being influenced to adopt innovation will be more than that of old customers. The software that was developed allows users to switch this function between the two groups. Moreover, the probability of the any customer imitating, increases with the number of the neighbours who have already bought the product. In other words, if you have more neighbours with the product, you are more likely to adopt innovation. That is the case for both segments. 21

22 Number of neighbours Old Customers New Customers = + = 2 + = 3 + = 8 + Figure 12: Probability of purchase, based on number of neighbours who have purchased. Transforming the idea of the Coupled Bass model into a cellular automata rule gave us power of flexibility. As can be seen, parameters ( s) are easily represented separately. This allowed us to implement different rules to different segments with various buying behaviours. 3.6 Initial Source Code Research Since the research and development phases of the model took longer than expected, a decision was made to find an initial source code to build the model on it. This was to avoid wasting time on the building of the basic structure of the cellular automata, and to save it to implement the functional parts of the software, which was directly related to the business model. Additionally, a sufficient amount of time was required to analyse and evaluate the results. Java was chosen as the implementation language for particular reasons: It is a cross-platform and object-oriented programming language. It provides application-programming interfaces (API s) with a large range of functionalities. Since cellular automata is the visual representation of the problems, Java has the better graphical user interface (GUI) libraries such as Swing and AWT. It is a personal choice as I had more experience in Java than in any other language, so it would be easier for me to take an initial code and manipulate it. Various diffusion programmes that had been found from other domains did not suit the business model. After discussion, it was decided to take the basic structure of the John Conway s Game of Life software, designed by the University of Virginia [22]. The code was written as homework to be finished by computer science students. The whole software was divided among classes meaningfully and commented on very well. After finishing, the initial implementation by using Eclipse, we got the two-dimensional grid with cells and each had two states, either dead or alive. The rule was deterministic, which was that; if a cell becomes alive, all the immediate neighbours become alive in the next step. Later, improvements were introduced into the structure of the programme by changing the current behaviour and adding new classes, so that the software 22

23 could respond to the requirements of the business model. Further discussion about the evaluation of the software will be in the next chapter. 3.7 Software Design Requirement Gathering Requirement documentation is important to define functional and non-functional requirements when building a system to ensure that users of the system achieve their business objectives. Otherwise, resources (e.g. time, money) may be and the system will not perform as required. Functional requirements define what the system does. They are core features of the system [23]. Some of the important functional requirements identified initially were implementation of the innovators and imitators, which were given higher priority to be completed earlier. Non-functional requirements guide and constrain the architecture. These specify the quality of the system rather than dictating specific behaviour [24]. Most of the algorithms that will be discussed in the next chapter are written in a way that they can be easily modified if any functional requirement changes in our fast-developing business world Use Cases In software engineering a use case defines the interaction between internal and external factors. This term describes how the user utilizes system to accomplish a particular goal. Drawing a use case diagram helps developers to comprehend the functionality of the system from a user perspective [25]. As an example, an actor (or in a business term a stakeholder), who is the user of the system, is determined to be a marketing manager. Use cases would then be written to identify the user s role within the system. Figure 13 shows the use case diagram of the developed system with basic UML notations. The first direct user interaction was with the parameter s panel, where the user sets an initial simulation condition, and then the system gets these parameters and build second panel which is the simulator panel, where user can start, do one step or, plot results. 23

24 Figure 13: Use Case Diagram shows, users interaction with the system Architecture of the System Software systems are large-scale complex structures. Most of them concern different levels of abstraction by hiding some of the details of the system through encapsulation, to better identify and maintain its properties [33]. A high-level system design class diagram is drawn to show an overview of the system which hides the low-level designing elements of the system. Such a diagram is used to generate a conceptual model which defines the static structure of the system and is used to generate the conceptual model [27]. Figure 14 shows a high-level representation of the core architecture of the new product diffusion system. 24

25 Figure 14: shows the relations between the classes of the system, only 7 out of 18 classes with main methods are shown for the purpose of simplicity. The CellAutomata class acts as an observer, whose sole job is to handle events, that occur in the system and react to react as accordingly. For example, when the user clicks the plotting button from the GUIPanel class, the CellAutomata class creates an association by calling the necessary method, in this case the creategraph() method from Plot class. The relationship between classes generates a Model-View-Controller (MVC) software architectural pattern. The MVC is primarily used in creating a GUI by separating three different aspects of the user interface. These are: the data - Model the visual representation of the data - View interface between the view and the model Controller. [28] as shown in Figure 15. In the new product diffusion design, the GUIPanel serves in the Controller role as it creates link between the system and the user. The CellAutomata class plays the Model role as it represents knowledge. Finally, the Plot class plays the View role which updates the model and represents the required information. 25

26 Figure 15: MPV software pattern, shows interaction between components.[28] The Grid class represents an entire simulation grid. One of the main methods implemented in the grid class is, randomfreelocation() which is used to find the cells that are not occupied (or in marketing terms new product that has not been adopted). Next, a some subset of these empty cells is randomly selected, so that we will not get same cell locations every time. These locations are then used in the CellGrid class - which extend the Grid class - to generate spontaneous buyers - innovators. Another important method implemented in Grid class is the neighbourcheck() method, which checks if the neighbour has purchased a product previously in order to determine the appropriate behaviour or not to behave as required. The grid consists of the cells. The Cell class calculates the state of the cell after one step which is used by the Diffusion class to calculate imitation algorithm. 26

27 Chapter 4 Implementation This chapter covers the implementation of the some of the functional requirements of the system that were valued with high priority. An implementation methodology will first be discussed, followed by then various innovation and imitation algorithms. 4.1 Implementation Methodology The new product diffusion with cellular automata software was developed by using agile principles. This is a methodology that encourages users to build software incrementally with the small time-boxed iterations over a period of time. After the end of the each iteration, working software should be delivered with the implemented features. As it is suggested in the manifesto [29], agile development helps code to gain the ability to respond quickly and appropriately to changes. As soon as the initial requirements are identified, they are divided into small user stories and assigned to iterations. The stories that are rated with higher priority are implemented first to achieve main the most important functionalities earlier. Only sufficient amount of requirements are gathered, designed, implemented and tested in each iteration to avoid big-upfront development principles. In the latter approach, all requirements are gathered as the very first step of the development process; the developer then starts designing and implementing the software. After finishing these stages in order, the whole system is tested. Because the system is developed as a single unit, it is difficult to change any requirements of the system at a later time. In contrast, in agile development, the control is achieved over the complex system by building the system up systematically. Moreover, using simple tools such as Story/Task Board helps programmer to work more efficiently and to avoid time consuming tasks such as documentation. The idea of using the Story/Task Board is very simple. Initially the board is divided into sections. In the project, the four main sections to be considered are: a to do list where user stories of the identified requirements are stored to be implemented next; an in progress section where the stories that are currently in progress are added; a acceptance section where the story cards are placed after implementation is finished and waits for feedback from the stakeholder (supervisor); and then the final stage which is the done, section where completed stories are located. In the project, the story cards were named as GUI, Implementation and Testing codes according to their characteristics. Figure 16 shows the Story/ Task board from week 12, when part of the system was being implemented. 27

28 Figure 16: Story/Task board. 4.2 Heterogeneous Market As discussed earlier, the aim of the project was to examine the developed business model in a heterogeneous marketplace. Thus, related user stories were rated with a higher priority, and consequently implemented at an earlier stages in the project. An algorithm was written to randomly get the x and y coordinates of the cells from the grid and change their colour to either white or blue, so that two different cell states can be observed in the interface. But there was not any change in the behaviour of the cells except colours yet, as they were all acting according to the same predetermined rule. In deciding how optimal different behaviour of the different coloured cells can be achieved in the best way, the decision was made to create a multi-layered interface as shown in Figure 17. A two-dimensional array, serves as the front layer, in which the state of the cell changes when the product is being purchased. Another two-dimensional array serves as the hidden layer, in which the previous states of the cells are stored regardless of any changes occur in front layer. For example when the product is being bought by either old or new customer, the cell representing that particular customer will change its colour to green from a blue and a white, respectively. However, its previous state will still be stored as the backup on the hidden layer, so that, it can be used as the reference to diffuse according to the required rule. For example, if the cell s state was the new customer before the product has been bought, then its neighbours will follow the rule that matches this cell state; otherwise, the other rule will be followed. 28

29 Figure 17: shows two layers; the front one demonstrates some of the customers with the new product in green colour, and their previous states from the matching coordinates on the other layer. 4.3 Testing Deterministic Code The agile approach suggests that testing of the programme should be performed as soon possible. Thus, initial code was written to test a heterogeneous market with two different deterministic rules running at the same time, so that problems would not be encountered later. The idea was that if two completely different diffusion rules occurring simultaneously could be achieved, then it would be easier to obtain an implementation of the rules that differ for their adoption rates. But a problem was that, the cell would not know the previous state of its neighbours. Since it only knows its own state from the previous state array, but not the previous state of its neighbours, the cell does not know which rule to follow. Consequently, to solve this problem, a getnextstate() method was written as shown with pseudo code in Figure

30 Figure 18: shows pseudo code of test case Figure 19, below illustrates the implementation in progress. The different rules can be seen running at the same time, and while on one side there are followers of the old customers, on the other side there are followers of the new customers. Figure 19: Two different deterministic rules running at the same time, the followers of the blue cells are all buying product, and the followers of the new customers, only if they do not have the previous product. 30

31 4.4 Implementation of the Innovators and Imitators The next valuable step in implementation was to achieve a difference between, whether cells innovate or imitate. Information about cells being innovators and imitators is stored in the third two dimensional array, which is called Type of the Customer, and referred many to times in the implementation Implementation of the Innovation The implementation of the innovation was the most problematic one, thus different versions were implemented to achieve the best result. First probabilistic version The first version was the probabilistic innovation, in which a random number of cells and their places were selected among the non-adopters in each step. Then these cells changed their states and became innovators. But when the code was tested, it gave a very problematic result. Due to being probabilistic, any number could be chosen each time without considering the market size. For example, suppose we had a population of 100, with 50% probability of innovation. When a coin is tossed for each customer, the number of actual adopters could anywhere between or including 0 and 100. Therefore, innovation rate could possibly increase in the next step instead of decreasing over time as shown in Figure 2. The situations became even worse at the end of the simulation when fewer customers were left in the market without a product. For example, suppose there are 10 customers left in the market without a product and the randomly selected number is 2. In the next iteration, we left 8 customers and this time the randomly selected number is 9, which means all customers will invent the product. This sounds unreal and does not match with the Bass model. Thus, alternative implementations were created. Deterministic Implementation In the deterministic version, the behaviour of the class was divided into two parts. In the first part, the number of the steps was increased once each time, namely if customers innovated a product in 1 step, later their innovation occurs after 2 steps, then 3 and so on. However, while we increased the number of innovation steps, we decreased the range of the probability that a number could be selected. So, in the first step, a random number is taken from, for example, the range, and the next time after 3 steps, it is selected from 45-35, and then after 6 steps, it is selected from and so on. When the programme was tested, the result was as predicted: the number of innovators decreased over the time. However, because the number did not decrease with the effect of the market size, it was found to be too deterministic and those numbers were somehow unconnected with the model. Therefore, an alternative design method was necessitated. 31

32 Final Version The final implementation was superior to the previous two in different aspects. First, it overcame the problem of being implemented as fully probabilistic or deterministic. Thus, this model is designed as partially probabilistic and partially deterministic. It is probabilistic in a way that the people going to innovate a product are chosen randomly, but the rate of the people was designed in a deterministic way. This design was preferable to the earlier version, because on one hand it allows the user to set the innovation rate from the GUI, on the other hands it adds to calculation the impact of the change in the market size over time. This is the ( ) quantity, which shows the total market size minus the number of cumulative adopters, and which gives us the number of the nonadopters (taken from the Bass model). The step algorithm was updated again, to be some proportion of the potential market innovation product in every step. As a result, since the rate of the innovation is taken from some proportion of the potential customers, which is decreases over time, the number of innovators relatively decreases over time. When the innovators method was tested, the result was as expected. Influence of the neighbours Another improvement made in the final version was that, if people innovate a product, their neighbour can buy it only because of the internal influence. It was decided to change implementation to this version, in order to achieve a more realistic simulation. In reality, people close to us are our families and friends, whose roles are characterised as neighbours in the cellular automata. So, when one s family or friends buy a product, his/her decision to buy same product is undoubtedly influenced by them. Hence, the behavior of the innovators has changed in the latest version so that neighbours of the innovators never innovate. The result of the implementation is shown in the Figure 20. The left panel shows innovation in the previous version, and the right one shows innovation in the final version. Red colours represent the innovators. The difference between the two simulations can be seen clearly: in the previous one, 5-6 neighbors who are defined as close friends and family invented a product side by side. Figure 20: Result of the two versions. Note that the group of innovators in the left panel and its difference from the second panel. 32

33 4.4.2 Implementation of the imitation Designing the probabilistic imitation rule was easier than the innovation rule because the number of imitators is relative to the number of innovators. The algorithm that was designed considers the heterogeneous market in the same way as described in the Designing Chapter. First, the imitation balance is initialised to 0, and for each neighbour buying a product, the balance is increased with some rate choice of user. So, suppose the current cell has two neighbours with the product, and if the selected rate from GUI is % for each, then the current cell will have % in its balance. After that, its state is checked, to see whether it is a new or old customer to add a relative constant number to the balance, which helps to calculate a different imitation rate between two segments. If our constant number is k for the current segment, then we add it to the overall balance of the current cell which is 2x and get (2x + k)% altogether. Later, the random number is chosen from up to 100% to compare two numbers, and if the overall imitation balance is larger than the random number, the current customer will buy the product and become a green cell, otherwise this will not be the case. Figure 21: Simulation result after 65 steps. Notice the number of the blue and white cells. Figure 21 shows the result of the simulation after 65 steps. Four different cell states can be seen at the same time: red cells are innovators, green cells are imitators, blue cells are old customers, and white cells are new customers. The market share and the innovation rate were set to the same value for both segments. The only difference was in the imitation rate, which was selected by the user to make new customers more imitative. The result shows that most of the new customers (white) have already purchased the new product, since only few of them left the while programme stopped. 33

34 4.5 Creating a Torus Structure Later, it was discovered that cells in the boundaries of the two-dimensional grid did not have the same probability of adopting innovation as the cells in the rest of the grid. This is because the rule was designed to consider the Moore neighbourhood, in which each cell has 8 neighbours, as discussed in the first chapter, but in our implementation, cells in the borders had just 5 neighbours and in the corners only 3 neighbours. While the programme was tested, it was concluded that their effect on the whole simulation was not significant, since there are just 200 cells located in the borders, which is only 8% of the whole grid. Nonetheless, since the more precise results were required, the structure of the grid was changed in order for this to be considered. Figure 22: Shows the black right-border cell, which has 5 neighbours, and the red top-right corner cell, which has 3 neighbours. In the previous version, the diffusion was restricted with the borders. When diffusion reaches the borders of the two-dimensional grid and the program asks to get next neighbour, x and y coordinates of the grid will return that there are no more neighbours and programme has to terminate. However, later the change was made in the structure of the grid to achieve a ring shaped torus. It is the geometrical circle in three-dimensional space and parametrically can be defined around an axis as: ( ) ( ) ( ) ( ) ( ) (8) where are the angles that create a full circle, with the same starting and ending point. represents the distance from the centre of the tube to the centre of the torus and is the radius of the tube [30]. Thus, in the new implementation, when the diffusion reaches the borders, it continues to diffuse from the other way around by setting the coordinates to 0. While the diffusion was implemented by means of the three-dimensional torus as shown in Figure 4, the user was still seeing the two-dimensional panel, in which simulation changes can be better observed. As a result, the 34

35 system was improved in order to achieve the same number of the neighbourhood for every cell in the grid. Figure 23: Shows how the two-dimensional grid can be transformed into torus. Figure 24 illustrates diffusion at the boundaries using three arrows. The red arrow represents when the innovation occurs in the corner, with the top and the right boundaries; its effect can be seen on the other three corners. The yellow arrow shows when the cell innovated on the top border whose effect can be seen on the bottom as well. The black arrow represents the innovation in the left corner and similarly some of its imitators can be seen on the right side of the grid. Figure 24: Shows the simulation, please notice the cells in the corners and the borders. 35

36 4.6 GUI In computer science, a user interface creates a connection between a human and a computer program [31]. As described by Encyclopaedia Britannica, a GUI is a user interface that enables a person to communicate with a computer system through use of symbols, visual metaphors and pointing devices [32]. Eclipse was preferred as the Integrated Development Environment (IDE) to develop a program interface, by using the Window Builder Pro plugin to eliminate the amount of time spent on non-functional features. After designing and implementing the main rules, required buttons were added to create the actions on the simulation, such as resetting the marketplace or selling more products randomly at any given time. Some of the essential parameters of the system such as the market share, innovation and imitation rates are added to the GUI, so that a user is not directly dealing with the complex code. Moreover, since there are a lot of parameters to be set by the user, the GUI panel was designed in a way to achieve a more user-friendly interface. The simplicity is another important design principle that was considered. Sliders were preferred to set different parameters as these minimise the chance that a user will make an error. Algorithms were written for sliders to achieve more accessible design. For example, instead of showing market share with actual numbers, they are shown as a percentage ratio. Figure 25 shows the Welcome GUI panel. Figure 25: Welcome GUI Panel 36

37 4.7 Counting Innovators and Imitators The typical object oriented programming distributes algorithms across the object structure [33]. When the algorithms are too big and complex, this will make classes very complicated. In the simulation, the innovations and imitations were originating from different sources. For example, innovation can be generated spontaneously by the system; it can also be generated by the user when the button was clicked to sell randomly; and finally when the user clicks on the particular cell with the pointer. To track all of them within one algorithm would make the class less cohesive and more coupled. In this case, the class will not represent one-well defined entity and will be directly associated with many others [33]. On the other hand, there was a need to record the information about the different types of the sales occurring, which was later used to plot graphs after some algebraic manipulation. Thus, to achieve sophisticated optimisation of the algorithm, the idea of the Visitor software pattern was used. In this pattern, the sub-parts of the algorithm are implemented separately, and required functions from sub-parts are collected in one class. In the implementation, the various forms of the sales are separated to be in the different classes where they associate with other required functions. Then the counting innovators and imitators method was implemented separately with the same idea, to do a visitor job. Since the Visitor inverts the structure of the object oriented programming, which is more similar to a traditional procedural language, many avoid using this concept, and it was even considered an anti-pattern [33]. Nonetheless, this idea suggested a good solution to our problem and was very appropriate. 4.8 Plotting The plotting functions were developed to map the results of the simulation on graphs, which can help the manager to analyse the behaviour of the buyers in the market. To achieve maximum benefit all the possible graphs are piloted. Four of them are grouped in one panel to show the sales to two populations, and the other four are grouped in another panel to show the changes over time. From research, it was identified that JFreeChart and JCommon are some of the best professional libraries to be used for drawing diagrams for business purposes [34]. Consequently, libraries were accessed and then required functions were written to plot the collected data. Figure 26 shows the cumulative sales graphs panel. 37

38 Figure 26: The sales graph panel. The first one illustrates the innovators of the two populations; the second one in the top left shows the imitators of the two populations; the third one in the bottom right represents the total sales to two populations, in this case the sum of the innovation and imitation for two populations; and the last one shows the sum of the total innovators and the sum of the total imitators in the simulation. 4.9 Testing Testing is an important phase of system development that identifies whether software satisfies the specified requirements. Testing helps a developer to detect the undesirable conditions such as bugs and errors in the programme [35]. As suggested by agile development, the testing of the system should start from the very first iteration. Thus, all the written algorithms were tested immediately after they had been completed. A White Box Testing method was used to test unit components of the source code [35]. Another technique used to test the software was Black Box Testing, in which the functionality of the system was tested with different parameters to identify if there is any breakdown to be 38

39 maintained [35]. For example, once with the testing it was identified that the plotting function was not resetting the previous results, this problem was ultimately able to be repaired. Sufficient amount of Black and White Box testing were done to achieve accurate results which will be shown and discussed in the next chapter. 39

40 Chapter 5 Testing and Evaluation The chapter will cover the testing of the simulation and the evaluation of the results. The plotted graphs from the software, will be compared with the Business model and the Matlab simulation (see Chapter 3). 5.1 Evaluating Probabilistic Market After completing the implementation phase according to the business rules, it was the time to further evaluate the behaviour of the programme with the different parameters. As the heterogeneous market of the Coupled Bass Model is being randomly constructed each time, the result of the simulation cannot be the same in certain points, even if exactly same parameters are given. To assess how reliable are the stochastic results, model is tested with simple scenario five times, and then results are retrieved to Excel file (see Appendix Figure D for data screenshot) and piloted. Here is the test case: Parameters Customers New Old Market Share 50% 50% Innovation Ratio 50% 50% Innovation Rate Imitative Segment Imitation Rate 50% (medium) X 50%(medium) Figure 27: Probabilistic Test Case A general description of the test case is that, the market share and the innovation rate are set to be equal for both populations. The new customer segment will be the more imitative one. The innovation and imitation rates are medium. 40

41 Figure 28: Result of the test case. Figure 28 shows the result of the test case, in which probabilistic behaviour of the total sales to the new customer segment is demonstrated (see Apendix Figure E for other segment). It also illustrates trustworthiness of the implemented rule, as general shape of the figures was matching closely with the same parameters. Furthermore, in order to measure a difference between the highest and the lowest two diagrams, the averages of the test results of the each five cases found separately, and then the biggest and the smallest numbers compared. The difference between two was only 5%. It is also identified that the system size is large enough to be useful, since the 50% more imitative new customers finished buying in average of discrete time 24 steps, and the less imitative old segment in average of 34 discrete time steps. 5.2 Evaluating Ordinary Bass Model As the Coupled model was inspired from the original Bass model, which considers the market as being homogenous; also implemented. In the software, this can be achieved by moving the market share slider to either left extreme to construct the market only from new customers or right extreme to build it only from old customers (see the Appendix C for slider). The test case created to compare the diagrams of the simulator with the Bass model figure as: 41

42 Parameters Customers New Old Market Share 100% 0% Innovation Ratio 100% 0% Innovation Rate 75% (high) Imitative Segment X Imitation Rate 12%(low) Figure 29: The original Bass model test case The test case can be described as, the whole market is composed of new customers, relatively only they will innovate and imitate. The innovation rate was set to be higher, so that it can be clearly seen and the imitation rate with the same reason was set to be lower. The aim was to see Roger s theoretical and Bass s mathematical study of the innovation in the simulation. As discussed in the first chapter, the proportion of the product innovators is only small part of the total amount of the adopters [4]. Thus, their number was expected to be less in general, even with the high rate of the innovation. The Figure 30 shows the result of the simulation after the 10th time step. It is noticeable that, imitators are already dominating the market, even with the very small imitation rate; in contrast innovators were buying slowly. Result also investigates on diffusion theory as it supports the idea that the diffusion of the product is mostly dependent on the internal influences through the word of mouth principle. Figure 30: Original Bass model simulation. Red, green and white cells respectively representing innovation, imitation, new customer segment 42

43 After completing the simulation, graphs are printed as shown in the Figure 31. The first three diagrams show only one line because there is only one segment in the market. The fourth one shows innovators and imitators of the segment in one chart. It can be seen from the (1) and the (2) figures that, while the ammount of the innovation starts from the very highest point and goes down over the time because the number of adopters influenced by external factors is decreasing, the degree of imitation starts from lower point and peak in the mid-time steps when the role of the internal influences increases. (1) (2) (3) (4) Figure 31: shows result of the simulation 43

44 Referring to original Bass model graph, in the Figure 32, similarity can be noticed between two graphs. The only main difference between two is that, time is discrete in the simulation and continues in the Bass model equation. Figure 32: shows innovators and imitators, of the Bass Model 5.3 Evaluating Probabilistic Coupled Bass Model Now let us analyse the whole probabilistic version of the Coupled Bass model, which was written earlier. The most important point here is the change on the innovation level, which was fluctuating a lot, with the results being unpredictable. To demonstrate the described behaviour the test case was configured as: 44

45 Parameters Customers New Old Market Share 50% 50% Innovation Ratio 50% 50% Innovation Rate Imitative Segment Imitation Rate 50% (medium) X 50%(medium) Figure 33: shows whole probabilistic Coupled Bass model test case. The description of the test case is that, the both segment set to have the same market share and innovation ratio. Parameters shows imitation is not necessary in this case, since the problem identified one the behaviour of the stochastic innovation. Figure 34, illustrates the results of the test case. Figure 2: shows innovation of the whole probabilistic coupled bass model. 45

46 Generating numbers randomly, resulted with the innovation to vary with the bigger rate. However interesting behaviour identified after running the programme several times is that when the innovation rate of one population goes up, the other one immediately goes down. As the random numbers were not generated separately and the parameters were same for two segments, the behaviour was worthy to be analysed. The mirror effect of the lines, rather than following the same shapes can be described in marketing term as follows: If a company dedicates its marketing campaigns to one segment, they will be more influenced by external factors, and oppositely the other group will be less affected. Therefore, companies should take all the segments they are targeting equally, and create campaigns to satisfy the needs of all segments. 5.4 Evaluating Latest Coupled Bass Model The final version of the Coupled Bass model was evaluated with various innovation and imitation rates. Each time interesting behaviours of the heterogeneous market was identified. The simulation gives more options to user for analysing the different combinations of the parameters. For example, let us create a test case as: Parameters Customers New Old Market Share 50% 50% Innovation Ratio 30% 70% Innovation Rate 80% (high) Imitative Segment Imitation Rate X 50%(medium) Figure 35: Coupled Bass model evaluation test case Where, the only market share was given equal, the old customers are set to be more innovative with high innovation rate, and the new customers are characterised as being more imitative with the medium imitation rate. The result of the simulation after the 10th step is shown in the Figure 36. It can be noticed that, although the market share was the same for both segments, the old customers have a bigger proportion than the new customers among the potential buyers. This indicates the power of the imitation once more in operation. 46

47 Figure 36: Coupled Bass Model Simulation. Blue cells and white cells show old and new customers, respectively. Red cells and green cells indicate innovators and imitators. respectively. The Figure 37 indicates difference more clearly. (1) (2) (3) (4) Figure 37: shows result of the Coupled Bass model 47

48 The first chart indicates the result as, old population innovating with a higher rate, meanwhile second diagram shows new customers are buying at a higher rate. When the third - total sales figure analysed, it is identified that the higher imitative population has bought more products and earlier than the higher innovative other population. Thus, new customers participate more and faster in trade. The fourth figure shows the total number of the innovators and imitators, which is comparable to Bass model diagram. This reveals that, although segments can have different level of sales and can indicate various behaviours when they are compared, but the total number of the innovators and imitators still demonstrating the similar shape. 5.5 Comparing Coupled Bass Model with Matlab Simulation Next test case was written to see, if the similar result can be obtained from the software with the matching Matlab simulation scenario. Thus the test case was created as: Parameters Customers New Old Market Share 50% 50% Innovation Ratio 0% 100% Innovation Rate 85% (high) Imitative Segment X Imitation Rate 70%(high) Figure 38: Test case with Matlab simulation parameters It can be defined as, both segments have equal market share, but only old customers innovate product and with very high rate, the same segment is also very strong market follower. The new customers never innovate and also slow follower of the market. The result is compared with the Matlab simulation s as shown in Figure 39. The blue line represents the old customers, who quickly buy the product with the big rates in each time steps. The red line indicates the new customers. They start buying slowly with small ranges, and because diffusion occurs at a slow pace, it takes some time for whole segment to saturate. 48

49 Figure 39 : result of simulation to compare with Matlab result 5.6 Evaluating market saturation Market saturation is the process that occurs in the market when it stops generating new demands[36]. In the project, market saturation occurs when everybody buys product and simulation terminates, if it is not stopped with the command. Implementing the algorithms with the probabilistic rules and the GUI with the dynamic parameters, results market to saturate in the different time steps; in a shorter or longer period. The test case created to analyse this as shown: Parameters New Customers Old Innovation Rate (%) 12; 25; 37; 50; 62; 75; 87; 100 Imitation Rate (%) 12; 25; 37; 50; 62; 75; 87; 100 Figure 40: The test case for market saturation with 8 different values. In the test case, the market share and the innovation rates were set to be the same for both segments. The innovation and imitation rates were tested equally with 8 different values such as first with 12:12 rates, then 25:25 and so on. Each rates couple were evaluated 5 times, to find average 49

50 and generate more accurate results. The taken minimum rate was 12, because imitation slider can only be incremented by this range. Since, it is associated with the number of the neighbours and when the given maximum value 100 is divided by 8 neighbours, it gives 12.5 which is rounded in test case. The results are demonstrated as the table in the Figure 41. Innovation/Imitation Rates Market Saturation Time Steps 1st time 2nd time 3rd time 4th time 5th time Average Steps 12 (actually 12.5) (actually 37.5) (actually 62.5) (actually 87.5) Figure 41: Shows test results. When these average market saturation times against the innovation and imitation rates are piloted, as shown in the Figure 42, it is identified that, they are roughly inverted. When the innovation and imitation rates increase, the whole market saturates in a short period, which means sales occur more quickly. Figure 42: shows market saturation with time steps against innovation and imitation rates. 50

51 The Figure 43 shows the results of the two simulations with the different adoption rates after 10th step. The left one has the maximum innovation and imitation rates, in which, the whole has market already adopted a product. In the right simulation, only a small proportion of the people bought it. It took respectively, 10 and 140 steps for the markets to saturate. Figure 43: shows the difference between two simulations after 10th step. 51

52 Chapter 6 Conclusion and Future Works The chapter will conclude the project and identify what can be done in the future to add more functionality to simulation. 6.1 Overview of the project The project was designed to investigate an emerging business problem by using a cellular automata technique. First, interesting diffusion models were analysed and a general idea formed from the researches. Then the new version of the Bass model was created to support the heterogeneous market concept. After the designing of the rules, it was to implement new product diffusion software iteratively with agile principles. Later, when the development and code testing phases were concluded, the simulation evaluated with different test cases. The usage of the cellular automata in this business case was found to be very valuable as it helps to solve many problems of the aggregate equations. In the case, marketing managers can use the developed software to simulate the behaviour of customers, and forecast the market better. If we agree on the point that many cellular automata simulators have the typical main structure, one can be easily adjusted to other business problems. As it can be seen, how the basic structure of the Game of Life was manipulated to be a base for another model. This flexibility of the cellular automata can be used to express many business problems in a better way. 6.2 Future Works One of the best advantages of the project is that, it has a future perspective and can be additionally developed to simulate more advanced business scenarios. Figure 44 indicates some of them. Figure 44: Current and Future works. So far, the Bass model has been investigating into single product diffusion in a homogenous market. Then the new model examined in the project to achieve diffusion of the single product in a heterogeneous market. Subsequently, after some more analysis of the topic, multiple product diffusion in the homogenous market can be implemented in the near future. The last one, which is the hardest scenario among all, 52

53 can be implemented to simulate multiple product diffusion in a heterogeneous market. Observing the diffusion of competitive products among segments can be an interesting simulation. However, no mathematical work has been found in the support of the last two scenarios. After observing the flexibility of the cellular automata, it is certain that over the time, these can be implemented to advance the existing simulator. 53

54 References: [1] Mahajan V., Eitan M. and Yoram W., eds. New-product diffusion models. Springer, (2000). [2] Barry J. John L. and Richard H, Navigating the Digital Future, Booz &co and Bloomberg, (2013), [Accessed: [March, 2014], Available at: Navigating-the-Digital-Future.pdf [3] Wolfram, Stephen. A new kind of science. Vol. 5. Champaign: Wolfram media, (2002). [4] Baines, P., Fill, C. & Page, K. Marketing (2nd ed.) p.p Oxford University Press, (2011) [5] Bass, Frank M. A new product growth for model consumer durables. Management Science 15 pp , and The Bass Model Bass s Basement Research Institutes, (2008) [Accessed: March, 2014], Available at: [6] Wolfram, Stephen. "Universality and complexity in cellular automata." Physica D: Nonlinear Phenomena 10, no. 1 (1984): [7] Coe, J. B., S. E. Ahnert, and T. M. A. Fink. "When are cellular automata random?." EPL (Europhysics Letters) 84, no. 5 (2008): [8] Dubois-Violette, Michel, and Alain Rouet. "A mathematical classification of the one-dimensional deterministic cellular automata." Communications in Mathematical Physics 112, no. 4 (1987): [9] Mahajan, V., Muller, E. and Bass, F. M. New-Product Diffusion Models. In J. Eliashberg and G. L. Lilien, editors, Handbooks in Operations Research and Management Science, Volume 5: Marketing, pp North- Holland, Amsterdam, The Netherlands. (1993). [10] Rogers, Everett M. Diffusion of innovations. Simon and Schuster, [11] Gadi F., Ro I G. and Eitan M., Analysis of Cellular Automata Diffusion Models in Marketing, Complex Market, (2009), [Accessed: March, 2014, Available at: [12] Dockner, E. and S. Jorgensen, Optimal advertising policies for diffusion of new product innovation in monopolistic situations, Management Science 34 (l), , (1988). [13] Robinson, B. and C. Lakhani, Dynamic price models for new-product planning, Management Science 21 (6), (1975). [14], [15] Kahsh, S. and G.L. Lilien, A market entry timing model for new technologies, Management Science 32 (2), (1986) [16] Eliashberg, J. and A.P. Jeuland, The impact of competitive entry in a developing market upon dynamic pricing strategies, Marketing Science 5 (l), (1986) [17] Bass, Frank M. "Comments on a new product growth for model consumer durables the bass model." Management science 50, no. 12_supplement (2004): [18] Norton, John A., and Frank M. Bass. "A diffusion theory model of adoption and substitution for successive generations of high-technology products."management science 33, no. 9 (1987): [19] Islam, Towhidul. "Household level innovation diffusion model of photo-voltaic (PV) solar cells from stated preference data." Energy Policy 65 (2014):

55 [20] Fourt, Louis A., and Joseph W. Woodlock. "Early Prediction of Market Success for New Grocery Products." Journal of marketing 25, no. 2 (1960). [21] Mansfield, Edwin. "Technical change and the rate of imitation." Econometrica: Journal of the Econometric Society (1961): [22] Name not given, The Cellular Automata Simulator, Department of Computer Science, University of Virginia, (2013), [Accessed: November, 2013], Available at: [23] Rainardi, Vincent, Chapter 4: Functional and Non-Functional Requirements, Building a data warehouse: with examples in SQL Server. pp John Wiley & Sons, (2008). [24] Chung, Lawrence, and Julio Cesar Sampaio do Prado Leite. "On non-functional requirements in software engineering." In Conceptual modeling: Foundations and applications, pp Springer Berlin Heidelberg,( 2009). [25] Cory Janssen, Use Case, Techopedia, (no date), [Accessed : October, 2013], Available at: [26] Roy Thomas Fielding, Architectural Styles and Design of Network-based Software Architectures, University of California, Irvine, [Accessed : October, 2013], Available at: [27] Donald Bell, The Class Diagram, IBM DeveloperWorks, IBM (2004), [Accessed : November, 2013], Available at: [28] (name not given), Model-View-Controller, Computer Science Design Pattens, WikiBooks, (2014), [Accessed : November, 2013], Available at: [29] Fowler, Martin, and Jim Highsmith. "The agile manifesto." Software Development 9, no. 8 (2001): [30] Gray, Alfred, Elsa Abbena, and Simon Salamon. "MODERN DIFFERENTIAL GEOMETRY." (1995). [31] (name not given), User Interface, IT Business Edge,(2014), ), [Accessed : January, 2014], Available at: [32] Steven Levy, Jr. Graphical User Interface(GUI) Encyclopaedia Britannica (2013), [Accessed : January, 2014], Available at: [33] Larman, Craig. "Applying UML and patterns: An Introduction to object-oriented analysis and design and iterative develop." (2005): 702. [34] Andreas Viklund, JFreeChart Java Library (2013), [Accessed: Februrary, 2014], Available at: [35] (name not given), Software Testing Tutorial Anti-Corruption Toolkit: A Teaching Resource (no date) [Accessed: February, 2014], Available at: [36] (name not given), Market Saturation Business Dictionary (2014) [Accessed: April, 2014], Available at: [37] (name not given), Bass Diffusion Model, Wikipedia, [Accessed: September, 2014], Available at: 55

56 Appendix: Figure A: shows the world top companies Research and Development spendings, Copied from Bloomberg [11] 56

57 Figure B: shows Bass model extension with generations. Copied from Frank M. Bass [17] Figure C: shows parameter innovation diffusion model, Copied from Islam, Towhidul [19] 57

58 Figure D : shows data and result of the test case which shows probabilistic behaviour for new customers. Figure E : shows data and result of the test case which shows probabilistic behaviour for old customers. 58