Commit Graph

287 Commits (4b2d139c7a0d8e3eab550f6dce2ea69e95edbf24)

Author SHA1 Message Date
Johannes Pfeifer 569de10511 Make sure block-decomposed model returns with correct error code if Inf or NaN is encountered
Missing from 5f85d3a200 where only residual was set to error code. If oo_.deterministic_simulation.status is not set to 0, model will erroneously be considered as solved and homotopy will not be triggered.
2017-03-17 10:07:13 +01:00
Houtan Bastani ea13b12cf2 preprocessor: add lag info to equation cross references. closes #1398 2017-03-10 16:59:52 +01:00
Houtan Bastani 33b38ab643 preprocessor: write error messages to cerr instead of cout, replace \n with endl 2017-03-01 12:44:31 +01:00
Houtan Bastani 0b52b778ed preprocessor: for consistency, use equations.size() instead of equation_number() in classes that have equations as a field 2017-02-24 11:20:54 +01:00
Houtan Bastani edd2e98086 preprocessor: replace exit(1) with exit(EXIT_FAILURE) 2017-02-09 12:46:37 +01:00
Houtan Bastani 7fb7dd7ccc fix nested parens for params derivatives. closes #1201 2017-01-05 18:19:37 +01:00
Houtan Bastani 157369b505 when >32 nested parens encountered in matlab, print error message once per file in which such a situation occurred. #1201 2017-01-05 15:19:13 +01:00
Houtan Bastani 3b20d41a92 first iteration of fix for nested parenthesis in matlab. #1201 2016-12-30 18:14:08 +01:00
Houtan Bastani 9582431bd5 bug fix: end preprocessing with error when more than 32 nested parenthesis are encountered. closes #1201 2016-12-28 14:02:50 +01:00
Houtan Bastani 5f85d3a200 block: fix bug introduced in e410043c24. #1245 2016-11-29 16:45:50 +01:00
Houtan Bastani e410043c24 block: add default argument for _dynamic functions: `varargout{1} = NaN;` #1245 2016-11-29 15:18:59 +01:00
Houtan Bastani f087f84a25 preprocessor: define var for normcdf + msvc. #1259 2016-10-17 14:59:07 +02:00
Houtan Bastani d564d832dd preprocessor: add normcdf for MSVC. closes #1259 2016-10-14 16:11:44 +02:00
Houtan Bastani 7cd072e064 preprocessor: clean up writePowerDeriv code. it only writes C code, so no need for use_dll argument 2016-10-14 14:30:14 +02:00
Johannes Pfeifer 077b725a52 Correct comment in _dynamic files that misstated columns of derivative matrices 2016-08-22 19:24:35 +02:00
Houtan Bastani 3695bf4695 preprocessor: Return equation numbers/tags in error message when linear model contains nonzero hessian entries. #419 2016-07-27 15:01:54 -04:00
Stéphane Adjemian (Hermes) d86e78ab01 Fixed dynamic model (julia output)
The number of columns in the Jacobian matrix is the number of endogenous
variables appearing at time t-1, t and t+1 plus the number of exogenous
variables.
2016-06-14 11:21:23 +02:00
Houtan Bastani 90a493ac98 preprocessor: fix bug in writing of temporary terms. closes #1201 2016-06-01 15:29:10 +02:00
Stéphane Adjemian (Hermes) cf9883ef61 Bug fix in assert (Julia output).
See PR #1102 by spencerlyon2.

size always returns a tuple, and we were comparing to an int. Dispatch restricts these arguments to all be vectors so length works here.
2016-05-23 13:48:19 +02:00
Stéphane Adjemian (Hermes) e44d90adc1 Fixed type issues.
params, exo_steady_state and steady_state are vectors not matrices!
2016-05-23 13:48:19 +02:00
Stéphane Adjemian (Hermes) 2e8f528bef Cosmetic changes.
+ Renamed model as model_
+ Renamed options as options_
+ Renamed output as oo_
+ Also export oo_ and options_
+ Fixed typos in comments.
2016-05-23 13:48:19 +02:00
Houtan Bastani 6b7a77d5a9 preprocessor: replace no_2nd_order_params_derivs with params_deriv_order. #1187 2016-05-18 12:26:19 +02:00
Houtan Bastani 42895ce32c Revert "preprocessor: add params_derivs_order to identification and sensitivity. #1187"
This reverts commit 6192a6a776.
2016-05-18 10:33:45 +02:00
Houtan Bastani 6192a6a776 preprocessor: add params_derivs_order to identification and sensitivity. #1187 2016-05-17 17:18:16 +02:00
Houtan Bastani 9d26ab46e9 preprocessor: only compute first order derivatives w.r.t. parameters with identification. closes #1187 2016-05-12 12:02:34 +02:00
Johannes Pfeifer f37d3afb14 Add headers for param_derivs-files 2016-03-29 15:57:49 +02:00
Stéphane Adjemian (Hermes) 127637ffd6 Merge branch 'temporary_terms'
Do not evaluate unnecessary temporary variables (for instance those
used in the evaluation of the jacobian matrix when we only compute the
residuals of the dynamic equations).
2016-03-09 17:53:58 +01:00
Houtan Bastani 8c2e6655f1 preprocessor: introduce new option compute_xrefs, #1125 2016-02-23 13:57:55 +01:00
Houtan Bastani 4976b2b335 preprocessor: add equation cross references 2015-12-18 15:17:32 +01:00
Houtan Bastani 15716124fa preprocessor: fix divergence of equations and aux_equations. closes #1110 2015-12-01 12:34:43 +01:00
Houtan Bastani 4ff17d6191 Revert "preprocessor: write auxiliary variable definitions to matlab function"
This reverts commit ad81129a9b.
2015-12-01 11:41:55 +01:00
Houtan Bastani ad81129a9b preprocessor: write auxiliary variable definitions to matlab function 2015-11-30 15:36:17 +01:00
Michel Juillard df793cebe5 fixed bug in col_id computation 2015-09-19 15:51:32 +02:00
Houtan Bastani ae8d5774b7 preprocessor: fix scoping problem with temporary variables 2015-09-04 15:28:06 +02:00
Houtan Bastani 5bd51d65e8 replace cend with end and cbegin with begin 2015-09-03 16:06:37 +02:00
Houtan Bastani dc441b41b8 preprocessor: rework temporary terms 2015-09-03 15:25:36 +02:00
Houtan Bastani 0fdf76dcf7 preprocessor: fix bug introduced in eb2890d1f5 2015-09-02 15:30:33 +02:00
Houtan Bastani 2846a7023d preprocessor: julia: print only those temporary vars needed for the computation of (residuals, g1, g2, g3) in the respective dynamic! and static! functions
(cherry picked from commit eb2890d1f5)
2015-09-02 15:30:25 +02:00
Houtan Bastani 9b525713d9 Revert "preprocessor: julia: print only those temporary vars needed for the computation of (residuals, g1, g2, g3) in the respective dynamic! and static! functions"
This reverts commit eb2890d1f5.
2015-09-02 15:29:52 +02:00
Houtan Bastani eb2890d1f5 preprocessor: julia: print only those temporary vars needed for the computation of (residuals, g1, g2, g3) in the respective dynamic! and static! functions 2015-09-01 18:29:10 +02:00
Houtan Bastani 11eaf27453 Merge branch 'julia' 2015-09-01 11:35:16 +02:00
Michel Juillard c9f771973d expand extended preprocessor + first implementation of Petsc interface 2015-08-27 10:00:51 +02:00
Michel Juillard 3ed1d01ba9 adding writeResidualsC() for external files 2015-08-24 14:53:27 +02:00
Houtan Bastani 1d17f6b770 remove fill!(residual, 0.0) statements as all elements of residual are assigned to 2015-08-21 17:13:38 +02:00
Houtan Bastani d2c3debeb8 add @inbounds to model equations, temporary vars, and model vars 2015-08-21 17:13:38 +02:00
Houtan Bastani 2a9761ff33 clean up printing 2015-08-21 17:13:32 +02:00
Houtan Bastani 5666e12e8f add assertions at beginning of function call 2015-08-21 12:05:38 +02:00
Houtan Bastani 59122a1e73 fix comments in generated files 2015-08-21 12:00:47 +02:00
Houtan Bastani 73a0ad51d6 update static & dynamic function comments 2015-08-20 15:28:32 +02:00
Houtan Bastani a686a47ce7 check function output argument sizes 2015-08-20 15:26:10 +02:00