Skip to content

Commit

Permalink
Prepare for v0.7
Browse files Browse the repository at this point in the history
  • Loading branch information
christophe-gouel committed Jan 5, 2018
1 parent b34d807 commit acf022e
Show file tree
Hide file tree
Showing 26 changed files with 212 additions and 172 deletions.
17 changes: 10 additions & 7 deletions Archive.bat
Original file line number Diff line number Diff line change
@@ -1,32 +1,35 @@
del *.zip

:: Create dolo-matlab executable for Windows
pyinstaller.py --onefile --out=pyinstaller --paths=.\Python\dolo .\Python\dolo\bin\dolo-matlab
copy /Y pyinstaller\dist\dolo-matlab.exe Python\dolo\bin
rmdir /S /Q pyinstaller
del *.log
pyinstaller --onefile --clean --paths=.\Python\dolo .\Python\dolo\bin\dolo-matlab
copy /Y dist\dolo-matlab.exe Python\dolo\bin
rmdir /S /Q dist
rmdir /S /Q build
del *.spec

:: Create empty folders
md recs-archive
md recs-archive\private
md recs-archive\html
md recs-archive\demos
md recs-archive\Python
md recs-archive\recipes

:: Generate RECS documentation
cd html
matlab -wait -nosplash -r addpath('%1');startup;Publish_recs_help;exit
matlab -wait -nosplash -r addpath('%1');startup;Publish_recs_help;clear;Publish_recs_help(1);exit
cd ..

:: Convert README.md to html
Markdown.pl README.md > README.html
pandoc README.md -s -o README.html

:: Copy all files
copy /Y . recs-archive
copy /Y private recs-archive\private
robocopy html recs-archive\html /E
copy /Y demos recs-archive\demos
robocopy Python recs-archive\Python /E
robocopy Python\dolo recs-archive\Python\dolo /E
copy /Y recipes recs-archive\recipes

:: Clean the files and compress
cd recs-archive
Expand Down
32 changes: 32 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# Changelog

## [0.7]

### Added
- Extract information about variable names to be used in tables and figures.
- Length of burn-in period can be chosen by the user.
- New model type with subperiods (not yet documented).
- New mcp solver: `mcpsolve`

### Changed
- Change the convention for YAML files.
- Change the structure of recsmodel objects.
- Update installation instructions for Python dependencies.
- Use MATLAB table for display.

### Removed
- Remove small-country storage example (sto5).

## Older versions

See [release notes](https://github.com/christophe-gouel/RECS/wiki/Release-Notes)
for older versions or refer to commit messages for more information:

[0.6]: https://github.com/christophe-gouel/RECS/compare/v0.5.1...v0.6
[0.5.1]: https://github.com/christophe-gouel/RECS/compare/v0.5...v0.5.1
[0.5]: https://github.com/christophe-gouel/RECS/compare/v0.4...v0.5
[0.4]: https://github.com/christophe-gouel/RECS/compare/v0.3.2...v0.4
[0.3.2]: https://github.com/christophe-gouel/RECS/compare/v0.3.1...v0.3.2
[0.3.1]: https://github.com/christophe-gouel/RECS/compare/v0.3...v0.3.1
[0.3]: https://github.com/christophe-gouel/RECS/compare/v0.2...v0.3
[0.2]: https://github.com/christophe-gouel/RECS/compare/v0.1...v0.2
21 changes: 15 additions & 6 deletions Contents.m
Original file line number Diff line number Diff line change
@@ -1,28 +1,37 @@
% RECS Toolbox
% Version 0.7-beta (R2016a) 2-Jun-2016
% Version 0.7 (R2017b) 4-Jan-2018
%
% RECS functions
% recsAccuracy - Evaluate accuracy of a RECS solution.
% recsAccuracySP - Evaluate accuracy of a RECS solution for models with subperiods.
% recsAuxiliary - Calculates auxiliary variables not included in the core model.
% recsCheck - Check analytical derivatives against numerical ones.
% recsConvert - Convert the interpolation structure of a model to another form.
% recsDecisionRules - Plot a model decision rules
% recsDecisionRules - Plot a model decision rules.
% recsdemos - Run all RECS demonstration files.
% recsFirstGuess - Find a first guess using the perfect foresight solution or the first-order approximation of the model
% recsFirstGuess - Find a first guess using the perfect foresight solution or the first-order approximation of the model.
% recsFirstGuessSP - Find a first guess for models with subperiods.
% recsinterpinit - Prepare a RECS interpolation structure.
% recsmodel - Prepare a RECS model object.
% recsmodelsp - Prepare a RECS model object for models with subperiods.
% recsSimul - Simulate a model.
% recsSimulSP - Simulate a model with subperiods.
% recsSolveDeterministicPb - Solve a perfect foresight problem.
% recsSolveLocal - Calculate the first-order perturbation solution
% recsFirstGuessSP - Find a first guess for models with subperiods.
% recsSolveLocal - Calculate the first-order perturbation solution.
% recsSolveREE - Find the rational expectations equilibrium (REE) of a model.
% recsSolveREESP - Find the rational expectations equilibrium (REE) of a model with subperiods.
% recsSolveREEFiniteHorizon - Solve a finite horizon rational expectations problem.
% recsSS - Solve for the deterministic steady state of a model.
% recsSSSP - Solve for the deterministic steady state of a model with subperiods.
%
% Nonlinear equations and MCP solvers included in RECS
% lmmcp - Solve mixed complementarity problems.
% mcpsolve - Solve mixed complementarity problems.
% nsoli - Solve system of nonlinear equations by a Jacobian-free Newton-Krylov solver.
% recspathmcp - Solve mixed complementarity problems (require the installation of Path).
% SA - Solve a system of equations by successive approximation.
% SCP - Solve a problem through simple continuation method (homotopy)
% SCP - Solve a problem through simple continuation method (homotopy).

% Copyright (C) 2011-2016 Christophe Gouel
% Copyright (C) 2011-2018 Christophe Gouel
% Licensed under the Expat license, see LICENSE.txt
4 changes: 2 additions & 2 deletions LICENSE.txt
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
Format: http://dep.debian.net/deps/dep5/
Upstream-Contact: Christophe Gouel <christophe.gouel@grignon.inra.fr>
Upstream-Contact: Christophe Gouel <christophe.gouel@inra.fr>

Files: *
Copyright: 2011-2016, Christophe Gouel
Copyright: 2011-2018, Christophe Gouel
License: Expat
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in the
Expand Down
2 changes: 1 addition & 1 deletion Python/dolo
Submodule dolo updated 1 files
+212 −5 dolo/symbolic/recipes.py
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
RECS toolbox Version 0.7-beta
=============================
RECS toolbox Version 0.7
========================

A MATLAB solver for nonlinear, dynamic, stochastic, rational expectations
equilibrium models. RECS stands for "Rational Expectations Complementarity
Solver". This name emphasizes that RECS has been developed specifically to solve
models that include complementarity equations, also known as models with
occasionally binding constraints.

[Christophe Gouel](http://www.christophegouel.com) (<christophe.gouel@grignon.inra.fr>)
[Christophe Gouel](http://www.christophegouel.com) (<christophe.gouel@inra.fr>)

**Main page is at**: [www.recs-solver.org](http://www.recs-solver.org).

## Download

RECS Toolbox zip archives are available at
[https://github.com/christophe-gouel/RECS/releases](https://github.com/christophe-gouel/RECS/releases).
<https://github.com/christophe-gouel/RECS/releases>.

Why is this archive 12 MB? Much of this size is due to an executable for
Why is this archive 20 MB? Much of this size is due to an executable for
Windows. The executable file includes a complete Python distribution necessary
to parse RECS model files.

Expand Down
3 changes: 2 additions & 1 deletion demos/Contents.m
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
% STO4 Competitive storage with price-band backed by public storage
% STO5 Two-country storage-trade model
% STO6 Quarterly storage model with annual inelastic supply
% STO6SP Variant of STO6: Quarterly storage model with informational subperiods and annual inelastic supply

% Copyright (C) 2011-2013 Christophe Gouel
% Copyright (C) 2011-2018 Christophe Gouel
% Licensed under the Expat license, see LICENSE.txt
26 changes: 0 additions & 26 deletions demos/sto1sp.m

This file was deleted.

60 changes: 0 additions & 60 deletions demos/sto1sp.yaml

This file was deleted.

6 changes: 4 additions & 2 deletions demos/sto6SP.m
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,10 @@
[interp,X] = recsSolveREESP(model,interp,{x1; x2; x3; x4});

%% Compare STO6 and STO6SP when informational shocks are removed
disp('Max absolute error in first subperiod storage and price (in log10)');
disp(log10(max(abs(Xcat(:,[1 5])-X{1}))));
if exist('Xcat','var')
disp('Max absolute error in first subperiod storage and price (in log10)');
disp(log10(max(abs(Xcat(:,[1 5])-X{1}))));
end

%% Introduced information shocks
sigma = [0.05/sqrt(3) eps 0.05/sqrt(3) 0.05/sqrt(3)];
Expand Down
29 changes: 24 additions & 5 deletions html/Publish_recs_help.m
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
function Publish_recs_help(website)
% PUBLISH_RECS_HELP publishes help pages to html

% Copyright (C) 2011-2013 Christophe Gouel
% Copyright (C) 2011-2018 Christophe Gouel
% Licensed under the Expat license, see LICENSE.txt

%% Initialization
Expand Down Expand Up @@ -93,34 +93,49 @@ function Publish_recs_help(website)
txt = regexprep(txt,pattern,'"$1.html"');
pattern = '"matlab:doc\(''recsmodel.recsmodel''\)"';
txt = regexprep(txt,pattern,'"recsmodel.html"');
pattern = '"matlab:doc\(''recsmodelsp.recsmodelsp''\)"';
txt = regexprep(txt,pattern,'"recsmodelsp.html"');
fid = fopen(fullfile(targetdirectory,htmlfilelist(i,:)),'w');
fprintf(fid,'%s',txt);
fclose(fid);
end

FunctionList = {'recsAccuracy',...
'recsAccuracySP',...
'recsAuxiliary',...
'recsCheck',...
'recsConvert',...
'recsDecisionRules',...
'recsdemos',...
'recsFirstGuess',...
'recsFirstGuessSP',...
'recsinterpinit',...
'recsmodel',...
'recsmodelsp',...
'recsSimul',...
'recsSimulSP',...
'recsSolveDeterministicPb',...
'recsSolveDeterministicPbSP',...
'recsSolveLocal',...
'recsSolveREE',...
'recsSolveREESP',...
'recsSolveREEFiniteHorizon',...
'recsSS',...
'recsSSSP',...
'lmmcp',...
'mcpsolve'...
'nsoli',...,
'recspathmcp',...
'SA',...
'SCP'};
for fn = FunctionList
if ~strcmp(fn{1},'recsmodel'), FunctionName = fn{1};
else, FunctionName = 'recsmodel.recsmodel';
switch fn{1}
case 'recsmodel'
FunctionName = 'recsmodel.recsmodel';
case 'recsmodelsp'
FunctionName = 'recsmodelsp.recsmodelsp';
otherwise
FunctionName = fn{1};
end
copyfile(fullfile(recsdirectory,[fn{1} '.m']),fullfile(targetdirectory,[fn{1} '.m']));
txt = help2html(FunctionName);
Expand All @@ -130,6 +145,9 @@ function Publish_recs_help(website)
% Replace recsmodel/recsmodel
pattern = 'recsmodel/recsmodel';
txt = strrep(txt,pattern,'recsmodel');
% Replace recsmodelsp/recsmodelsp
pattern = 'recsmodelsp/recsmodelsp';
txt = strrep(txt,pattern,'recsmodelsp');
% Replace view code
pattern = '"matlab:edit (\w*)"';
txt = regexprep(txt,pattern,[fn{1} '.m']);
Expand Down Expand Up @@ -157,13 +175,14 @@ function Publish_recs_help(website)

currentfolder = cd(fullfile(recsdirectory,'demos'));
DemoFileList = {'cs1','cs2','gro1','gro2','gro3',...
'sto1','sto2','sto3','sto4','sto5'};
'sto1','sto2','sto3','sto4','sto5','sto6','sto6SP'};
for demo=DemoFileList
publish('clearpublish.m',PublishOptions);
reset(stream);
publish([demo{1} '.m'],PublishOptions);
end
YamlFileList = {'cs1','gro1','gro2','gro3','sto1','sto2','sto4','sto5'};
YamlFileList = {'cs1','gro1','gro2','gro3','sto1','sto2','sto4','sto5',...
'sto6','sto6SP1','sto6SP2','sto6SP3','sto6SP4'};
for yaml=YamlFileList
copyfile([yaml{1} '.yaml'],fullfile(targetdirectory,[yaml{1} '.txt']));
publish([yaml{1} 'model.m'],PublishOptionsNoExec);
Expand Down
4 changes: 4 additions & 0 deletions html/demos.m
Original file line number Diff line number Diff line change
Expand Up @@ -28,3 +28,7 @@
% * <sto4.html Competitive storage with price-band backed by public storage>
%
% * <sto5.html Two-country storage-trade model>
%
% * <sto6.html Quarterly storage model with annual inelastic supply>
%
% * <sto6SP.html Variant of sto6: Quarterly storage model with informational subperiods and annual inelastic supply>
4 changes: 3 additions & 1 deletion html/helptoc.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version='1.0' encoding='ISO-8859-1' ?>

<toc version="0.7-beta">
<toc version="0.7">

<tocitem target="recs_product_page.html">RECS

Expand Down Expand Up @@ -56,6 +56,8 @@
<tocitem target="sto3.html"> Anticipated switch to a public storage policy </tocitem>
<tocitem target="sto4.html"> Competitive storage with price-band backed by public storage </tocitem>
<tocitem target="sto5.html"> Two-country storage-trade model with supply reaction, fixed tariffs </tocitem>
<tocitem target="sto6.html"> Quarterly storage model with annual inelastic supply </tocitem>
<tocitem target="sto6SP.html"> Variant of sto6: Quarterly storage model with informational subperiods and annual inelastic supply </tocitem>
</tocitem>

</tocitem>
Expand Down
Loading

0 comments on commit acf022e

Please sign in to comment.