Skip to content

Be able to restrict reconstruction demand to affected regions #67

@spjuhel

Description

@spjuhel

Is your feature request related to a problem? Please describe.
Reconstruction demand is directed toward all regions by default. It would be interesting to be able to restrict it to the affected region.
It would perhaps make more sense to distribute this demand in the model module rather than the event actually

Describe the solution you'd like
Handle the distribution of reconstruction demand in the model ? Or use a specific function ?

Describe alternatives you've considered
Implement new mechanism in the event module to distribute only to the affected region.
Modifying these lines :

BoARIO/boario/event.py

Lines 1036 to 1049 in ddf764d

industrial_rebuilding_demand = np.zeros(shape=self.z_shape)
tmp = np.zeros(self.z_shape, dtype="float")
mask = np.ix_(
np.union1d(
self._rebuilding_industries_RoW_idx, self._rebuilding_industries_idx
),
self._aff_industries_idx,
)
industrial_rebuilding_demand = np.outer(
self.rebuilding_sectors_shares,
self.regional_sectoral_productive_capital_destroyed,
)
industrial_rebuilding_demand = industrial_rebuilding_demand * rebuilding_factor
tmp[mask] = self.Z_distrib[mask] * industrial_rebuilding_demand[mask]

with something inspired by:

industrial_rebuilding_demand = np.zeros(shape=ev.z_shape)
mask = np.ix_(
            np.union1d(
                ev._rebuilding_industries_RoW_idx, ev._rebuilding_industries_idx
            ),
            ev._aff_industries_idx,
        )
mask = np.ix_(
          ev._rebuilding_industries_idx, ev._aff_industries_idx,
        )
tmp = np.zeros(ev.z_shape, dtype="float")

ev._rebuilding_sectors_shares[
                ev._rebuilding_industries_RoW_idx
            ] = 0

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions