add linear option to options

time-shift
Houtan Bastani 2015-07-29 13:31:42 +02:00
parent 8a4357640e
commit 45d1f7c5b6
2 changed files with 13 additions and 3 deletions

View File

@ -23,10 +23,12 @@ export dynare_options
type Options
dynare_version::ASCIIString
linear::Bool
end
function dynare_options()
return Options("" # dynare_version
return Options("", # dynare_version
false # linear
)
end

View File

@ -1086,9 +1086,17 @@ ModFile::writeExternalFilesJulia(const string &basename, FileOutputType output)
<< "using Utils" << endl
<< "using " << basename << "Static" << endl
<< "using " << basename << "Dynamic" << endl << endl
<< "export model" << endl << endl
<< "export model" << endl;
// Write Options
jlOutputFile << endl
<< "options = dynare_options()" << endl
<< "options.dynare_version = \"" << PACKAGE_VERSION << "\"" << endl << endl
<< "options.dynare_version = \"" << PACKAGE_VERSION << "\"" << endl;
if (linear == 1)
jlOutputFile << "options.linear = true" << endl;
// Write Model
jlOutputFile << endl
<< "model = dynare_model()" << endl
<< "model.fname = \"" << basename << "\"" << endl
<< "model.dynare_version = \"" << PACKAGE_VERSION << "\"" << endl