EventKapitalRebuild#

class EventKapitalRebuild(*, impact, households_impact=None, name=None, occurrence=1, duration=1, event_monetary_factor=None, rebuild_tau, rebuilding_sectors, rebuilding_factor=1.0)[source]#

Bases: EventKapitalDestroyed

EventKapitalRebuild holds a EventKapitalDestroyed event where the destroyed capital requires to be rebuilt, and creates a reconstruction demand.

This subclass requires and enables new arguments to pass to the constructor:

  • A characteristic time for reconstruction (tau_rebuild)

  • A set of sectors responsible for the reconstruction (rebuilding_sectors)

  • A rebuilding_factor in order to modulate the reconstruction demand. By default, this factor is 1, meaning that the entire impact value is translated as an additional demand.

Note

The tau_rebuild of an event takes precedence over the one defined for a model.

See also

Tutorial How to define Events

Methods

__init__(*, impact[, households_impact, ...])

distribute_impact_industries(impact, ...[, ...])

from_scalar_regions_sectors(impact, *, ...)

Creates an Event from a scalar, a list of regions and a list of sectors affected.

Attributes

aff_final_demands

The array of regions affected by the event

aff_industries

The industries affected by the event.

aff_regions

The array of regions affected by the event

aff_sectors

The array of affected sectors by the event

duration

The duration of the event.

impact

A pandas Series with all possible industries as index, holding the impact vector of the event.

impact_households

A pandas Series with all possible (regions, final_demand_cat) as index, holding the households impacts vector of the event.

impact_industries_distrib

The series specifying how damages are distributed among affected industries (regions,sectors)

impact_regional_distrib

The series specifying how damages are distributed among affected regions

occurrence

The temporal unit of occurrence of the event.

rebuild_tau

The characteristic time for rebuilding.

rebuilding_sectors

The (optional) array of rebuilding sectors

event_monetary_factor

The monetary factor for the impact of the event (e.g. 10**6, 10**3, ...).

name

An identifying name for the event (for convenience mostly)

event_dict

Store relevant information about the event

property aff_final_demands#

The array of regions affected by the event

property aff_industries#

The industries affected by the event.

property aff_regions#

The array of regions affected by the event

property aff_sectors#

The array of affected sectors by the event

property duration#

The duration of the event.

classmethod from_scalar_regions_sectors(impact, *, regions, sectors, impact_regional_distrib=None, impact_sectoral_distrib=None, occurrence=1, duration=1, name=None, **kwargs)#

Creates an Event from a scalar, a list of regions and a list of sectors affected.

Parameters:
impactScalarImpact

The scalar impact.

regionsRegionsList

The list of regions affected.

sectorsSectorsList

The list of sectors affected in each region.

impact_regional_distribOptional[npt.ArrayLike], optional

A vector of equal size to the list of regions affected, stating the share of the impact each industry should receive. Defaults to None.

impact_sectoral_distribOptional[Union[str, npt.ArrayLike]], optional

Either:

  • "gdp", the impact is then distributed using the gross value added of each sector as a weight.

  • A vector of equal size to the list of sectors affected, stating the share of the impact each industry should receive. Defaults to None.

occurrenceint, optional

The ordinal of occurrence of the event (requires to be > 0). Defaults to 1.

durationint, optional

The duration of the event (entire impact applied during this number of steps). Defaults to 1.

nameOptional[str], optional

A possible name for the event, for convenience. Defaults to None.

**kwargs

Keyword arguments Other keyword arguments to pass to the instantiate method (depends on the type of event)

Returns:
Event

An Event object or one of its subclass.

Raises:
ValueError

Raise if Impact is null, if len(regions) or len(sectors) < 1,

property impact#

A pandas Series with all possible industries as index, holding the impact vector of the event. The impact is defined for each sectors in each region.

property impact_households#

A pandas Series with all possible (regions, final_demand_cat) as index, holding the households impacts vector of the event. The impact is defined for each region and each final demand category.

property impact_industries_distrib#

The series specifying how damages are distributed among affected industries (regions,sectors)

property impact_regional_distrib#

The series specifying how damages are distributed among affected regions

property occurrence#

The temporal unit of occurrence of the event.

name#

An identifying name for the event (for convenience mostly)

event_dict#

Store relevant information about the event

event_monetary_factor#

The monetary factor for the impact of the event (e.g. 10**6, 10**3, …)

property rebuild_tau#

The characteristic time for rebuilding.

property rebuilding_sectors#

The (optional) array of rebuilding sectors