{VERSION 4 0 "APPLE_PPC_MAC" "4.0" } {USTYLETAB {CSTYLE "Maple Input" -1 0 "Courier" 0 1 255 0 0 1 0 1 0 0 1 0 0 0 0 1 }{CSTYLE "2D Math" -1 2 "Times" 0 1 0 0 0 0 0 0 2 0 0 0 0 0 0 1 }{CSTYLE "2D Comment" 2 18 "" 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 1 } {CSTYLE "" -1 256 "" 0 1 0 0 0 0 1 0 0 0 0 0 0 0 0 1 }{CSTYLE "" -1 257 "" 0 1 0 0 0 0 1 0 0 0 0 0 0 0 0 1 }{CSTYLE "" -1 258 "" 0 1 0 0 0 0 1 0 0 0 0 0 0 0 0 1 }{CSTYLE "" -1 259 "" 0 1 0 0 0 0 1 0 0 0 0 0 0 0 0 1 }{CSTYLE "" -1 260 "" 0 1 0 0 0 0 1 0 0 0 0 0 0 0 0 1 } {PSTYLE "Normal" -1 0 1 {CSTYLE "" -1 -1 "Times" 1 12 0 0 0 1 2 2 2 2 2 2 1 1 1 1 }1 1 0 0 0 0 1 0 1 0 2 2 0 1 }{PSTYLE "Heading 1" -1 3 1 {CSTYLE "" -1 -1 "Times" 1 18 0 0 0 1 2 1 2 2 2 2 1 1 1 1 }1 1 0 0 6 6 1 0 1 0 2 2 0 1 }{PSTYLE "Heading 2" -1 4 1 {CSTYLE "" -1 -1 "Times " 1 14 0 0 0 1 2 1 2 2 2 2 1 1 1 1 }1 1 0 0 4 4 1 0 1 0 2 2 0 1 } {PSTYLE "Bullet Item" -1 15 1 {CSTYLE "" -1 -1 "Times" 1 12 0 0 0 1 2 2 2 2 2 2 1 1 1 1 }1 1 0 0 3 3 1 0 1 0 2 2 15 2 }{PSTYLE "Title" -1 18 1 {CSTYLE "" -1 -1 "Times" 1 18 0 0 0 1 2 1 1 2 2 2 1 1 1 1 }3 1 0 0 12 12 1 0 1 0 2 2 19 1 }{PSTYLE "Author" -1 19 1 {CSTYLE "" -1 -1 "T imes" 1 12 0 0 0 1 2 2 2 2 2 2 1 1 1 1 }3 1 0 0 8 8 1 0 1 0 2 2 0 1 } } {SECT 0 {EXCHG {PARA 18 "" 0 "" {TEXT -1 25 "Simple Nelwin for Maple 6 " }}}{EXCHG {PARA 19 "" 0 "" {TEXT -1 61 "Version 25 Apr 01 \nEsben Sl oth Andersen, esa@business.auc.dk\n" }}}{SECT 0 {PARA 3 "" 0 "" {TEXT -1 17 "Preliminary notes" }}{EXCHG {PARA 0 "" 0 "" {TEXT -1 351 "1. Th is program is a simplified version of the program found in Andersen'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 mor e structured and decomposed kind of programming should be applied." }} }{EXCHG {PARA 0 "" 0 "" {TEXT -1 284 " 2. The previous program was pro grammed in Maple V.4, and therefore it does not work fine with Maple 6 . The present program is rewritten for the new version of Maple. At th e same time a couple of helping procedure are made available to ease t he ploti of theesults of the simulations. " }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 192 "3. The worksheet is run by placing the cursor in the fir st line of Maple input (> restart;), press , and then press each time you are in a new input section (excecution group)." }} }{EXCHG {PARA 0 "" 0 "" {TEXT -1 139 "4. Comments, bug reports and sug gestions for new features are very welcome. Please indicate which vers ion of the note you are referring to." }}}}{SECT 0 {PARA 3 "" 0 "" {TEXT -1 11 "The program" }}{EXCHG {PARA 0 "" 0 "" {TEXT -1 123 "Befor e running the program, we reset Maple and secure that extensive run-ti me error massages are 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 a nd Winter-like model. During a first overview of the present note, you should not study the procedure. Just press , and then proceed \+ to the analysis of the results of the process of Schumpeterian competi tion. During a second study of the note, however, the program should b e studied. Here it is helpful to press the Maple button that toggles t he display of Maple input between ordinary text and standard notation \+ (with formatting and indentation of the program). However, inserted no tes in programs are not shown in the formatted standard notation - so \+ you should also study 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 q uickly (in terms of computer time)." }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 125 "You can change evolutionary simulation in three ways:\n1. You can change the arguments of the procedure calls: SimpleNelwin(" } {TEXT 258 1 "n" }{TEXT -1 1 "," }{TEXT 259 1 "T" }{TEXT -1 28 "), e.g. SimpleNelwin(4,16). " }{TEXT 257 2 "T " }{TEXT -1 124 "is the number \+ of periods of the simulation. Since Maple is rather slow, you shourd s tart with few periods - e.g. 16 or 25. " }{TEXT 256 2 "n " }{TEXT -1 469 "is the number of firms. The present parameters give a near-equili brium without innovations for 4 firms. But you can start in an out-of- equilibrium situation with e.g. 16 firms. \n2. You can change the syst em variable seed, and thus change the sequences of random numbers (inn ovations and imitations). See below.\n3. You can change the parameters in the program text, e.g. b := 2.5;\n4. You can change the program co mmands and expressions.\nBut here is the initial version:\n" }}} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 2970 "SimpleNelwin := proc(n,T) \n\n# Compare with Andersen's \"Evolutionary Economics\", Ch. 4 + Appe ndix\n# This model has a discrete 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_in, A_prelim, A_in, lambda_im, A_im, rho, I_de s, pi, loans, I_max, constraint, Inv;\n# The fact that variables and c onstants are \"global\" means that they can \n# be inspected interacti vely after the simulation\n\noption `ES Andersen, Aalborg University, \+ 25 Apr 01`;\n\n# PARAMETERS\nb := 1 ;\nc := \+ 0.16 ;\ndelta := 0.03 ;\ndem := 67 ;\nd_i m := 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, .0 63, .111, .160, .206, .292,\n .297, .363, .375, .403, .42 6, .441, .558,\n .675, .718, .742, .843, .846, .917, .981 ];\n# Such discrete search space is not fount in N&W, 1982, chs. 12-14 \n# but in ch. 9. It is important for analysis at the level of techniq ues\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# INITIALISATION\nf or 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 # Innovate\n \+ lambda_in[i] := d_in*r_in*K[i,t];\n if stats[random,poisson[ lambda_in[i]]]() > 0 then\n A_prelim := exp(stats[random,norma ld[ln(A_mean[t]),sigma_in]]());\n j := 1;\n while sear ch_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 # Imitate\n \+ lambda_im[i] := d_im*r_im*K[i,t];\n if stats[random,poisson[lamb da_im[i]]]() > 0 then \n 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 t o 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 loa ns[i] := 0;\n else loans[i] := b*pi[i,t];\n fi;\n I_ma x[i] := delta + pi[i,t] + loans[i];\n\n constraint := min(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(`SimpleNelwin was r un 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 evolutionary s imulations, Andersen et al. (DRUIDIC) have made a series of helping pr ocedures. Here are a couple for plotting of time series data." }}} {SECT 0 {PARA 4 "" 0 "" {TEXT -1 60 "Procedure that plots a time serie s for a firm-level variable" }}{EXCHG {PARA 0 "" 0 "" {TEXT -1 218 "Th is procedure draws time series data for the firms of the industry. In \+ order to allow simple comparisons across time series for different var iables, each firm is given a specific colour that is the same in all p lots. " }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 504 "DrawVariable := \+ proc(var,N,T)\nglobal periods,plotdata,text;\nlocal colour,tt,t,n,a;\n option `ES Andersen, Aalborg University, 24 Aug 96`;\n\nperiods := seq (t, t = 1..T);\ncolour := seq('COLOUR'(HUE,n/N), n=1..N);\na:=NULL;\nf or n from 1 to N do\n\011a := a, 'CURVES'([seq(MergeLists([periods[tt] ],[var[n,tt]]),tt=1..T)],\n colour[n],THICKNESS(2));\nod;\n\ntext : = cat(`Variable `,var,` for `, N, ` firms and `, T, ` periods.`);\nplo tdata := 'PLOT'(a, 'TITLE'(text), AXESSTYLE(NORMAL), AXESTICKS(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 DrawVari able procedure, namely to create data points." }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 527 "MergeLists := proc(list1, list2)\nlocal LookUpI tem,i;\noption `ES Andersen, Aalborg University, 24 Aug 96`;\n\n\011Lo okUpItem := proc(list1, list2, seriesnumber)\n\011local listnumber;\n \011if type(seriesnumber, even) then\n\011\011listnumber := seriesnumb er/2;\n\011\011RETURN(list1[listnumber]);\n\011else\n\011\011listnumbe r := (seriesnumber-1)/2;\n\011\011RETURN(list2[listnumber]);\n\011fi; \n\011end;\n\011\nif not nops(list1) = nops(list2) then\n\011ERROR(`th e number of elements in lists must be the same`);\nfi;\n[seq(LookUpIte m(list1, list2, i), \n\011\011\011\011i = 2..nops(list1)*2 + 1)];\011 \nend:" }}}}{SECT 0 {PARA 4 "" 0 "" {TEXT -1 16 "Legend for plots" }} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 450 "Legend := proc(N)\nglobal p eriods,plotdata,text;\nlocal colour,i,n,a,b;\noption `ES Andersen, Aal borg 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), AXESSTYLE(NON E));\nplotdata;\n\nend:" }}}}}{SECT 0 {PARA 3 "" 0 "" {TEXT -1 33 "Sim ulations 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. f or 4 firms during 16 periods (quarters of a year in Nelson's and Winte r's own models). " }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 402 "To make a e xperiment of the many patters that arise due to purely random events, \+ we explicitly specify the \"seed\" of the random number generator. Suc h generators are deterministic although their output looks like random data. Therefore, a given experiment can be reproduced by specifying t he 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(): SimpleNelwin(4,16); \n`T ime used`,time() - st;" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 53 "We star t 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]" "6# /&%\"QG6#%#itG*&&%\"AG6#F'\"\"\"&%\"KG6#F'F," }{TEXT -1 475 ". In the present close race, innovations are quickly followed by imitations (o r compensating innovations) from the other firms of the industry. All \+ start with 0.16, then the light green firm makes an innovation and the violet firm in quick to make a response (an imitation or an innovatio n). Later the red firm catch up, but the aquamarine firm 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-colour printouts: In th e present version the individual firms can only be compared precisely \+ across different plots if you have colours.]" }}}{EXCHG {PARA 0 "" 0 " " {TEXT -1 66 "A successful innovation or imitation increases the prof itability (" }{XPPEDIT 18 0 "pi[i,t]" "6#&%#piG6$%\"iG%\"tG" }{TEXT -1 58 ") of the firm. A profitable firm will expand its capital (" } {XPPEDIT 18 0 "K[i,t]" "6#&%\"KG6$%\"iG%\"tG" }{TEXT -1 308 "). INitia lly the red and the aquamarine firm have negative profits but later it is one the aquavamarine that is in serious problems. This shows up as no investment and a gradual increase of capital. In the present versi on of the program, there is no bankruptcy mechanism - but this can eas ily be introduced.\n" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 43 "Dra wVariable(pi,4,16);DrawVariable(K,4,16);" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 54 "The innovations and imitations also influence output (" } {XPPEDIT 18 0 "Q[i,t]" "6#&%\"QG6$%\"iG%\"tG" }{TEXT -1 22 ") and mark et sharess (" }{XPPEDIT 18 0 "s[i,t]" "6#&%\"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 "M any aspects of this story depends on random events. Thus can easily be seen by trying out another seed for the random generator." }}}}{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 exper iments, and then we come to changes in the model. [The student is sup posed to chose one or two options]." }}{PARA 15 "" 0 "" {TEXT -1 50 "s cience 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 mar kup functions" }}{PARA 15 "" 0 "" {TEXT -1 80 "different specification s of final demand (e.g. logistic expansion of the market)" }}{PARA 15 "" 0 "" {TEXT -1 103 "Finally we introduce an extra evolvong state var iable - the R&D intensity like in Silverberg/Verspagen." }}}}{SECT 0 {PARA 4 "" 0 "" {TEXT -1 25 "Make your own experiments" }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 39 "_seed := 123456789; SimpleNelwin(4, 16);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 21 "DrawVariable(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 1 1 1 1 }{PAGENUMBERS 0 1 2 33 1 1 }