EconForge / dolo.py

Economic modelling in python
BSD 2-Clause "Simplified" License
98 stars 72 forks source link

Make `grid` a product of two grids #200

Closed albop closed 4 years ago

albop commented 4 years ago

This is a first step towards #188 . The idea is simply to make model.grid a cartesian product of two grids. A product grid could attach names to each factor as in grid = GridProduct( {'endo': endo_grid, 'exo': exo_grid} ), then one could be able to accessgrid.endoandgrid.exoinstead of the currentmodel.endo_gridandmodel.exo_grid. This would clarify that a decision rule is defined on one single grid. An unresolved issue is how to pass discretization information to solution routines. I have been thinking that a natural to do so would be to domodel.domain.discretize(n=[10,10])instead of the currentmodel.get_endo_grid(n=[10,10])`.

albop commented 4 years ago

Done.