Fast deterministic simulations:

* when using "bytecode" without "block", enforce "stack_solve_algo=5"
* added a test for "bytecode" without "block" option


git-svn-id: https://www.dynare.org/svn/dynare/trunk@3388 ac1d8469-bf42-47a9-8791-bf33cf982152
time-shift
sebastien 2010-01-27 10:13:14 +00:00
parent 3f8bc2b2a1
commit c44452d820
10 changed files with 32 additions and 13 deletions

View File

@ -63,8 +63,8 @@ end
if options_.block && ~options_.bytecode && (options_.stack_solve_algo == 0 || options_.stack_solve_algo == 5)
error('SIMUL: for the moment, you must use stack_solve_algo={1,2,3,4} when using block without bytecode option')
end
if options_.block && options_.bytecode && options_.stack_solve_algo ~= 5
error('SIMUL: for the moment, you must use stack_solve_algo=5 with block and bytecode option')
if options_.bytecode && options_.stack_solve_algo ~= 5
error('SIMUL: for the moment, you must use stack_solve_algo=5 with bytecode option')
end
if exist('OCTAVE_VERSION') && options_.stack_solve_algo == 2

View File

@ -17,6 +17,7 @@ OCTAVE_MODS = \
block_bytecode/fs2000_bicgstab.mod \
block_bytecode/fs2000_optpath.mod \
block_bytecode/fs2000_bytecode.mod \
block_bytecode/fs2000_block_bytecode.mod \
block_bytecode/ramst.mod \
block_bytecode/ireland.mod \
block_bytecode/ls2003.mod \

View File

@ -1,7 +1,8 @@
// Tests option block + stack_solve_algo = 3 + solve_algo = 1
// Must be launched after fs2000_simk.mod
@#define block_bytecode = 1
@#define block = 1
@#define bytecode = 0
@#define solve_algo = 1
@#define stack_solve_algo = 3
@#include "fs2000_common.mod"

View File

@ -0,0 +1,8 @@
// Tests option block+bytecode
// Must be launched after fs2000_simk.mod
@#define bytecode = 1
@#define block = 1
@#define solve_algo = 5
@#define stack_solve_algo = 5
@#include "fs2000_common.mod"

View File

@ -1,7 +1,8 @@
// Tests option block+bytecode
// Tests option bytecode without block
// Must be launched after fs2000_simk.mod
@#define block_bytecode = 2
@#define bytecode = 1
@#define block = 0
@#define solve_algo = 5
@#define stack_solve_algo = 5
@#include "fs2000_common.mod"

View File

@ -11,13 +11,17 @@ rho = 0.7;
psi = 0.787;
del = 0.02;
@#if block_bytecode == 2
@#if block && bytecode
model(block, bytecode);
@#else
@# if block_bytecode == 1
@# if block && !bytecode
model(block);
@# else
@# if !block && bytecode
model(bytecode);
@# else
model;
@# endif
@# endif
@#endif
@ -64,7 +68,7 @@ end;
options_.maxit_=10;
steady(solve_algo = @{solve_algo});
@#if block_bytecode > 0
@#if block
model_info;
@#endif
@ -76,7 +80,7 @@ end;
simul(periods=200, stack_solve_algo = @{stack_solve_algo});
@#if block_bytecode > 0
@#if block || bytecode
if ~exist('fs2000_simk_results.mat','file');
error('fs2000_simk must be run first');
end;

View File

@ -1,7 +1,8 @@
// Tests option block + stack_solve_algo = 2 + solve_algo = 3
// Must be launched after fs2000_simk.mod
@#define block_bytecode = 1
@#define block = 1
@#define bytecode = 0
@#define solve_algo = 3
@#define stack_solve_algo = 2
@#include "fs2000_common.mod"

View File

@ -1,7 +1,8 @@
// Tests option block + stack_solve_algo = 1 + solve_algo = 2
// Must be launched after fs2000_simk.mod
@#define block_bytecode = 1
@#define block = 1
@#define bytecode = 0
@#define solve_algo = 2
@#define stack_solve_algo = 1
@#include "fs2000_common.mod"

View File

@ -1,7 +1,8 @@
// Tests option block + stack_solve_algo = 4 + solve_algo = 4
// Must be launched after fs2000_simk.mod
@#define block_bytecode = 1
@#define block = 1
@#define bytecode = 0
@#define solve_algo = 4
@#define stack_solve_algo = 4
@#include "fs2000_common.mod"

View File

@ -1,4 +1,5 @@
@#define block_bytecode = 0
@#define block = 0
@#define bytecode = 0
@#define solve_algo = 2
@#define stack_solve_algo = 0
@#include "fs2000_common.mod"