Modularization using the Macroprocessor

This forum is closed. You can read the posts but cannot write. We have migrated the forum to a new location where you will have to reset your password.
Forum rules
This forum is closed. You can read the posts but cannot write. We have migrated the forum to a new location (https://forum.dynare.org) where you will have to reset your password.

Modularization using the Macroprocessor

Postby mafled » Tue Apr 28, 2015 2:58 pm

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.
mafled
 
Posts: 1
Joined: Tue Apr 28, 2015 12:49 pm

Re: Modularization using the Macroprocessor

Postby jpfeifer » Fri May 01, 2015 6:27 pm

How about something like
Code: Select all
@#define country="A"
@#define filetoload=["param_file_", country, ".mod"]
@#include filetoload
------------
Johannes Pfeifer
University of Cologne
https://sites.google.com/site/pfeiferecon/
jpfeifer
 
Posts: 6940
Joined: Sun Feb 21, 2010 4:02 pm
Location: Cologne, Germany


Return to Dynare help

Who is online

Users browsing this forum: Google [Bot] and 6 guests