23 void load_library(
const std::string& interface_lib);
24 void initialize(std::string file_name);
25 void increment_time(
const double time, std::vector<double>& solution);
26 void run_simulation(
const double time, std::vector<double>& output_times,
27 std::vector<double>& output_solutions,
int& error_code);
28 void update_block_params(std::string block_name, std::vector<double>& new_params);
29 void read_block_params(std::string block_name, std::vector<double>& block_params);
30 void get_block_node_IDs(std::string block_name, std::vector<int>& IDs);
31 void update_state(std::vector<double> state_y, std::vector<double> state_ydot);
32 void return_y(std::vector<double>& y);
33 void return_ydot(std::vector<double>& ydot);
34 void set_external_step_size(
double step_size);
37 std::string lpn_initialize_name_;
38 void (*lpn_initialize_)(std::string,
int&,
int&,
int&,
int&, std::vector<std::string>&,
39 std::vector<std::string>&);
41 std::string lpn_increment_time_name_;
42 void (*lpn_increment_time_)(
const int,
const double, std::vector<double>& solution);
44 std::string lpn_run_simulation_name_;
45 void (*lpn_run_simulation_)(
const int,
const double, std::vector<double>& output_times,
46 std::vector<double>& output_solutions,
int& error_code);
48 std::string lpn_update_block_params_name_;
49 void (*lpn_update_block_params_)(
const int, std::string, std::vector<double>& new_params);
51 std::string lpn_read_block_params_name_;
52 void (*lpn_read_block_params_)(
const int, std::string, std::vector<double>& block_params);
54 std::string lpn_get_block_node_IDs_name_;
55 void (*lpn_get_block_node_IDs_)(
const int, std::string, std::vector<int>& block_params);
57 std::string lpn_update_state_name_;
58 void (*lpn_update_state_)(
const int, std::vector<double>, std::vector<double>);
60 std::string lpn_return_y_name_;
61 void (*lpn_return_y_)(
const int, std::vector<double>&);
63 std::string lpn_return_ydot_name_;
64 void (*lpn_return_ydot_)(
const int, std::vector<double>&);
66 std::string lpn_set_external_step_size_name_;
67 void (*lpn_set_external_step_size_)(
const int, double);
69 void* library_handle_ =
nullptr;
73 int pts_per_cycle_ = 0;
74 int num_output_steps_ = 0;
75 std::vector<std::string> block_names_;
76 std::vector<std::string> variable_names_;