HARK
HARK copied to clipboard
Use Parameters class in solver
I think that one of the main advantages of the Parameters
class that @alanlujan91 has created is that, with its __get_item__
method, we can do away with a lot of ugly and repetitive code in HARK that determines what arguments to give to a solver in a given period given what is time-varying and what is not.
In an ongoing project, I have created an agent class that stores its parameters in a Parameters
object. That parameter is then used by the solver to feed time-specific parameters to the solve_one_period
method.
Although I am not yet sharing the agent prototype, I wanted to share and get comments on the solver. Currently what I am doing is forking the solve_one_cycle
method. If the agent has a Parameters
object, it takes advantage of it. If not, it uses the old and unchanged method.
- [ ] Tests for new functionality/models or Tests to reproduce the bug-fix in code.
- [ ] Updated documentation of features that add new functionality.
- [ ] Update CHANGELOG.md with major/minor changes.