Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@
cost_type = 'ext_cost';

%% create model entries
model = linear_mass_spring_model;
model = linear_mass_spring_model();

% dims
T = 10.0; % horizon length time
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
sim_method = 'erk'; % erk, irk, irk_gnsf

%% model dynamics
model = pendulum_on_cart_model;
model = pendulum_on_cart_model();
nx = model.nx;
nu = model.nu;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@
sim_method_num_stages(3:end) = 2;

%% model dynamics
model = pendulum_on_cart_model;
model = pendulum_on_cart_model();

%% model to create the solver
ocp_model = acados_ocp_model();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@
plant_sim_method_num_steps = 3;

%% model dynamics
model = pendulum_on_cart_model;
model = pendulum_on_cart_model();
nx = model.nx;
nu = model.nu;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
sim_method = 'erk'; % erk, irk, irk_gnsf

%% model dynamics
model = pendulum_on_cart_model;
model = pendulum_on_cart_model();
nx = model.nx;
nu = model.nu;
ny = size(model.cost_expr_y, 1); % used in simulink example
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
u0 = 0; % control input

%% define model dynamics
model = pendulum_on_cart_model;
model = pendulum_on_cart_model();

nx = model.nx;
nu = model.nu;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@

%% setup problem
% linear mass-spring system
model = linear_mass_spring_model;
model = linear_mass_spring_model();
% dims
T = 10.0; % horizon length time
nx = model.nx; % number of states
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@


%% create model entries
model = linear_mass_spring_model;
model = linear_mass_spring_model();



Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@


%% model
model = linear_mass_spring_model;
model = linear_mass_spring_model();

nx = model.nx;
nu = model.nu;
Expand Down
2 changes: 1 addition & 1 deletion examples/acados_matlab_octave/lorentz/example_mhe.m
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
clear all

%% model
model = lorentz_model;
model = lorentz_model();

nx = model.nx;
nu = model.nu;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@
cost_type = 'linear_ls'; % linear_ls, ext_cost

%% model
model = pendulum_dae_model;
model = pendulum_dae_model();
% sym_x = [xpos, ypos, alpha, vx, vy, valpha]
length_pendulum = 5;
xsteady = [ 0; -length_pendulum; 0; 0; 0; 0];
Expand Down
2 changes: 1 addition & 1 deletion examples/acados_matlab_octave/pendulum_dae/example_sim.m
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@
% x0 = [ 0; -length_pendulum; 0; 0; 0; 0];

%% model
model = pendulum_dae_model;
model = pendulum_dae_model();
disp('state')
disp(model.sym_x)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@


%% create model entries
model = pendulum_on_cart_model;
model = pendulum_on_cart_model();

h = 0.01;
T = ocp_N*h; % horizon length time
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@


%% create model entries
model = pendulum_on_cart_model;
model = pendulum_on_cart_model();

% dims
T = N*h; % horizon length time
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
sim_method = 'erk'; % erk, irk, irk_gnsf

%% model dynamics
model = pendulum_on_cart_model;
model = pendulum_on_cart_model();
nx = model.nx;
nu = model.nu;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@


%% create model entries
model = pendulum_on_cart_model;
model = pendulum_on_cart_model();

% dims
nx = model.nx;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@


%% create model entries
model = pendulum_on_cart_model;
model = pendulum_on_cart_model();

% dims
T = N*h; % horizon length time
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
u = 0;

%% model
model = pendulum_on_cart_model;
model = pendulum_on_cart_model();

nx = model.nx;
nu = model.nu;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@
plant_sim_method_num_steps = 3;

%% model dynamics
model = pendulum_on_cart_model;
model = pendulum_on_cart_model();
nx = model.nx;
nu = model.nu;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@
%% create model entries
switch i
case 1
model = pendulum_on_cart_model;
model = pendulum_on_cart_model();
theta = model.sym_x(2);
omega = model.sym_x(4);
model.sym_z = [];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@
cost_variant = 1; % 0: ls on u,x; 1: ls on u,z; (not implemented yet: 2: nls on u,z)

% get model
model = simple_dae_model;
model = simple_dae_model();

nx = length(model.sym_x);
nu = length(model.sym_u);
Expand Down
2 changes: 1 addition & 1 deletion examples/acados_matlab_octave/test/test_checks.m
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
Ts = 0.1;

%% model
model = linear_mass_spring_model;
model = linear_mass_spring_model();

model_name = ['lin_mass_' method];
nx = model.nx;
Expand Down
2 changes: 1 addition & 1 deletion examples/acados_matlab_octave/test/test_mhe_lorentz.m
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
addpath('../lorentz')

%% model
model = lorentz_model;
model = lorentz_model();

nx = model.nx;
nu = model.nu;
Expand Down
2 changes: 1 addition & 1 deletion examples/acados_matlab_octave/test/test_ocp_OSQP.m
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
sim_method = 'erk'; % erk, irk, irk_gnsf

%% model dynamics
model = pendulum_on_cart_model;
model = pendulum_on_cart_model();
nx = model.nx;
nu = model.nu;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@


%% create model entries
model = linear_mass_spring_model;
model = linear_mass_spring_model();


% dims
Expand Down
2 changes: 1 addition & 1 deletion examples/acados_matlab_octave/test/test_ocp_pendulum_dae.m
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@
cost_type = 'linear_ls'; % linear_ls, ext_cost

%% model
model = pendulum_dae_model;
model = pendulum_dae_model();
% sym_x = [xpos, ypos, alpha, vx, vy, valpha]
length_pendulum = 5;
xsteady = [ 0; -length_pendulum; 0; 0; 0; 0];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@
model_name = ['pendulum_' num2str(itest)];

%% create model entries
model = pendulum_on_cart_model;
model = pendulum_on_cart_model();

% dims
T = N*h; % horizon length time
Expand Down
2 changes: 1 addition & 1 deletion examples/acados_matlab_octave/test/test_ocp_qpdunes.m
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
sim_method = 'erk'; % erk, irk, irk_gnsf

%% model dynamics
model = pendulum_on_cart_model;
model = pendulum_on_cart_model();
nx = model.nx;
nu = model.nu;

Expand Down
2 changes: 1 addition & 1 deletion examples/acados_matlab_octave/test/test_ocp_simple_dae.m
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@
cost_variant = 1; % 0: ls on u,x; 1: ls on u,z; (not implemented yet: 2: nls on u,z)

% get model
model = simple_dae_model;
model = simple_dae_model();

nx = length(model.sym_x);
nu = length(model.sym_u);
Expand Down
2 changes: 1 addition & 1 deletion examples/acados_matlab_octave/test/test_sens_adj.m
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
FD_epsilon = 1e-6;

%% model
model = pendulum_on_cart_model;
model = pendulum_on_cart_model();

model_name = ['pendulum_' method];
nx = model.nx;
Expand Down
2 changes: 1 addition & 1 deletion examples/acados_matlab_octave/test/test_sens_forw.m
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
FD_epsilon = 1e-6;

%% model
model = linear_mass_spring_model;
model = linear_mass_spring_model();

model_name = ['lin_mass_' method];
nx = model.nx;
Expand Down
2 changes: 1 addition & 1 deletion examples/acados_matlab_octave/test/test_sens_hess.m
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
FD_epsilon = 1e-6;

%% model
model = pendulum_on_cart_model;
model = pendulum_on_cart_model();

model_name = ['pendulum_' method];
nx = model.nx;
Expand Down
2 changes: 1 addition & 1 deletion examples/acados_matlab_octave/test/test_sim_dae.m
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@
u = 3.5;

%% model
model = pendulum_dae_model;
model = pendulum_dae_model();
% disp('state')
% disp(model.sym_x)

Expand Down