create options

time-shift
Houtan Bastani 2015-07-29 11:07:36 +02:00
parent 2b7fc247f7
commit 0126dec837
2 changed files with 36 additions and 2 deletions

33
julia/DynareOptions.jl Normal file
View File

@ -0,0 +1,33 @@
module DynareOptions
##
# Copyright (C) 2015 Dynare Team
#
# This file is part of Dynare.
#
# Dynare is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# Dynare is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with Dynare. If not, see <http://www.gnu.org/licenses/>.
##
export dynare_options
type Options
dynare_version::ASCIIString
end
function dynare_options()
return Options("" # dynare_version
)
end
end

View File

@ -1082,10 +1082,13 @@ ModFile::writeExternalFilesJulia(const string &basename, FileOutputType output)
<< " # from " << basename << ".mod" << endl
<< "##" << endl
<< "using DynareModel" << endl
<< "using DynareOptions" << endl
<< "using Utils" << endl
<< "using " << basename << "Static" << endl
<< "using " << basename << "Dynamic" << endl << endl
<< "export model__" << endl << endl
<< "options = dynare_options()" << endl
<< "options.dynare_version = \"" << PACKAGE_VERSION << "\"" << endl << endl
<< "model__ = model()" << endl
<< "model__.fname = \"" << basename << "\"" << endl
<< "model__.dynare_version = \"" << PACKAGE_VERSION << "\"" << endl
@ -1098,8 +1101,6 @@ ModFile::writeExternalFilesJulia(const string &basename, FileOutputType output)
<< "model__.eq_nbr = " << dynamic_model.equation_number() << endl
<< "model__.ramsey_eq_nbr = " << ramsey_eqn_nbr << endl;
if (mod_file_struct.calibrated_measurement_errors)
jlOutputFile << "model__.h = zeros(Float64,"
<< symbol_table.observedVariablesNbr() << ", "