NetLogo Ee Sim

You might also like

Download as doc, pdf, or txt
Download as doc, pdf, or txt
You are on page 1of 14

NetLogo Exploration / Exploitation Agent-Based Model

The NetLogo Exploration / Exploitation agent-based model has been designed for the observation of how different resource allocation strategies can affect performance and market share in differing consumer markets and competition environments. The agent-based model approach to the exploration / exploitation dilemma allows for a massively complex model to be developed through relatively simple programming. This simple agent-based model has 16 settable parameters. The Behavior Space feature of NetLogo allows the user to map performance and market share in space of all 16 control dimensions. This feature coupled with any statistical package provides for a potentially extremely effective modeling technique for this very complex issue. The NetLogo agent-based modeling tool was chosen because it is easy to program, well documented and available for free download from: http://ccl.northwestern.edu/netlogo/. It is Java based and thus takes advantage of the programming ease of an interpreted language and the speed of a compiled language. Any created model can be easily distributed for use without the need of end-users downloading the NetLogo tool itself. This model is not intended to represent any specific market or to validate any existing theory. It is a general purpose example of how an agent-based model can be used to investigate a complex problem such as the difficulty in the allocation of resources for exploration or exploitation. It is certainly the goal of agent-based modelers in general that, given a sufficient set of agent rules, any complex system can be modeled or at least accurately mimicked. The following will be a description of how this model operates along with suggestions as to how it might be set-up, modified or extended to better portray a particular market. Overview The basic premise of the model is to simulate several agents going through build-buy cycles: Build: Factories follow simple rules of strategy in the allocation of resources between making exploration and exploitation type products. Buy: Each of two types of Consumers, early-adopters and late adopters, follow simple purchase decision rules in deciding to purchase a product from one of two randomly chosen factories. Thus, the two working agents of the model are factories and consumers. Through the models user interface, the user sets up different factory strategies based on factory settings. There are separate settings for a control factory which could be considered as the factory to be

performance optimized through the settings. There are also settings for consumers. The model cycles through all agents - factories and consumers - applying the two build-buy rule sets to each respectively. During the run, data is taken and presented in three observation and performance bar-charts. There are also several global performance variables that can be written to a file for further analyses. The following sections will describe the models user interface, then the factory and consumer strategy/purchase rules, and finally a brief description of the NetLogo Behavior Space feature along with descriptions of all data variables that can be exported. User Interface The NetLogo Exploration / Exploitation agent-based model user interface can be described in seven parts: 1. 2. 3. 4. 5. 6. 7. Agent map Run controls Consumer settings Factory settings Control factory settings Performance charts Contingency settings

1. Agent map The agent map is a graphical representation of all agents of the simulation. This Exploration / Exploitation agent-based model uses two agent types, factories and consumers, which are presented on the agent map. For each factory, there is a small factory icon and for each consumer, there is a small person icon. There are two types of consumers, red types that only buy exploration type products and blue types that only buy exploitative type products. All factories are black except for the control factory which is blue. This model does not consider any physical or geographical relation between consumers and factories in their decision processes hence the map does not serve any real functionality in this case. Potentially, the map could be given geographical significance through the addition of a real map as the background (on NetLogo Patches - ref NetLogo Help) with physical distances included in factory strategies or the consumer purchase decision process. 2. Run Controls There are only two run controls: An initialize button to set up the model and a run button to start/stop the model. Clicking on the initialize button creates the chosen number of factory and

consumer agents and randomly places their icons on the agent map. This button also assigns certain characteristics to each of the agents as will be described later. Clicking the run button starts the free running processes of building and buying products. Clicking the button a second time interrupts the process. Any particular run can be started and stopped any number of times but the model can only be initialized when the model is stopped. There is also a Command Center window that is used to show the cycle count. The quarter was arbitrarily chosen as the unit of cycle time and thus the Command Center window displays: Quarter xx where xx is the current cycle count. When the model is initialized, the cycle count starts at Quarter: 0. 3. Consumer settings There are two settings for consumers: a. consumer-population b. %-early-adopters a. consumer-population The consumer-population setting allows the user to set the population of consumers from 20 to 1000. This population could represent individual consumers or groups of consumers. Though the population could be set much higher, the processing time of the model begins to get slow. b. %-early-adopters This setting adjusts the percentage of consumers who only buy exploration type products. The remainder of the consumer population buys only exploitative type products. Thus, for instance, if the personal computer market was being simulated, this setting might be set to a relatively high percentage as opposed to a lower setting for a market such as for lawn-mowers. 4. Factory settings There are four settings for factories: a. initial-factory-count b. initial-%-research c. Factory-adaptiveness d. slack-resources a. initial-factory-count The initial-factory-count setting allows the user to set the initial number of factories from 2 to 10. This population could represent individual factories or groups of factories. There is no reason why this quantity cant be higher to represent a given market. The maximum of ten was chosen so that the performances of all factories could conveniently be viewed simultaneously on

the performance bar-charts as will be described later. There is no point in evaluating allocation of resource strategy for a market with only one producer so there is a minimum of two factories. b. initial-%-research This setting adjusts the initial percentage of slack resources that factories allocate to exploration type products. This setting does not control the resource allocation for the control factory which has its own setting. c. Factory-adaptiveness In the process of consumers buying products, some factories may run out of stock of one kind of product type or the other. When this occurs, the model keeps track of the unmet sale. When the Factory-adaptiveness setting is greater than 0%, factories change their percentage for exploration allocation based on the differences between unmet sales to sales ratios for the two types of products. Thus if: (r-unmet/r-sales) > (d-unmet/d-sales) then the factory will increase its percentage allocation for exploration type (r) products by the percentage amount of the Market Factory-adaptiveness setting. Conversely, when the unmet sales exploitation ratio is higher than the unmet sales ratio for exploration, the factorys percentage allocation for exploration is reduced by the percentage amount of the Factory-adaptiveness setting. This setting does not affect the resource allocation for the control factory which has its own manual setting d. slack resources In the process of consumers buying products, factories accumulate cash based on the number of products sold and a global fixed profit margin (fixed at 100%). Before a factory begins to build product, it multiplies its cash on-hand by the slack-resources setting to arrive at the amount of resources that can be turned into product. As will be described later in the factory strategy rules, not all of these slack-resources may be required to build products to meet consumer demand. These resources are considered the maximum resources available for the creation of product. Any unused resources go back into cash funds. 5. Control factory settings There are two settings for factories: a. %-research b. control-slack-resources a. %-research This setting adjusts the percentage of slack resources that the control factory (only) allocates to exploration type products. This setting does not control the resource allocation for the other (competing) factories. This setting can be changed during the course of a model run. It can be changed during the run or in-between run starts and stops.

b. control-slack resources This setting is identical to the slack-resources setting described above in the Factory settings, part d., except that it affects the control factory only. This gives the user independent control of resources to build product with to test differing allocation strategies. 6. Performance charts Three charts along the right side of the models user interface show the progress of three important sets of data: a. Market share b. Relative performance c. Factory % Research Each chart is a bar type and shows data for all factories present. If a factory is added or removed through the use of the competitive growth contingency setting (described later), the charts are normalized so the user does not have to account for market share differences over different time periods. The vertical scales are also normalized so as to optimize viewing resolution. There are always at least two factory bars and can be up to ten as previously described by the initialfactory-count setting. The control factory is always present and is represented by the furthest bar to the left, which is also colored blue. All other factory bars are black. a. Market share This chart shows the running mean of market share for each factory. The running mean of market share is defined as the accumulation of total sales of exploration and exploitation type products, divided by the number of cycles. b. Relative performance This chart shows the running mean of performance for each factory. The running mean of performance is defined as the accumulation of profits from the sales of exploration and exploitation type products, divided by the number of cycles. c. Factory % Research This chart shows the relative percentages of resource allocation for all factories as determined by the Factory setting, initial-%-research and the Control factory setting, %-research settings. The chart is not a performance but an observation chart useful in seeing how competing factories change their percentages when the Market-adaptability setting is used. If the adaptability setting is not used then this chart simple shows the fixed resource allocation percentages. 7. Contingency settings

There are eight additional settings under five contingency switches for further model enhancement. The five contingency switches are: a. Competitive-growth? b. Network effect? c. Research-variance? d. Pricing? e. Consumer choice? a. Competitive-growth? This switch enables the growth-rate setting. This setting sets the rate at which the quantity of factories changes over a ten year period. This setting could be used to simulate a market with increasing or decreasing competition. The setting range is from 25% to +25%. Thus if there are initially four factories and the setting is set for +25%, there will be an additional factory after 40 cycles or quarters. If the setting is set to 25% then there will be one less factory (three) after 40 quarters. b. Network-effect? This switch enables the interaction-probability setting. This setting allows for consumer buying preferences to be changed based on the buying preferences of the immediate neighbors around the consumer. Thus, if this setting is set to 10% and it is time to make a purchase, there is a 10% chance that, if a consumer has 7 immediate neighbors and four of the are early-adopters, the consumer will become an early-adopter if it isnt one already. If the consensus is consumers who buy exploitative products, then the consumer becomes the same type if it isnt already. The actual number of immediate neighbors does not matter, only a consensus greater than 50%. The definition of immediate means the 8 surrounding patches of the patch that contains the consumer that is buying. Consult NetLogo Help for patch definition. As stated earlier, this model does not utilize any physical or geographical relations of its agents in strategy or decision rules so this setting does not bring much to bear other than slight changes to the overall percentage of early-adopting consumers. c. Research-variance? This switch enables the research-risk setting. This setting allows for the reality of resources allocated to exploration that exploration investments can be risky. Some markets can be more risky than others. Along with added risk comes the possibility of a bigger payoff. Thus the setting range is from 0 to 100% where the zero (0) setting results in no risk with all resources allocated to exploration resulting in exploration type products. If the setting is at 100%, there is a one-in-ten chance that resources for exploration result in a ten times normal quantity of exploration type products. The risk formula is designed to average out to low risk over time,

regardless of the setting. The usefulness of this feature is that it introduces short-term perturbations into the build-buy cycle that can test the sensitivities of performance to risk. The actual payoff probability equation is: rstock = slack-resources * (research-risk / 10) * random-Poisson (1.1 - (research-risk / 100)) where rstock represents the number of exploration products built. When the switch is off, the model is set for a 10% risk factor. To have zero risk, the Researchvariance? Switch must be turned ON with the research-risk setting at zero. d. Pricing? This switch enables the modeler to introduce the effects of price manipulation on performance in the modeled market. There are two settings for this feature, one for the pricing of competing factories (price-variance) and another for the price positioning of the control factory (priceposition). The price-variance setting sets the variation of the price that factories (other than the control factory) charge for products. The variance is a percentage of the global price that is arbitrarily fixed at 2. Thus when factories are initialized, the price they charge is set at the global price plus or minus a random percentage up to the value as set by the price-variance setting. This feature tests the sensitivities that variations in competition prices have upon performance. The price-position setting for the control factory fixes the price above or below the global price by the percentage of the setting. This is an easy way to determine if the performance of a given allocation strategy for the control factory is price sensitive. The internally fixed global price is set at a fixed value that insures most factories survival. The purpose of the model is not to see which factories survive but to compare performance differences between healthy functioning factories. This number can be manipulated in the NetLogo code itself to better simulate a given market. e. Consumer-choice? The Consumer-choice? switch enables extra settings that affect how consumers decide to buy products from competing factories. There are three settings: a. decide-by-price b. decide-by-innov c. decide-by-mkt-shr

Each setting is a weighting control that determines how important a consumer considers the factor to be in making a decision. a. decide-by-price This setting adjusts the weight that price differential between the two considered factories has upon the consumer decision process. b. decide-by- innov This setting sets the weight that the differential of innovativeness of firms (%-research) has upon the consumer decision process. This setting affects only consumers that buy exploration type products. c. decide-by-mkt-shr This setting adjusts the weight that market share differential has upon the consumer decision process. When the Consumer-choice? switch is on, the consumer makes a decision in two steps: first the parameter is chosen to decide with, and second, the decision is made based on a probability. To first determine which parameter to choose with, the three settings are multiplied by the factory differences of the three respective sets of parameters. The largest product wins. Thus if all three settings are set to equal positions, the factor that is used to make the decision is the one with the biggest differential between the two factories. Once the deciding factor has been determined, the probability that the consumer decides based on the lowest price or highest %-research is determined by the differential-to-mean ratio added to 50%. If the weighting is such that a decision will be based on price, and the two factory prices are 1.75 and 1.25, the probability that the consumer chooses the less expensive factory is: Probability of choosing cheaper product = .5 + ((2.25 1.75) / 2) = .75 If there was no price differential, the odds are 50/50. This formula also applies to the %rsch factor as well. The decide-by-mkt-shr is slightly different in that the decide-by-mkt-shr setting is used as the probability percentage instead of the market share differential to market share mean ratio. Thus if the weighting is such that a decision will be based on market share, the probability of choosing the higher market share is determined solely by the setting. A 100% setting yields a 100%

probability that the choice is the factory with the highest market share regardless of the actual differences between the two firms. This setting is useful in effectively amplifying small market share differences.

Rules There are two sets of logic rules: Factory strategy rules and consumer purchasing rules. To present the overall model flow, the following logic diagram shows the entire build-buy cycle:

Initialize model : Create factories Create consumers

Build products: (factories)

Network -effect?

yes

Check neighbors buying preference (consumers)

yes

Buy products (consumers)

No - stop

Run button down?

Determine profits (factories)

Collect data Draw plots

Evaluate / modify resource allocation (factories)

no

competitive -growth? yes Initialize model : Create factories Create consumers

Factory strategy rules The following logic diagram displays the rules (the build products box above) that each factory follows to create exploration and exploitation type products:

Determine demand (rsales+dsales+runmet+dunmet)

rsales exploration product sales dsales exploitation product sales runmet unmet exploration type sales - out of stock dunmet unmet exploration type sales - out of stock

Determine funds (Cash * slack-resources)

no

Enough funds to meet demand?

yes Using market demand Allocate funds to make stock (by %rsch)

Allocate all funds to make stock (by %rsch)

Make Exploration stock funds * %rsch (rstock)

Make Exploitation stock demand * (1-%rsch) (dstock)

Remove cash cash = cash (rstock + dstock)

Consumer purchase rules The following logic diagram displays the rules (the buy products box above) that each consumer follows to purchase exploration or exploitation type products:

Randomly pick two factories

Early adopter type consumers buy only exploration type products. Late adopter type consumers buy only exploitation type products. one Buy from factory with stock unmet = unmet + 1 For factory with no stock

No stock purchased. unmet = unmet + 1 For each factory

neither

Which factory has stock of choice ? both

Random pick

no

Consumer choice?

yes

Determine which factor to choose product from Price weight = Decide-by-price * ((price1-price2)/mean price) %research weight = Decide-by- innov * ((%rsch1-%rsch2)/mean %rsch) Mkt share weight = Decide-by-mkt-shr * ((mktshr1-mktshr2)/mean price) Highest weight decides which factor to use: Price, %research, or market share price price1-price2 > random1 ? Mean price %research %rsch1-%rsch2> random1? Mean %rsch Market share Decide-by-mkt-shr > random1 ? no Random pick Pick highest market share yes

no Random pick

yes

no Random pick

yes

Pick lowest price

Pick highest %research

Buy product Sales (r or d) = sales + 1 stock (r or d) = stock - 1

NetLogo Behavior Space In NetLogo, under the tools pull-down menu is the Behavior Space feature. This allows the user to automatically run the model with any or all of the settings adjusted to any value (within their normal ranges). The feature then runs the model with all of the pre-programmed settings while monitoring any of several variables. The variables are then written to a comma-separatedvalues file (.CSV) for further analysis. At each setting, the model can be automatically run and number of times for greater result consensus. There are two parts to the Behavior Space feature: 1. Edit experiment setup 2. Run Experiment 1. Edit experiment setup In this window, the user can program which settings get set to which value. This is set in the Vary variables as follows box. There can be any number of values as long as they fall within the allow range for each setting. The observed output is next programmed in the Measure runs using this reporter box. If multiple outputs are required they can be set as a list such as: (list (control-market-share) (control-runmet) (control-dunmet)). The set up the model with these commands box should be set to setup and the step model with these commands box should be set to go. Then the user can decide how many runs to run the model at each setting in the stop after this many steps box. The stop if this reporter becomes true box need not be used for this model. 2. Run Experiment This button in the Behavior Space feature simply runs the model with the pre-programmed number of runs for each setting. When the runs are complete, the user is prompted to define the output file name and location. The file will be a comma separated values (.CSV) type file that can be immediately opened with Microsoft Excel for observation. The list of pre-assigned global values available for export are (but not limited to): control-market-share The current value of the running average of market share for the control factory control-runmet The current iteration (quarter) unmet sales of exploration products for the control factory control-dunmet The current iteration (quarter) unmet sales of exploitation products for the control factory

control-avg-profit The current value of the running average of profits for the control factory max-market-share The maximum value out of all factories of the running averages of market shares. max-runmet The maximum value out of all factories of the unmet sales of exploration products. max-dunmet The maximum value out of all factories of the unmet sales of exploitation products. max-avg-profit The maximum value out of all factories of the running averages of profits.

You might also like