Page 1 of 1

Modularization using the Macroprocessor

PostPosted: Tue Apr 28, 2015 2:58 pm
by mafled
Hi,

I've got a multi-country model for which each country has its own .mod file with country-specific parameters. I want to ask the macro-processor to read file i when solving i's countrys model and file j when it's j's turn. How can I use @#include to make dynare read the appropriate file for each case?

In other words, I would need something like @#include "param_file_@#{co}.mod"

Thank you.

Re: Modularization using the Macroprocessor

PostPosted: Fri May 01, 2015 6:27 pm
by jpfeifer
How about something like
Code: Select all
@#define country="A"
@#define filetoload=["param_file_", country, ".mod"]
@#include filetoload