getModel method provides access to the underlying model in the prognoser. This access is required to be able to calculate output parameters from state (which is returned in prediction).
auto stateSamples = eod_event.getSystemState()[0]; // Get current system state
std::vector<double> state;
for (auto sample : stateSamples) {
state.push_back(sample[0]); // Take first sample (could be replaced with logic to get sample corresponding to median SOC
}
auto& model = ((ModelBasedPrognoser *) prognoser.get())->getModel();
auto z = model.outputEqn(now_s.count(), (PrognosticsModel::state_type) state);
std::cout << "\ttemp: " << z[model.indices.output.Tm] << "°C" << std::endl;
getModel method provides access to the underlying model in the prognoser. This access is required to be able to calculate output parameters from state (which is returned in prediction).