37 void reset()
override;
const std::string & name() const override
Human-readable name/description.
const std::string & routing_tag() const
Get the routing tag used to match income/expense events.
void emit(SimTime time, Args &&... args)
const Schedule & schedule() const override
Get the model's execution schedule.
Event emitted when an expense occurs.
Event emitted when income is received.
Savings account - earns APY interest, compounded monthly.
~SavingsAccount() override=default
void reset() override
Reset model to initial state (for replay)
void initialize(EventBus &bus) override
void on_income(const IncomeEvent &event) override
Called when an income event is routed to this account.
void accrue_interest_up_to(SimTime time)
SimTime last_interest_time_
void on_expense(const ExpenseEvent &event) override
Called when an expense event is routed to this account.
double apy() const
Get the APY (annual percentage yield)
void update(SimTime time) override
double SimTime
Represents a point in simulation time (continuous, in days)
Schedule make_savings_schedule()
Helper to create default schedule for savings accounts (monthly interest)