\$TITLE SAVINGS MODEL BY RAMSEY (RAMSEY,SEQ=63) * THIS SIMPLE GROWTH MODEL IS A VERY POPULAR MODEL FOR * NLP CODE TESTING. ONLY THE SET T NEEDS TO BE REDEFINED * IN ORDER TO GENERATE MODELS OF DIFFERENT SIZES. VARIOUS * OPTIONS ON CONSTRAINT TYPES ARE AVAILABLE AS WELL. * * REFERENCES: RAMSEY F P, A MATHEMATICAL THEORY OF SAVING, * ECONOMICS JOURNAL, DECEMBER 1928. * * MURTAGH M AND SAUNDERS M, A PROJECTED LAGRANGIAN ALGORITHM * AND ITS IMPLEMENTATION FOR SPARSE NONLINEAR CONSTRAINTS, * MATHEMATICAL PROGRAMMING STUDY 16, PP 84-117,1982, * SECTION 5.12 ECONOMIC GROWTH MODEL * OPTION NLP = NLPHOPDM; SET T TIME PERIDS / 1*400/ TFIRST(T) FIRST PERIOD TLAST(T) LAST PERIOD SCALARS BET DISCOUNT FACTOR / .95 / B SHARE PARAMETER / .25 / G LABOR GROWTH / .03 / K0 INITIAL CAPITAL / 3.0 / I0 INITIAL INVESTMENT / .05 / C0 INITIAL CONSUMPTION / .95 / ALPH CALIBRATION CONSTANT PARAMETERS BETA(T) DISCOUNT FACTOR ALPHA(T) PRODUCTION FUNCTION CONSTANT ; TFIRST(T) = YES\$(ORD(T) EQ 1); TLAST(T) = YES\$(ORD(T) EQ CARD(T)); DISPLAY TFIRST, TLAST; BETA(T) = BET**ORD(T); BETA(TLAST) = BETA(TLAST)/(1-BET); * THE PRODUCTION FUNCTION IS OF THE FORM * Q = CONST*K(T)**B * L(T)**(B-1) * WHERE K(T) AND L(T) ARE CAPITAL AND LABOR IN PERIOD T * (COBB-DOUGLAS). WITH LABOR GROWING AT RATE G AND * I0 + C0 = Q0 = CONST*K0**B*LO**(B-1) * WE CAN CALIBRATE * ALPHA(T) = CONST*L(T)**(B-1) AS FOLLOWS: ALPH = (C0+I0)/K0**B; ALPHA(T) = ALPH*(1+G)**((1-B)*ORD(T)); DISPLAY BETA, ALPHA; VARIABLES K(T) CAPITAL C(T) CONSUMPTION I(T) INVESTMENT GRAM400 EQUATIONS C1(T) CAPACITY CONSTRAINT - INEQUALITY C2(T) CAPACITY CONSTRAINT - EQUALITY K1(T) CAPITAL BALANCE - INEQUALITY K2(T) CAPITAL BALANCE - EQUALITY KFIX(T) - EQUALITY TC(T) TERMINAL CONDITION UTIL OBJECTIVE FUNCTION ; C1(T).. ALPHA(T)*K(T)**B =G= C(T) + I(T) ; C2(T).. ALPHA(T)*K(T)**B =E= C(T) + I(T) ; K1(T+1).. K(T+1) =L= K(T) + I(T) ; K2(T+1).. K(T+1) =E= K(T) + I(T) ; KFIX(TFIRST).. K(TFIRST) =E= I0 + K0; UTIL.. GRAM400 =E= SUM(T, BETA(T)*LOG(C(T))); TC(TLAST).. G*K(TLAST) =L= I(TLAST); MODELS RAMSEYA VARIANT A / C1, K1, TC, KFIX, UTIL /; I.LO(T) = I0; I.UP(T) = 1.04**ORD(T)*I0; C.LO(T) = C0; K.LO(T) = I0 + K0; * THE ABOVE VERSION IS NOT FEASIBLE FOR A MODEL HORIZON * OF LESS THAN 20 PERIODS. THE ADJUSTMENTS BELOW ARE USED * IN THE MINOS 5 MANUAL FOR A 10 PERIOD VERSION. * STARTING POINT C.L(T)=C0; K.L(T)=I0+K0+I0; I.L(T)=I0; I.L(TLAST)=3*I0; OPTION LIMROW = 100 OPTION LIMCOL = 0 SOLVE RAMSEYA MAXIMIZING GRAM400 USING NLP;