From 52f205eb22fd6a0ce9a6e1ae8d4b116f82e7d060 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Adjemian=20=28Charybdis=29?= Date: Thu, 7 Jun 2012 11:07:22 +0200 Subject: [PATCH] Fixed bug in conditional forecasts (wrong indexing of the controlled variables). --- Shocks.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Shocks.cc b/Shocks.cc index a909cb15..432f7dcd 100644 --- a/Shocks.cc +++ b/Shocks.cc @@ -289,9 +289,9 @@ ConditionalForecastPathsStatement::writeOutput(ostream &output, const string &ba it != paths.end(); it++) { if (it == paths.begin()) - output << "constrained_vars_ = " << it->first << ";" << endl; + output << "constrained_vars_ = " << it->first +1 << ";" << endl; else - output << "constrained_vars_ = [constrained_vars_; " << it->first << "];" << endl; + output << "constrained_vars_ = [constrained_vars_; " << it->first +1 << "];" << endl; const vector &elems = it->second; for (int i = 0; i < (int) elems.size(); i++)