Automatically detected by clang-tidy with performance-move-const-arg check.
Do not make the modification for Tokenizer::location type, since we have no
guarantee that the type will remain trivially-copyable in the future.
The implementation no longer relies on ramsey_policy.m at the MATLAB/Octave
level.
By the way, drop ModFileStructure::ramsey_model_present, which is now
redundant.
Options “order”, “partial_information” and “k_order_solver” are not accepted by
the command (this code is probably a remnant of the deprecated “ramsey_policy”
command).
It was erroneously using MATLAB costs, leading to possible
inefficiencies (though those cost tables are probably not very accurate and
should be revised).
Previously, the MinGW location was appended multiple times to the PATH
variable, which in some cases would make the variable too long and thus
dysfunctional.
The variable is now initialized once when the worker threads are created.
By the way, move the macOS+Octave environment variable initializations to the
same place, for consistency.
In particular, use a std::variant to store the values of options. This ensures
that a given option name can have only one value (previously, for a given
option name, it was possible to store several values as long as they were of
different types).
If block decomposition fails, error out if “block” option was passed, but not
otherwise.
This commit does not modify the generated files.
This is a preliminary step for dynare#1859.
In particular, use this feature in many loops which feature a special treatment
for the first iteration, using a boolean variable (replacing iterator
manipulation). By the way, also use std::exchange() to simultaneously test the
value of this variable and update it.
And, symmetrically, when the “bytecode” option is requested by the user, always
create the .m static/dynamic files.
The “bytecode” option therefore no longer modifies the preprocessor output.
The vectors were previously stored as strings internally, which would not
necessarily contain the commas which are required in JSON (but not in
MATLAB/Octave). The fix consists in internally storing those options as
std::vector.
Closes: #96
Incidentally, in the JSON output, no longer assign a value to the “periods”
field if not passed by the user (previously the value -1 was output in the JSON
file).
The existing check would incorrectly fail if ramsey_constraints appeared before
ramsey_{model,policy}.
Also, the check would not terminate the processing in case of error.
Closes: #91