EventKapitalRecover#

class EventKapitalRecover(*, impact, recovery_tau, recovery_function='linear', households_impact=None, name=None, occurrence=1, duration=1, event_monetary_factor=None)[source]#

Bases: EventKapitalDestroyed

EventKapitalRecover holds a EventKapitalDestroyed event where the destroyed capital does not create a reconstruction demand.

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

  • A characteristic time for the recovery (recovery_tau)

  • Optionally a recovery_function (linear by default).

See also

Tutorial How to define Events

Methods

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

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.

recovery_function

The recovery function used for recovery (Callable)

recovery_tau

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 recovery_function#

The recovery function used for recovery (Callable)