One final question. Should syntax such as this be allowed:
exclusion lag 0; equation 1, pie, r; exclusion lag 0; equation 2, y;
(i.e. lags are repeated but equation numbers are different) or should we declare a user error. I am already declaring an error when something such as this is encountered:
exclusion lag 0; equation 1, pie, r; exclusion lag 0; equation 1, pie, r;
(i.e. lags and equation numbers overlap)
2009/12/4 Sébastien Villemot sebastien.villemot@ens.fr
Le vendredi 04 décembre 2009 à 09:09 -0500, houtan a écrit :
The implementation I had chosen for SvarIdentificationStatement (modified by the conversation regarding the maximum lag) is
class SvarIdentificationStatement : public Statement { public: typedef map<pair<int, int>, vector<string> > svar_identification_exclusion_type; private: const svar_identification_exclusion_type exclusion; const bool upper_cholesky_present; const bool lower_cholesky_present; const SymbolTable &symbol_table; int get_max_lag() const; public: SvarIdentificationStatement(const svar_identification_exclusion_type &exclusion_arg, const bool &upper_cholesky_present_arg, const bool &lower_cholesky_present_arg, const SymbolTable &symbol_table_arg); virtual void writeOutput(ostream &output, const string &basename) const; };
This looks good. When you're done, don't forget to add comments using Doxygen style (with the exclamation mark).
The map above stores pair<lag number, equation number>, vector of restrictions>
The vector<string> type is similar to the SymbolList type. I am not using SymbolList because this provides direct access to the vector elements for writing.
I am sorry, but I do not quite see the purpose of fillEvalContext from InitParamStatement or how it would be useful in this case. Why can't I simply take the information in and then write the output as described on the Wiki?
You don't need to implement that method. It is used for assigning numeric values to variables, so it has no sense here.
Best
-- Sébastien Villemot
Dev mailing list Dev@dynare.org http://www.dynare.org/cgi-bin/mailman/listinfo/dev