Skip to content

compiling error at sho_fit_multiple_parallel_start #1

@Ziaeemehr

Description

@Ziaeemehr

I got the following error compiling sho_fit_multiple_parallel_start.stan

--- Translating Stan model to C++ code ---
bin/stanc  --o=/home/ziaee/git/workshops/stan/ODE/01_example_sho/stan-ode-workshop/sho_fit_multiple_parallel_start.hpp /home/ziaee/git/workshops/stan/ODE/01_example_sho/stan-ode-workshop/sho_fit_multiple_parallel_start.stan
Semantic error in '/home/ziaee/git/workshops/stan/ODE/01_example_sho/stan-ode-workshop/sho_fit_multiple_parallel_start.stan', line 11, column 19 to column 100:
   -------------------------------------------------
     9:                          real[] x_r, int[] x_i) {
    10:      int T = x_i[1];
    11:      real y[T, 2] = integrate_ode_bdf(sho, x_r[1:2], 0.0, x_r[3:(T+2)], to_array_1d(theta), x_r, x_i);
                            ^
    12:      return append_row(to_vector(y[, 1]), to_vector(y[, 2]));
    13:    }
   -------------------------------------------------

Ill-typed arguments supplied to function 'integrate_ode_bdf':
(<F1>, array[] real, real, array[] real, array[] real, array[] real,
 array[] int)
where F1 = (real, array[] real, array[] real, array[] real, array[] int) => array[] real
Available signatures:
(<F2>, array[] real, real, array[] real, array[] real, data array[] real,
 data array[] int) => array[,] real
where F2 = (real, array[] real, array[] real, data array[] real,
            data array[] int) => array[] real
  The 6th argument must be data-only. (Local variables are assumed to depend
  on parameters; same goes for function inputs unless they are marked with
  the keyword 'data'.)
(<F2>, array[] real, real, array[] real, array[] real, data array[] real,
 data array[] int, data real, data real, data real) => array[,] real
  Expected 10 arguments but found 7 arguments.

Thank you for any guide in advance.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions