|
FinanceSim 0.1.0
Financial Simulation Library
|
Career job income model with semi-monthly salary payments. More...
#include <career_job.hpp>
Public Member Functions | |
| CareerJob (std::string id, std::string name, double annual_salary, SimTime start_day=0.0) | |
| Construct a CareerJob model. | |
| double | annual_salary () const |
| Get the annual salary. | |
| double | payment_amount () const |
| Get the per-paycheck amount (annual / 24) | |
| void | update (SimTime time) override |
| void | reset () override |
| Reset model to initial state (for replay) | |
Public Member Functions inherited from financesim::IncomeBase | |
| IncomeBase (std::string id, std::string name, Schedule schedule) | |
| virtual | ~IncomeBase ()=default |
| const std::string & | id () const override |
| Unique identifier for this model instance. | |
| const std::string & | name () const override |
| Human-readable name/description. | |
| const Schedule & | schedule () const override |
| Get the model's execution schedule. | |
| void | initialize (EventBus &bus) override |
| void | update (SimTime time) override |
| void | finalize () override |
| void | reset () override |
| Reset model to initial state (for replay) | |
Public Member Functions inherited from financesim::Model | |
| virtual | ~Model ()=default |
Private Attributes | |
| double | annual_salary_ |
| double | payment_amount_ |
Additional Inherited Members | |
Protected Member Functions inherited from financesim::IncomeBase | |
| EventBus & | bus () |
| template<typename EventType , typename... Args> | |
| void | emit (SimTime time, Args &&... args) |
Protected Member Functions inherited from financesim::Model | |
| Model ()=default | |
Career job income model with semi-monthly salary payments.
Represents a salaried career position that pays twice per month. The payment amount is calculated as annual_salary / 24.
Definition at line 11 of file career_job.hpp.
| financesim::CareerJob::CareerJob | ( | std::string | id, |
| std::string | name, | ||
| double | annual_salary, | ||
| SimTime | start_day = 0.0 |
||
| ) |
Construct a CareerJob model.
| id | Unique identifier for this model instance |
| name | Human-readable name (e.g., "Software Engineer at Acme Corp") |
| annual_salary | Gross annual salary in dollars |
| start_day | Day (in SimTime) when employment begins |
Definition at line 11 of file career_job.cpp.
|
inline |
Get the annual salary.
Definition at line 21 of file career_job.hpp.
References annual_salary_.
Referenced by PYBIND11_MODULE().
|
inline |
Get the per-paycheck amount (annual / 24)
Definition at line 24 of file career_job.hpp.
References payment_amount_.
Referenced by PYBIND11_MODULE().
|
overridevirtual |
Reset model to initial state (for replay)
Implements financesim::Model.
Definition at line 23 of file career_job.cpp.
References financesim::IncomeBase::reset().
Called at each scheduled execution time Must be deterministic given the same inputs and time
Implements financesim::Model.
Definition at line 19 of file career_job.cpp.
References financesim::IncomeBase::emit(), and payment_amount_.
|
private |
Definition at line 30 of file career_job.hpp.
Referenced by annual_salary().
|
private |
Definition at line 31 of file career_job.hpp.
Referenced by payment_amount(), and update().