diff --git a/models/modeqs.mod b/models/modeqs.mod index d012c3867a2e62503f25de08a11688d3d9f1a244..6a556d6cea1ca3bbbcc0c5e97f0a7bd4da07c6a0 100644 --- a/models/modeqs.mod +++ b/models/modeqs.mod @@ -1,12 +1,12 @@ -@#if !BLOCKS && !BYTECODE && !USE_DLL // -> MATLAB +@#if ISJULIA || !BLOCKS && !BYTECODE && !USE_DLL // -> MATLAB model; -@#elseif BLOCKS && !BYTECODE && !USE_DLL // -> MATLAB WITH BLOCKS +@#elseif !ISJULIA && BLOCKS && !BYTECODE && !USE_DLL // -> MATLAB WITH BLOCKS model(block, cutoff=@{CUTOFF_VALUE}, mfs=@{MFS_VALUE}, static_mfs=@{STATIC_MFS_VALUE}); -@#elseif !BLOCKS && BYTECODE && !USE_DLL // -> BYTECODE +@#elseif !ISJULIA && !BLOCKS && BYTECODE && !USE_DLL // -> BYTECODE model(bytecode); -@#elseif BLOCKS && BYTECODE && !USE_DLL // -> BYTECODE WITH BLOCKS +@#elseif !ISJULIA && BLOCKS && BYTECODE && !USE_DLL // -> BYTECODE WITH BLOCKS model(block, bytecode, cutoff=@{CUTOFF_VALUE}, mfs=@{MFS_VALUE}, static_mfs=@{STATIC_MFS_VALUE}); -@#elseif !BLOCKS && !BYTECODE && USE_DLL // -> USE_DLL +@#elseif !ISJULIA && !BLOCKS && !BYTECODE && USE_DLL // -> USE_DLL model(use_dll); @#else // USE_DLL WITH BLOCKS model(block, use_dll, cutoff=@{CUTOFF_VALUE}, mfs=@{MFS_VALUE}, static_mfs=@{STATIC_MFS_VALUE}); diff --git a/models/pshock.mod b/models/pshock.mod index 0e44bdde7397d7f360c37e8ed4396b651a7b31d3..a6a647bc1f57bdffb451d081bcf7797ea8b435fd 100644 --- a/models/pshock.mod +++ b/models/pshock.mod @@ -1,5 +1,9 @@ @#define steady = 0 +@#ifndef ISJULIA +@#define ISJULIA=false +@#endif + @#ifndef BLOCKS @#define BLOCKS=false @#endif @@ -46,6 +50,8 @@ @#include "modeqs.mod" +@#if !ISJULIA + for i=1:@{ITERATIONS} load_params_and_steady_state('eagle_steady.txt'); @@ -62,3 +68,17 @@ perfect_foresight_setup(periods=@{PERIODS}); perfect_foresight_solver(no_homotopy, markowitz=@{MARKOWITZ_VALUE}, stack_solve_algo = @{STACK_SOLVE_ALGO_VALUE}, solve_algo = @{STEADY_SOLVE_ALGO_VALUE}); end; + +@#else + +load_params_and_steady_state('eagle_steady.txt'); + +initval; +@#include "initial-condition.inc" +end; + +endval; +@#include "terminal-condition.inc" +end; + +@#endif diff --git a/models/tshock.mod b/models/tshock.mod index 2edca9dce99932e511cf1b046c3551fa578dda90..8735d28d3216f7f9ab2e5b57fdd200a3c273a83a 100644 --- a/models/tshock.mod +++ b/models/tshock.mod @@ -1,5 +1,9 @@ @#define steady = 0 +@#ifndef ISJULIA +@#define ISJULIA=false +@#endif + @#ifndef BLOCKS @#define BLOCKS=false @#endif @@ -46,6 +50,8 @@ @#include "modeqs.mod" +@#if !ISJULIA + for i=1:@{ITERATIONS} load_params_and_steady_state('eagle_steady.txt'); @@ -90,3 +96,45 @@ perfect_foresight_setup(periods=@{PERIODS}); perfect_foresight_solver(no_homotopy, markowitz=@{MARKOWITZ_VALUE}, stack_solve_algo = @{STACK_SOLVE_ALGO_VALUE}, solve_algo = @{STEADY_SOLVE_ALGO_VALUE}); end; + +@#else + +load_params_and_steady_state('eagle_steady.txt'); + +initval; +@#include "initial-condition.inc" +end; + +shocks; + + var EAB_epsg; + periods 1:4; + values 0.01; + + var EAA_epsg; + periods 1:4; + values 0.01; + + var RW_epsg; + periods 1:4; + values 0.01; + + var US_epsg; + periods 1:4; + values 0.01; + + var CH_epsg; + periods 1:4; + values 0.01; + + var JP_epsg; + periods 1:4; + values 0.01; + + var LAC_epsg; + periods 1:4; + values 0.01; + +end; + +@#endif