From 5c91071b59eac54567902ff8f679f701f309d469 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Villemot?= <sebastien@dynare.org> Date: Tue, 19 Mar 2024 14:59:31 +0100 Subject: [PATCH] Bytecode / conditional forecast: another fix test over consistency of variable flipping MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The method Evaluate::getCurrentBlockEndogenous() would always return an empty vector, because of a weirdness in FBEGINBLOCK class (after deserialization, the latter has “variables†member unset and the corresponding data is instead store in “Block_Contain_â€). On the master branch, the problem has been solved differently (the weirdness in the FBEGINBLOCK class has been removed). --- mex/sources/bytecode/Evaluate.hh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/mex/sources/bytecode/Evaluate.hh b/mex/sources/bytecode/Evaluate.hh index 282b357bda..b2e694099b 100644 --- a/mex/sources/bytecode/Evaluate.hh +++ b/mex/sources/bytecode/Evaluate.hh @@ -145,7 +145,10 @@ public: [[nodiscard]] auto getCurrentBlockEndogenous() const { - return currentBlockTag()->get_endogenous(); + vector<int> endos; + for (auto& [eq, var, deriv] : getCurrentBlockEquationsAndVariables()) + endos.push_back(var); + return endos; } [[nodiscard]] auto getCurrentBlockNbColJacob() const -- GitLab