Permalink
Browse files

used acados_format, fixed cmake

  • Loading branch information...
FreyJo committed Nov 9, 2018
1 parent 8835b6f commit 013dc6cfbb490b409762ed8c85b633313c8b4b2f
@@ -474,55 +474,55 @@ static void d_cvt_dvec_args_to_casadi(struct blasfeo_dvec_args *in, double *out,
int external_function_casadi_struct_size()
{
return sizeof(external_function_casadi);
return sizeof(external_function_casadi);
}
void external_function_casadi_set_fun(external_function_casadi *fun, void *value)
{
fun->casadi_fun = value;
return;
fun->casadi_fun = value;
return;
}
void external_function_casadi_set_work(external_function_casadi *fun, void *value)
{
fun->casadi_work = value;
return;
fun->casadi_work = value;
return;
}
void external_function_casadi_set_sparsity_in(external_function_casadi *fun, void *value)
{
fun->casadi_sparsity_in = value;
return;
fun->casadi_sparsity_in = value;
return;
}
void external_function_casadi_set_sparsity_out(external_function_casadi *fun, void *value)
{
fun->casadi_sparsity_out = value;
return;
fun->casadi_sparsity_out = value;
return;
}
void external_function_casadi_set_n_in(external_function_casadi *fun, void *value)
{
fun->casadi_n_in = value;
return;
fun->casadi_n_in = value;
return;
}
void external_function_casadi_set_n_out(external_function_casadi *fun, void *value)
{
fun->casadi_n_out = value;
return;
fun->casadi_n_out = value;
return;
}
0 acados_format.sh 100644 → 100755
No changes.
@@ -49,22 +49,22 @@ file(GLOB CHAIN_MODEL_SRC
chain_model/ls_costN_nm4.c
chain_model/casadi_erk4_chain_nm4.c
# 5 masses
# chain_model/vde_chain_nm5.c
# chain_model/jac_chain_nm5.c
# chain_model/vde_adj_chain_nm5.c
# #chain_model/vde_hess_chain_nm5.c
# chain_model/ls_cost_nm5.c
# chain_model/ls_costN_nm5.c
# # chain_model/casadi_erk4_chain_nm5.c
# # NOTE: chain_model/casadi_erk4_chain_nm5.c (and 6) commented, because compilation takes quite a while
# # 6 masses
# chain_model/vde_chain_nm6.c
# chain_model/jac_chain_nm6.c
# chain_model/vde_adj_chain_nm6.c
# #chain_model/vde_hess_chain_nm6.c
# chain_model/ls_cost_nm6.c
# chain_model/ls_costN_nm6.c
# # chain_model/casadi_erk4_chain_nm6.c
chain_model/vde_chain_nm5.c
chain_model/jac_chain_nm5.c
chain_model/vde_adj_chain_nm5.c
#chain_model/vde_hess_chain_nm5.c
chain_model/ls_cost_nm5.c
chain_model/ls_costN_nm5.c
# chain_model/casadi_erk4_chain_nm5.c
# NOTE: chain_model/casadi_erk4_chain_nm5.c (and 6) commented, because compilation takes quite a while
# 6 masses
chain_model/vde_chain_nm6.c
chain_model/jac_chain_nm6.c
chain_model/vde_adj_chain_nm6.c
#chain_model/vde_hess_chain_nm6.c
chain_model/ls_cost_nm6.c
chain_model/ls_costN_nm6.c
# chain_model/casadi_erk4_chain_nm6.c
### implicit ###
# 2 masses
@@ -68,7 +68,7 @@ sim_solver_config *sim_config_create(sim_solver_plan plan)
void sim_config_free(void *config)
{
free(config);
free(config);
}
@@ -91,21 +91,21 @@ void *sim_dims_create(void *config_)
void sim_dims_free(void *dims)
{
free(dims);
free(dims);
}
void sim_dims_set_nx(sim_solver_config *config, void *dims, int nx)
{
config->set_nx(dims, nx);
config->set_nx(dims, nx);
}
void sim_dims_set_nu(sim_solver_config *config, void *dims, int nu)
{
config->set_nu(dims, nu);
config->set_nu(dims, nu);
}
@@ -127,7 +127,7 @@ sim_in *sim_in_create(sim_solver_config *config, void *dims)
void sim_in_free(void *in)
{
free(in);
free(in);
}
@@ -189,69 +189,69 @@ int sim_set_model_internal(sim_solver_config *config, void *model, const char *f
void sim_in_set_T(sim_solver_config *config, double T, sim_in *in)
{
in->T = T;
return;
in->T = T;
return;
}
void sim_in_set_x(sim_solver_config *config, void *dims, double *x, sim_in *in)
{
int nx;
config->get_nx(dims, &nx);
int ii;
for (ii=0; ii<nx; ii++)
in->x[ii] = x[ii];
return;
int nx;
config->get_nx(dims, &nx);
int ii;
for (ii=0; ii<nx; ii++)
in->x[ii] = x[ii];
return;
}
void sim_in_set_xdot(sim_solver_config *config, void *dims, double *xdot, sim_in *in)
{
int nx;
config->get_nx(dims, &nx);
int ii;
for (ii=0; ii<nx; ii++)
in->xdot[ii] = xdot[ii];
return;
int nx;
config->get_nx(dims, &nx);
int ii;
for (ii=0; ii<nx; ii++)
in->xdot[ii] = xdot[ii];
return;
}
void sim_in_set_u(sim_solver_config *config, void *dims, double *u, sim_in *in)
{
int nu;
config->get_nu(dims, &nu);
int ii;
for (ii=0; ii<nu; ii++)
in->u[ii] = u[ii];
return;
int nu;
config->get_nu(dims, &nu);
int ii;
for (ii=0; ii<nu; ii++)
in->u[ii] = u[ii];
return;
}
void sim_in_set_Sx(sim_solver_config *config, void *dims, double *Sx, sim_in *in)
{
int nx;
config->get_nx(dims, &nx);
int ii;
for (ii=0; ii<nx*nx; ii++)
in->S_forw[ii] = Sx[ii];
return;
int nx;
config->get_nx(dims, &nx);
int ii;
for (ii=0; ii<nx*nx; ii++)
in->S_forw[ii] = Sx[ii];
return;
}
void sim_in_set_Su(sim_solver_config *config, void *dims, double *Su, sim_in *in)
{
int nx, nu;
config->get_nx(dims, &nx);
config->get_nu(dims, &nu);
int ii;
for (ii=0; ii<nx*nu; ii++)
in->S_forw[nx*nx+ii] = Su[ii];
return;
int nx, nu;
config->get_nx(dims, &nx);
config->get_nu(dims, &nu);
int ii;
for (ii=0; ii<nx*nu; ii++)
in->S_forw[nx*nx+ii] = Su[ii];
return;
}
@@ -271,44 +271,44 @@ sim_out *sim_out_create(sim_solver_config *config, void *dims)
void sim_out_free(void *out)
{
free(out);
free(out);
}
void sim_out_get_xn(sim_solver_config *config, void *dims, sim_out *out, double *xn)
{
int nx;
config->get_nx(dims, &nx);
int ii;
for (ii=0; ii<nx; ii++)
xn[ii] = out->xn[ii];
return;
int nx;
config->get_nx(dims, &nx);
int ii;
for (ii=0; ii<nx; ii++)
xn[ii] = out->xn[ii];
return;
}
void sim_out_get_Sxn(sim_solver_config *config, void *dims, sim_out *out, double *Sxn)
{
int nx;
config->get_nx(dims, &nx);
int ii;
for (ii=0; ii<nx*nx; ii++)
Sxn[ii] = out->S_forw[ii];
return;
int nx;
config->get_nx(dims, &nx);
int ii;
for (ii=0; ii<nx*nx; ii++)
Sxn[ii] = out->S_forw[ii];
return;
}
void sim_out_get_Sun(sim_solver_config *config, void *dims, sim_out *out, double *Sun)
{
int nx, nu;
config->get_nx(dims, &nx);
config->get_nu(dims, &nu);
int ii;
for (ii=0; ii<nx*nu; ii++)
Sun[ii] = out->S_forw[nx*nx+ii];
return;
int nx, nu;
config->get_nx(dims, &nx);
config->get_nu(dims, &nu);
int ii;
for (ii=0; ii<nx*nu; ii++)
Sun[ii] = out->S_forw[nx*nx+ii];
return;
}
@@ -330,16 +330,16 @@ void *sim_opts_create(sim_solver_config *config, void *dims)
void sim_opts_free(void *opts)
{
free(opts);
free(opts);
}
void sim_opts_set_sens_forw(sim_rk_opts *opts, bool value)
{
opts->sens_forw = value;
return;
opts->sens_forw = value;
return;
}
@@ -400,7 +400,7 @@ sim_solver *sim_create(sim_solver_config *config, void *dims, void *opts_)
void sim_free(void *solver)
{
free(solver);
free(solver);
}
@@ -409,5 +409,5 @@ int sim_solve(sim_solver *solver, sim_in *in, sim_out *out)
{
int flag = solver->config->evaluate(solver->config, in, out, solver->opts, solver->mem,
solver->work);
return flag;
return flag;
}

0 comments on commit 013dc6c

Please sign in to comment.