{VERSION 2 3 "APPLE_PPC_MAC" "2.3" } {USTYLETAB {CSTYLE "Maple Input" -1 0 "Courier" 0 1 255 0 0 1 0 1 0 0 1 0 0 0 0 }{CSTYLE "2D Math" -1 2 "Times" 0 1 0 0 0 0 0 0 2 0 0 0 0 0 0 }{CSTYLE "2D Comment" 2 18 "" 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 } {CSTYLE "" -1 256 "" 0 1 0 0 0 0 1 0 0 0 0 0 0 0 0 }{CSTYLE "" -1 257 "" 0 1 0 0 0 0 1 0 0 0 0 0 0 0 0 }{CSTYLE "" -1 258 "" 0 1 0 0 0 0 1 0 0 0 0 0 0 0 0 }{CSTYLE "" -1 259 "" 0 1 0 0 0 0 1 0 0 0 0 0 0 0 0 } {CSTYLE "" -1 260 "" 0 1 0 0 0 0 1 0 0 0 0 0 0 0 0 }{PSTYLE "Normal" -1 0 1 {CSTYLE "" -1 -1 "" 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 }0 0 0 -1 -1 -1 0 0 0 0 0 0 -1 0 }{PSTYLE "Heading 1" 0 3 1 {CSTYLE "" -1 -1 "" 1 18 0 0 0 0 0 1 0 0 0 0 0 0 0 }1 0 0 0 6 6 0 0 0 0 0 0 -1 0 }{PSTYLE "H eading 2" 3 4 1 {CSTYLE "" -1 -1 "" 1 14 0 0 0 0 0 0 0 0 0 0 0 0 0 }0 0 0 -1 4 4 0 0 0 0 0 0 -1 0 }{PSTYLE "Bullet Item" 0 15 1 {CSTYLE "" -1 -1 "" 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 }0 0 0 -1 3 3 0 0 0 0 0 0 15 2 }{PSTYLE "Title" 0 18 1 {CSTYLE "" -1 -1 "" 1 18 0 0 0 0 0 1 1 0 0 0 0 0 0 }3 0 0 -1 12 12 0 0 0 0 0 0 19 0 }{PSTYLE "Author" 0 19 1 {CSTYLE "" -1 -1 "" 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 }3 0 0 -1 8 8 0 0 0 0 0 0 -1 0 }} {SECT 0 {EXCHG {PARA 18 "" 0 "" {TEXT -1 27 "Simple Nelwin for Maple V .4" }}}{EXCHG {PARA 19 "" 0 "" {TEXT -1 61 "Version 4 Sep 96\nŠ Esben \+ Sloth Andersen, esa@business.auc.dk\n" }}}{SECT 0 {PARA 3 "" 0 "" {TEXT -1 17 "Preliminary notes" }}{EXCHG {PARA 0 "" 0 "" {TEXT -1 351 "1. This program is a simplified version of the program found in Ander sen's book on Evolutionary Economics (Pinter, 1994/1996). It allows a \+ quick overview, but if the purpose is to make major extensions of the \+ Nelson and Winter framework, then SimpleNelwin should be abandoned and a more structured and decomposed kind of programming should be applie d." }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 456 " 2. A program of the same \+ kind (with a single bug) has been made available at Andersen's Web si te (http://www.business.auc.dk/evolution/models/nelwin/Nelson-and-Wint er-A.html). \nThe previous program was programmed in Maple V.2, and th erefore it cannot be run with Maple V.4. The present program is rewrit ten for the new version of Maple. At the same time a couple of helping procedure are made available to ease the ploti of theesults of the si mulations. " }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 422 "3. Apart from the simple translation, there are different further changes. The main one is that the normal distribution is called with ln(mean inno) and the \+ result is transformed back by exp(result). Maple V.4's generation of r andom numbers has the same statistical properties as Maple V.2's rando m generators, but it is not possible to reproduce exactly the same seq uences of innovations and imitations as with Maple V.2." }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 192 "4. The worksheet is run by placing the c ursor in the first line of Maple input (> restart;), press , a nd then press each time you are in a new input section (excecu tion group)." }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 177 "5. Comments, bug reports and suggestions for new features are very welcome. Please ind icate which version of the note you are referring to (the present one \+ is Version 96/08/24)." }}}}{SECT 0 {PARA 3 "" 0 "" {TEXT -1 11 "The pr ogram" }}{EXCHG {PARA 0 "" 0 "" {TEXT -1 123 "Before running the progr am, we reset Maple and secure that extensive run-time error massages a re given (to ease debugging)." }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 25 "restart; printlevel := 3;" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 670 "\nThen we are ready to enter the simple Nelson and Winter-like mo del. During a first overview of the present note, you should not study the procedure. Just press , and then proceed to the analysis o f the results of the process of Schumpeterian competition. During a se cond study of the note, however, the program should be studied. Here i t is helpful to press the Maple button that toggles the display of Map le input between ordinary text and standard notation (with formatting \+ and indentation of the program). However, inserted notes in programs a re not shown in the formatted standard notation - so you should also s tudy the program in its ordinaty text version." }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 138 "The standard parameters of Nelwin have been changed in order to obtain significant effects relatively quickly (in terms o f computer time)." }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 125 "You can cha nge evolutionary simulation in three ways:\n1. You can change the arg uments of the procedure calls: SimpleNelwin(" }{TEXT 258 1 "n" } {TEXT -1 1 "," }{TEXT 259 1 "T" }{TEXT -1 28 "), e.g. SimpleNelwin(4,1 6). " }{TEXT 257 2 "T " }{TEXT -1 124 "is the number of periods of the simulation. Since Maple is rather slow, you shourd start with few per iods - e.g. 16 or 25. " }{TEXT 256 2 "n " }{TEXT -1 469 "is the numbe r of firms. The present parameters give a near-equilibrium without inn ovations for 4 firms. But you can start in an out-of-equilibrium situa tion with e.g. 16 firms. \n2. You can change the system variable seed, and thus change the sequences of random numbers (innovations and imit ations). See below.\n3. You can change the parameters in the program t ext, e.g. b := 2.5;\n4. You can change the program commands and expres sions.\nBut here is the initial version:\n" }}}{EXCHG {PARA 0 "> " 0 " " {MPLTEXT 1 0 2933 "SimpleNelwin := proc(n,T)\n\n# This model has a d iscrete searchspace \n# (like N&W, chap. 9; unlike N&W, chs. 12-13). \+ \n\nlocal i,t,j;\nglobal b, c, delta, dem, d_im, d_in, eta, phi, r_im, r_in, sigma_in, search_sp, A, A_mean, K, s, Q, TQ, P, A_max, lambda_i n, Lottery, A_prelim, A_in, lambda_im, A_im, rho, I_des, pi, loans, I_ max, constraint, Inv;\n# The fact that variables and constants are \"g lobal\" means that they can \n# be inspected interactively after the s imulation\n\noption `ES Andersen, Aalborg University, 24 Aug 96`;\n\nw ith(stats[random]);\n\n# PARAMETERS\nb := 1 ;\nc \+ := 0.16 ;\ndelta := 0.03 ;\ndem := 67 \+ ;\nd_im := 0.3 ; \nd_in := 0.3 ;\neta \+ := 1 ;\nphi := 0.05 ; \nr_im := 0.00112 ; \nr_in := 0.0223 ;\nsigma_in := 0.2 ;\nsearch_sp := [ .050, .063, .111, .160, .206, .292,\n .297, .363, .375, . 403, .426, .441, .558,\n .675, .718, .742, .843, .846, .9 17, .981];\n# Such discrete search space is not fount in N&W, 1982, ch s. 12-14\n# but in ch. 9. It is important for analysis at the level of techniques\n\n# MAIN VARIABLES\nA := array(1..n, 1..T+1);\nA_mean := \+ array(0..T+1);\nK := array(1..n, 1..T+1);\nQ := array(1..n, 1..T);\ns \+ := array(1..n, 1..T);\npi := array(1..n, 1..T);\n \n# INITIALIS ATION\nfor i from 1 to n do\n A[i,1] := 0.16;\n K[i,1] : = 89.70;\nod;\nA_mean[0] := 0.16;\n\n# MAIN PROGRAM\nfor t from 1 to T do\n\n # SHORT RUN\n for i from 1 to n do \n Q[i,t] := A[i,t ]*K[i,t];\n od; \n TQ := sum(Q[k,t], k = 1..n);\n P := dem/TQ; \n\n # NEWTECHNO\n A_max := max(seq(A[i,t], i = 1..n));\n A_mean [t] := A_mean[t-1]*(1 + phi);\n for i from 1 to n do \n\n # In novate\n lambda_in[i] := d_in*r_in*K[i,t];\n Lottery := pois son[lambda_in[i]]();\n if Lottery() > 0 then\n A_prelim : = exp(normald[ln(A_mean[t]),sigma_in]());\n j := 1;\n \+ while search_sp[j] <= A_prelim do j := j + 1; od;\n A_in[i] := search_sp[j-1]; \n else A_in[i] := 0;\n fi;\n\n # Imit ate\n lambda_im[i] := d_im*r_im*K[i,t];\n Lottery := poisson [lambda_im[i]]();\n if Lottery > 0 then A_im[i] := A_max;\n \+ else A_im[i] := 0;\n fi;\n\n # Technochoice\n A[i,t+1] \+ := max(A[i,t], A_in[i], A_im[i]);\n\n od;\n\n # NEWCAPITAL\n for i from 1 to n do\n\n s[i,t] := Q[i,t]/TQ;\n rho[i] := c/(P* A[i,t+1]);\n I_des[i] := delta + 1 - eta/(eta - s[i,t])*rho[i];\n \n pi[i,t] := P*A[i,t] - (c + r_in + r_im);\n if pi[i,t] <= \+ 0 then loans[i] := 0;\n else loans[i] := b*pi[i,t];\n fi;\n I_max[i] := delta + pi[i,t] + loans[i];\n\n constraint := m in(I_des[i], I_max[i]);\n Inv := max(0, constraint);\n K[i,t +1] := K[i,t]*(Inv + 1 - delta);\n\n od;\n\nod;\nprint(cat(`SimpleNe lwin was run with `,n,` firms for `,T,` periods.`));\nprint(`Data are \+ ready for inspection and plotting.`);\nprint(``);\nend:\n" }}}}{SECT 0 {PARA 3 "" 0 "" {TEXT -1 26 "Programs for data analysis" }}{EXCHG {PARA 0 "" 0 "" {TEXT -1 185 "To ease the analysis of the results of e volutionary simulations, Andersen et al. (DRUIDIC) have made a series \+ of helping procedures. Here are a couple for plotting of time series \+ data." }}}{SECT 0 {PARA 4 "" 0 "" {TEXT -1 60 "Procedure that plots a \+ time series for a firm-level variable" }}{EXCHG {PARA 0 "" 0 "" {TEXT -1 218 "This procedure draws time series data for the firms of the ind ustry. In order to allow simple comparisons across time series for dif ferent variables, each firm is given a specific colour that is the sam e in all plots. " }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 504 "DrawVa riable := proc(var,N,T)\nglobal periods,plotdata,text;\nlocal colour,t t,t,n,a;\noption `ES Andersen, Aalborg University, 24 Aug 96`;\n\nperi ods := seq(t, t = 1..T);\ncolour := seq('COLOUR'(HUE,n/N), n=1..N);\na :=NULL;\nfor n from 1 to N do\n\011a := a, 'CURVES'([seq(MergeLists([p eriods[tt]],[var[n,tt]]),tt=1..T)],\n colour[n],THICKNESS(2));\nod; \n\ntext := cat(`Variable `,var,` for `, N, ` firms and `, T, ` period s.`);\nplotdata := 'PLOT'(a, 'TITLE'(text), AXESSTYLE(NORMAL), AXESTIC KS(5,5));\nplotdata;\n\nend:" }}}}{SECT 0 {PARA 4 "" 0 "" {TEXT -1 57 "Function that helps the creation of a PLOT data structure" }}{EXCHG {PARA 0 "" 0 "" {TEXT -1 95 "This procedure performs a subtask for the DrawVariable procedure, namely to create data points." }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 527 "MergeLists := proc(list1, list2)\n local LookUpItem,i;\noption `ES Andersen, Aalborg University, 24 Aug 9 6`;\n\n\011LookUpItem := proc(list1, list2, seriesnumber)\n\011local l istnumber;\n\011if type(seriesnumber, even) then\n\011\011listnumber : = seriesnumber/2;\n\011\011RETURN(list1[listnumber]);\n\011else\n\011 \011listnumber := (seriesnumber-1)/2;\n\011\011RETURN(list2[listnumber ]);\n\011fi;\n\011end;\n\011\nif not nops(list1) = nops(list2) then\n \011ERROR(`the number of elements in lists must be the same`);\nfi;\n[ seq(LookUpItem(list1, list2, i), \n\011\011\011\011i = 2..nops(list1)* 2 + 1)];\011\nend:" }}}}{SECT 0 {PARA 4 "" 0 "" {TEXT -1 16 "Legend fo r plots" }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 449 "Legend := proc(N )\nglobal periods,plotdata,text;\nlocal colour,i,n,a,b;\noption `ES An dersen, Aalborg University, 28 Aug 96`;\n\ncolour := seq('COLOUR'(HUE, n/N), n=1..N);\na:=NULL; b := NULL;\nfor n from 1 to N do\n\011a := a, 'CURVES'([[0,N-n],[10,N-n]],\n colour[n],THICKNESS(2));\n b := b, \+ 'TEXT'([11,N-n],`Firm `.n,FONT(TIMES,ROMAN,12));\nod;\n\ntext := cat(` Legend for `,N,` firms`);\nplotdata := 'PLOT'(a, b, 'TITLE'(text), AXE SSTYLE(NONE));\nplotdata;\n\nend:" }}}}}{SECT 0 {PARA 3 "" 0 "" {TEXT -1 33 "Simulations and data presentation" }}{SECT 0 {PARA 4 "" 0 "" {TEXT -1 52 "A close race of Schumpeterian competition (seed = 4)" }} {EXCHG {PARA 0 "" 0 "" {TEXT -1 133 "Now we are ready for running the \+ model, e.g. for 4 firms during 16 periods (quarters of a year in Nelso n's and Winter's own models). " }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 402 "To make a experiment of the many patters that arise due to purely random events, we explicitly specify the \"seed\" of the random numbe r generator. Such generators are deterministic although their output l ooks like random data. Therefore, a given experiment can be reproduced by specifying the seed initially given to the random number generator . We start with seed = 4, and consider the resulting story." }}} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 71 "_seed := 4; st := time(): Si mpleNelwin(4,16); \n`Time used`,time() - st;" }}}{EXCHG {PARA 0 "" 0 " " {TEXT -1 53 "We start by inspecting the capital coefficients (the " }{TEXT 260 1 "A" }{TEXT -1 15 "'s) defined as " }{XPPEDIT 18 0 "Q[it] \+ = A[it]*K[it]" "/&%\"QG6#%#itG*&&%\"AG6#F&\"\"\"&%\"KG6#F&F+" }{TEXT -1 475 ". In the present close race, innovations are quickly followed by imitations (or compensating innovations) from the other firms of t he industry. All start with 0.16, then the light green firm makes an i nnovation and the violet firm in quick to make a response (an imitatio n or an innovation). Later the red firm catch up, but the aquamarine f irm is too weak. Treough a series of innovations and a few imitations \+ the light green, violet and red firms have a close competition." }}} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 22 "DrawVariable(A,4,16); " }}} {EXCHG {PARA 0 "" 0 "" {TEXT -1 165 "[Comment for readers of non-colou r printouts: In the present version the individual firms can only be c ompared precisely across different plots if you have colours.]" }}} {EXCHG {PARA 0 "" 0 "" {TEXT -1 66 "A successful innovation or imitati on increases the profitability (" }{XPPEDIT 18 0 "pi[i,t]" "&%#piG6$% \"iG%\"tG" }{TEXT -1 58 ") of the firm. A profitable firm will expand \+ its capital (" }{XPPEDIT 18 0 "K[i,t]" "&%\"KG6$%\"iG%\"tG" }{TEXT -1 308 "). INitially the red and the aquamarine firm have negative profit s but later it is one the aquavamarine that is in serious problems. Th is shows up as no investment and a gradual increase of capital. In the present version of the program, there is no bankruptcy mechanism - bu t this can easily be introduced.\n" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 43 "DrawVariable(pi,4,16);DrawVariable(K,4,16);" }}} {EXCHG {PARA 0 "" 0 "" {TEXT -1 54 "The innovations and imitations als o influence output (" }{XPPEDIT 18 0 "Q[i,t]" "&%\"QG6$%\"iG%\"tG" } {TEXT -1 22 ") and market sharess (" }{XPPEDIT 18 0 "s[i,t]" "&%\"sG6$ %\"iG%\"tG" }{TEXT -1 2 ")." }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 42 "DrawVariable(Q,4,16);DrawVariable(s,4,16);" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 129 "Many aspects of this story depends on random events . Thus can easily be seen by trying out another seed for the random ge nerator." }}}}{SECT 0 {PARA 4 "" 0 "" {TEXT -1 31 "Further development of the note" }}{EXCHG {PARA 0 "" 0 "" {TEXT -1 138 "Now follows a few parameter experiments, and then we come to changes in the model. [Th e student is supposed to chose one or two options]." }}{PARA 15 "" 0 " " {TEXT -1 50 "science based/cumulative technological development" }} {PARA 15 "" 0 "" {TEXT -1 32 "discrete/continuous search space" }} {PARA 15 "" 0 "" {TEXT -1 10 "bankruptcy" }}{PARA 15 "" 0 "" {TEXT -1 26 "different markup functions" }}{PARA 15 "" 0 "" {TEXT -1 80 "differ ent specifications of final demand (e.g. logistic expansion of the mar ket)" }}{PARA 15 "" 0 "" {TEXT -1 103 "Finally we introduce an extra e volvong state variable - the R&D intensity like in Silverberg/Verspage n." }}}}{SECT 0 {PARA 4 "" 0 "" {TEXT -1 25 "Make your own experiments " }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 39 "_seed := 123456789; Simp leNelwin(4,16);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 21 "DrawVari able(A,4,16);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}}} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}}{MARK "1 0 0" 19 } {VIEWOPTS 1 1 0 1 1 1803 }