12#ifndef RESPOND_MODEL_HPP_
13#define RESPOND_MODEL_HPP_
21#include <respond/history.hpp>
22#include <respond/transition.hpp>
36 virtual void SetState(
const Eigen::VectorXd &state) = 0;
72 virtual void SetHistories(
const std::map<std::string, History> &h) = 0;
106 static std::unique_ptr<Model>
107 Create(
const std::string &name,
const std::string &log_name =
"console");
117 virtual std::unique_ptr<Model>
clone()
const = 0;
Abstract base class representing a state transition model. Models manage a state vector,...
Definition: model.hpp:29
virtual Eigen::VectorXd GetState() const =0
Retrieves the current state of the model.
Model & operator=(const Model &)=delete
Deleted copy assignment operator (models are non-copyable by public API).
virtual std::unique_ptr< Model > clone() const =0
Creates a deep copy of this model.
virtual void SetState(const Eigen::VectorXd &state)=0
Sets the current state of the model.
virtual void RunTransitions()=0
Executes all registered transitions on the current state. Transitions are applied in the order they w...
virtual void ClearTransitions()=0
Clears all registered transitions. Deletes all stored Transition unique_ptrs.
virtual std::vector< std::string > GetTransitionNames() const =0
Retrieves the names of all registered transitions.
virtual std::map< std::string, History > GetHistories() const =0
Retrieves the history records for all state variables.
virtual std::string GetLogName() const =0
Retrieves the logger name used by this model.
virtual int GetHistoryCaptureInterval() const =0
Retrieves the global history capture interval.
virtual void SetFinalTimestep(int final_timestep)=0
Sets the final timestep that must always be recorded.
virtual void AddTransition(const std::unique_ptr< Transition > &t)=0
Adds a transition to the model.
virtual std::string GetModelName() const =0
Retrieves the name identifier for this model.
virtual void SetHistories(const std::map< std::string, History > &h)=0
Sets the history records for the model.
Model(const Model &)=delete
Deleted copy constructor (models are non-copyable by public API).
virtual int GetFinalTimestep() const =0
Retrieves the final timestep forced into history output.
virtual ~Model()=default
Virtual destructor for proper polymorphic cleanup.
static std::unique_ptr< Model > Create(const std::string &name, const std::string &log_name="console")
Factory method to create a Model instance.
Model()=default
Protected default constructor for subclass initialization. Not intended for direct public use.
virtual void ClearHistories()=0
Clears all history records and resets history tracking state.
virtual void CreateDefaultHistories()=0
Creates default history tracking for the model. This method initializes standard history records base...
virtual void SetHistoryCaptureInterval(int interval)=0
Sets the global history capture interval for this model.