Bug fix in assert (Julia output).

See PR #1102 by spencerlyon2.

size always returns a tuple, and we were comparing to an int. Dispatch restricts these arguments to all be vectors so length works here.
issue#70
Stéphane Adjemian (Hermes) 2016-05-19 21:43:36 +02:00
parent 432ce1d95f
commit 0751b50a86
1 changed files with 3 additions and 3 deletions

View File

@ -2409,9 +2409,9 @@ DynamicModel::writeDynamicModel(ostream &DynamicOutput, bool use_dll, bool julia
<< " steady_state::Vector{Float64}, it_::Int, "
<< "residual::Vector{Float64})" << endl
<< "#=" << endl << comments.str() << "=#" << endl
<< " @assert size(y) == " << dynJacobianColsNbr << endl
<< " @assert size(params) == " << symbol_table.param_nbr() << endl
<< " @assert size(residual) == " << nrows << endl
<< " @assert length(y) == " << dynJacobianColsNbr << endl
<< " @assert length(params) == " << symbol_table.param_nbr() << endl
<< " @assert length(residual) == " << nrows << endl
<< " #" << endl
<< " # Model equations" << endl
<< " #" << endl