Simulating post-disaster temporary housing needs for displaced households and out-of-town contractors

Residential damage from major disasters often displaces local residents out of their homes and into temporary housing. Out-of-town contractors assisting in post-disaster housing reconstruction also need housing, creating additional pressure on the local housing stock. Communities should thus prepare for a surge in temporary housing demand to minimize the impact on the local residents and to expedite housing recovery efforts. Computational models can support recovery planning. This article introduces an agent-based simulation framework to estimate the workforce demand and the joint temporary housing needs of contractors and displaced households. The main agents are households seeking to repair their homes, local contractors, and out-of-town contractors. Out-of-town contractor agents come into the community if the labor and housing markets are favorable. The framework can be used to evaluate the resulting challenges and benefits of interventions aimed at attracting out-of-town contractors to expedite housing recovery. We present a case study on the housing recovery of the city of San Francisco after hypothetical M 6.5, M 7.2, and M 7.9 earthquakes. A shortage of contractors is shown to bottleneck the reconstruction if no out-of-town contractors are recruited. Conversely, out-of-town contractors increase the likelihood of temporary housing shortages. These results highlight the need to plan for shortages of reconstruction labor and temporary housing during recovery.


Introduction
In the recovery phase after a disaster, providing temporary housing to displaced households is a priority because normalcy cannot be restored without places to live (Comerio, 2014b). Post-disaster reconstruction is often assisted by out-of-town contractors who also need temporary housing. Thus, the housing needs of displaced populations may conflict with those of out-of-town contractors (Le Masurier et al., 2006), and this has been acknowledged by San Francisco Bay Area impact studies (California Emergency Management Agency, 2011, Section 5.3.1). The present study introduces a computational simulation framework to investigate influence of out-of-town contractors on housing recovery speed and the demand for temporary housing. Temporary housing plays a pivotal role in the early stages of disaster recovery (Fe´lix et al., 2013), allowing the partial restoration of household routines until permanent housing is restored (Quarantelli, 1982). Temporary housing may be sought from vacant rental units, trailers, family or friends, modular homes (Abt Associates, 2009), multi-family complexes (Chang-Richards et al., 2013), or even boats moored along the shoreline (Shelter-in-Place Task Force, 2012). Temporarily housing displaced residents near their pre-disaster neighborhoods has become a goal of municipal disaster recovery plans (Lee and Otellini, 2016) because it has been shown to reduce post-disaster population losses. Thus, a significant demand for temporary housing is expected during reconstruction following a large-scale disaster.
After a disaster, the local workforce will likely be insufficient to meet the demand for reconstruction. Insufficient contractor supply has challenged post-disaster housing recoveries after several recent disasters (Agnew, 2021;Barenstein, 2006;Bilau et al., 2015;Bothara et al., 2016;Chang et al., 2011;Chang-Richards et al., 2013. Thus, to expedite housing reconstruction, communities often rely on out-of-town contractors. Recruiting these contractors often leads to the escalation of rental prices. This may force a portion of the displaced residents out of the rental market and spark conflicts between out-of-town contractors and local residents (Fletcher et al., 2007). Moreover, unappealing housing conditions limit the community's ability to attract and retain the needed reconstruction workforce (Plyer et al., 2009).
The Federal Emergency Management Agency (FEMA, 2020) highlights the need for emergency managers and planners to maintain awareness of current housing stock within their jurisdiction and identify temporary housing needs prior to an incident. However, the rare nature of large-scale disasters makes it hard to plan using empirical knowledge alone. In this context, computational simulations are a powerful tool to support planning. Some scholars have proposed simulation models for housing recovery and highlighted the relevance of pre-planning for workforce demand Costa and Haukaas, 2021). However, these models focus on simulating the allocation of the existing workforce. What has not been addressed is the constraint on increasing the local workforce due to limited temporary housing which is also needed by the local residents.
This article provides two main contributions to address this gap. First, we introduce a simulation framework to study post-earthquake housing recovery and assess temporary housing needs. We employ an agent-based approach to represent the intricate ways in which households seeking to repair their homes, local contractors, and out-of-town contractors interact. Agent-based models represent complex system and emergent behaviors using autonomous agents with simple attributes (Macal and North, 2005). Our main agents are displaced households seeking to repair their homes, local contractors, and outof-town contractors. The local and out-of-town contractors interact with households to supply the demand for workers. The out-of-town contractors and displaced households compete for temporary housing. The framework can be used to estimate (1) the workforce demand, and the joint temporary housing needs of reconstruction contractors and displaced persons; (2) the impact of the lack of temporary housing on reconstruction speed, or (3) to assess how recovery and the demand for out-of-town contractors will affect the availability of temporary housing. Our case study focuses on the third point. The second contribution is the application of the framework to a case study of post-earthquake housing recovery in the city of San Francisco. Public data sources are identified and modeling assumptions are discussed. The case study shows how the framework can be used to identify strategies that increase the communities' recovery speed by bringing out-of-town contractors, without further stressing the local housing market.
Temporary housing demand and supply Figure 1 contains three subplots which introduce key concepts in this study. At the top, the horizontal bars represent steps in the housing recovery processes for four individual households, labeled H1 to H4. Due to earthquake damage, these households are displaced from their homes until they finish repairs. Households need to obtain an inspection, permit, materials, and financing before starting repairs (Almufti and Willford, 2013;Comerio, 2006). In Figure 1, these steps are grouped under ''impeding factors.'' Once these steps are completed, the households seek to hire a contractor crew to conduct repairs. In the center plot, a timeline of the demand for contractors is presented. At time t 1 , household H1 completes all the steps needed to hire a contractor. The same happens to household H2 at time t 2 . In this simplified example, only two contractor crews exist in the community. Thus, when household H3 is ready to hire a contractor at time t 3 , it is not able to because demand for workers exceeds the local supply.
There are two possibilities at time t 3 . In the central subplot, the black lines represent the scenario in which no out-of-town contractors come into the community and the recovery of H3 is bottlenecked by the limited workforce. The periods indicated as ''wait'' in the top subplot reflect the bottleneck due to lack of contractors. Conversely, the brown lines in Figure 1 represent a scenario where an out-of-town contractor crew comes into the community, the total workforce is increased, and household H3 can hire them to start repairs. In this case, the wait periods in the top subplot are eliminated. Out-of-town contractors can thus expedite a community's housing reconstruction.
The bottom plot shows the demand for temporary housing in the community over time.
In the example, fewer households are displaced by the earthquake than the available temporary housing. However, if out-of-town contractors are recruited at t 3 , the available temporary housing is no longer sufficient (brown lines). This is not a problem in the case where no contractors come to the community (black lines). As the recovery progresses, some households return home (e.g. H2 at t 4 ), and others enter the competition to hire a contractor (e.g. H4 at t 5 ). Eventually, the available temporary housing is sufficient to supply the housing demand.
Two concepts are introduced in Figure 1. First, scarce resources can delay housing recovery. Past experience shows that socioeconomically disadvantaged households are more likely to experience these delays due to limited abilities to quickly raise funds for recovery (Peacock et al., 2014;Wang et al., 2015). Second, in Figure 1, the demand for contractors and temporary housing exceeds the local availability at some but not all times. Thus, if the out-of-town contractors remain in the community in between jobs, they contribute to the temporary housing needs but do not expedite the recovery. From this point of view, insights into the demand for contractors over time help identify the number of out-of-town contractors needed to reduce the waiting period while minimizing adverse effects on the local housing market.
The framework introduced below sets up a market for contractor supply and demand, with supply being provided by the local workforce and potentially by out-of-town contractors that are recruited to the area and housed locally. The contractor demand and housing demand illustrated in Figure 1 are affected by the degree of recruitment, and these tradeoffs will be quantified in the case study later.

Overview of simulation framework
To assess the demand for contractors and temporary housing, we expand a framework of models previously developed by the authors (Costa et al., 2020). Figure 2 summarizes the inputs, outputs, and models involved in this framework. The framework is evaluated from left to right. The first step is to simulate the earthquake hazard. The inputs are the earthquake sources, potential rupture patterns, and soil conditions. The outputs of the hazard assessment are maps (or grids of points) of correlated ground motion intensity measures. The next step is to create an inventory of the exposed assets, that is, residential buildings. The goal is to determine the physical vulnerability and location of each building. These data allow for a fragility curve to be selected to represent each building and for the on-site ground motion intensity to be interpolated from the hazard maps. With this, the immediate impacts of earthquake can be assessed for each building, which is the third step in the framework. The immediate impacts consist of estimates of damage, repair cost, and repair time. Maps of the earthquake immediate impacts are the outputs of this step.
Once the conditions of each building in the community are determined, recovery can be simulated. We associate one household to each building. The household is characterized by its socioeconomic status (e.g. tenure status and income). The demographics of the household affect the financing options available to the household. The competition for limited contractors is simulated using the concepts introduced in Figure 1. The output of this step are housing recovery trajectories for the community, which are obtained by computing the housing recovery time for individual buildings and aggregating across the community.
The novel models developed in this communication are on the right-hand side of Figure  2. We introduce models to assess the demand for temporary housing and for out-of-town contractors on each time step of the simulation. These models allow us to evaluate the potential for temporary housing shortages, and assess the unmet demand for housing and contractors. The simulation framework also provides insights on the number of out-oftown contractors that balances expedited recovery with minimized temporary housing demands.

Agent-based housing demand simulation
This section provides technical details of the models in Figure 2, and their implementation. All models are implemented using the object-oriented paradigm. These models have attributes (i.e. input parameters), actions (e.g. calculations they perform), and communicate with other models (i.e. provide outputs). Some models have simple actions, and we call these ''objects.'' For example, the Hazard Object simply outputs the ground motion intensity at the location of each building. Other models represent entities with complex behaviors. We call these ''agents'' as they respond to inputs from other models. Figure 3 shows the interactions between four agents: households, local contractors, out-of-town contractors, and the local housing authority. The Household Agents initiate most of the interactions within the framework. There are many Household Agents and each ''has-a'' Building Object. The ''has-a'' represents a composition relationship in object-oriented programming (Deitel and Deitel, 2006). The Hazard Object provides ground motion intensities to the Building Objects, which in turn evaluate their damage and inform the Household Agents. The Household Agents leave their buildings if significant damage is observed.
Displaced Household Agents seek financing and procure resources (e.g. contractors) to conduct housing repairs. Local contractor agents are initially sought. If the demand for contractors exceeds the local workforce (C b ), the local contractor agents communicate this demand to the out-of-town contractor agents. The displaced Household Agents also inform the Housing Authority Agent of their housing needs, indicated as (+) in Figure 3. The Housing Authority Agent may decide to increase the local housing availability (e.g. build housing). The local housing availability is also communicated to the out-of-town contractor agents. The demand for contractors and temporary housing availability will inform the decision of the out-of-town contractor agents to come or leave the community. When a Household Agent receives contractors, it starts to repair its building and eventually returns home. At that point, it updates the Housing Authority Agent that it no longer needs temporary housing, shown as (2) in Figure 3. We note that the competition for temporary housing between local displaced residents and out-of-town contractors makes post-disaster recovery even more challenging. We do not model which party wins the competition for the temporary housing unit, but the competition exists and future work could be conducted to address this problem. Here, we focus on quantifying the imbalance between temporary housing demand and supply.

Household Agents
The main attributes of the Household Agents are their tenure status (renter or owner) and income bracket (low, moderate, or high). These demographics are sampled independently from the distributions in their census block group. For example, if 50% of the households are renters in one census block group, and 30% have a low income, the probability that a household is a renter and has a low income is 0.5 3 0.3 = 0.15. This approach partially captures the spatial correlation that exists between demographics at the block group level, for example, in San Francisco, block groups with higher percentage of renters tend to have lower household incomes. For rented buildings, the landlord is the one responsible for financing repairs. We assume that all landlords are high-income households, and they wish to repair their rental properties. This assumption potentially inflates the demand for construction early in the recovery if in reality a portion of the landlords have low or moderate income.
The Household Agents' access to recovery financing is estimated using the model of . This model was developed considering post-earthquake housing recovery financing for households in San Jose, California. Four funding sources are included: earthquake insurance, bank loans, Small Business Administration (SBA) loans, and Community Development Block Group for Disaster Recovery (CDBG-DR) grants. This model provides an estimate of the time needed for a household to obtain full repair financing. For households that depend on public funds, the financing time is often the most relevant impeding factor.
The Household Agent actions include moving out of and back into their buildings. We assume that there is a threshold of damage state at which households move out. The destination of displaced households is not tracked (e.g. Sutley and Hamideh, 2020). We assume that they would be in a temporary home similar to their pre-disaster home, contributing to the community's housing demand.
The multiple Household Agents in Figure 3 represent a single community. The framework could be extended to an application where multiple communities are under reconstruction simultaneously. A new group of Household Agents would need to be created and their demographic characteristics would be assigned from Census data of their respective communities.

Local contractor agents
The local contractor agents represent the contractors that exist within the community prior to the disaster. These contractors are assumed to be available a few weeks to months after the disaster and to remain in the community during the reconstruction. Multiple local contractor agents can be created to represent multiple communities that are affected by the disaster at the same time.

Out-of-town contractor agents
The actions of the out-of-town contractor agents are defined by the workflow in Figure 4. These agents respond to inputs from the local contractor agents and the Housing Authority Agent. The outputs from the local contractor agents reflect the unmet demand for contractors, defined as follows: where C a (t) is the number of workers currently allocated to housing reconstruction, C h (t) is the number of households waiting for a contractor crew to become available, and C w (t) is the number of workers waiting to be allocated. Note that C a (t) contributes to demand and supply to account for the fact that once they finish one project they become available to the community again. However, before coming into the community, the out-of-town contractors check the housing market. The Housing Authority Agent informs the out-of-town contractors on the expected number of temporary housing units available in the community, A(t), defined as follows: where V(t) is the expected number of vacant housing units discussed later, and D h (t) is the housing demand by the displaced population. If A(t) = 0, the housing is not available and out-of-town contractors do not come into the community. Conversely, if A(t) . 0, out-oftown contractors may come into the community depending on their perception of the labor and housing markets. We assign the out-of-town contractor agents a property which reflects their perceptions and their consequent willingness to come work in the community. R is bound in the interval [0, 1]. That is, R = 1 indicates that out-of-town contractors will respond to any demand not supplied by the local contractors. If R = 0.5, one out-of-town contractor will be willing to come into the community for each two homeowners whose demand is not met by local contractors. The number of contractors willing to come into the community is given as follows: As C oot (t+Dt) out-of-town contractors come into the community, the number of workers available increases by C oot (t+Dt). At the same time, A(t) decreases by C oot (t+Dt). This process is shown on the left-hand side of Figure 4. Conversely, when R3(C a (t) + C h (t))\C a (t) + C w (t), a portion of the out-of-town contractors leave the community. This process is shown on the right-hand side of Figure 4. The number of surplus workers, C s (t), is assessed as follows: A fraction L of the surplus contractors will leave the community in the next simulation time step (i.e. C w (t) decreases by L3C s (t)), and the accommodation capacity A(t) increases accordingly. Note that only the out-of-town contractors leave when there is a surplus, while the local contractors (B) remain regardless of the labor and housing markets. Moreover, if R = 1, the supply-demand dynamics are independent of C a . Contractors currently allocated to a building do not leave before they complete their current job.

Housing Authority Agent
The Housing Authority Agent communicates the state of the local housing market to the out-of-town contractor agents to inform their decisions. The main attributes of this agent are its knowledge of the current housing demand and availability in the community. Postearthquake housing recovery in the United States is mostly market-driven (Comerio, 2014b). In this case, the Housing Authority Agent represents market conditions that encourage behaviors of private parties. For regions with stronger governmental oversight, the Housing Authority Agent could represent a central planner that compels recovery actions. An example of such regulatory agency is Ministry of Housing and Urban Development (MINVU) which managed the housing reconstruction program aimed at low-and middle-income populations in over 239 municipalities after the 2010 Chile earthquake and tsunami (Comerio, 2014a). In this case, the Housing Authority may be given a budget and the ability to implement interventions to address the housing shortages, such as building new temporary housing or prioritizing certain groups.
The Housing Authority Agent determines at each time step of the simulation if a shortage of temporary housing is observed: where 1 is an indicator function that returns unity if the condition is true and zero otherwise, D(t) is the temporary housing demand from displaced households and out-of-town contractors, and V(t) is the number of vacant housing units in the community. After a disaster, the framework could assess if there will be a shortage of temporary housing, that is, S(t) = 1, and how long the shortage will last given current available temporary housing. The community can respond accordingly by creating new temporary housings if that is viable. The framework in Figure 2 may be run N times to capture the uncertainty in the ground motions, damage, losses, and recovery processes. In this case, the probability of housing shortage at any time t is as follows: Case study In this case study, the proposed framework is used to simulate housing recovery of singlefamily housing stock in the city of San Francisco following earthquakes. Initially, housing recovery is simulated considering only local contractors, to explore the potential for contractor availability to bottleneck recovery. We then investigate three scenarios in which out-of-town contractors respond to different fractions of the unmet demand for contractors. We also investigate the contractor supply-demand ratio (R) that provides a balance between recovery speed gains and the increase in housing demand. The probability of housing shortage is assessed under different scenarios of R which vary the number of outof-town contractors in the community. The implementation of the five steps of the framework in Figure 2, the associated data sources, assumptions, and results are discussed in the following.

Hazard assessment
We consider earthquakes with magnitudes (M) 6.5, 7.2, and 7.9 on the northern San Andreas fault located west of San Francisco. The SimCenter Regional Risk and Determination Tools (R2D; Deierlein et al., 2020) are used to estimate the intensity of the ground motions across the region of interest and to generate ground motion maps. The R2D simulations employed the ground motion model by Chiou and Youngs (2014) and Wills et al.'s (2015) model to estimate soil conditions, and the inter-event and intra-event ground motion spatial correlations were estimated with the models in Baker and Jayaram (2008) and Markhvida et al. (2018), respectively. For each of the three earthquake scenarios, 100 ground motion maps are generated, which later allows for partially capturing uncertainty in the impacts of the earthquakes.

Exposed assets
The building inventory is constructed using Census data and the methodology described in the Hazus Inventory Technical Manual (FEMA, 2019). The methodology allows us to estimate the structural type, code design level, and replacement cost for buildings of interest. The resulting inventory comprises 124,564 single-family houses in the city of San Francisco. The number of pre-earthquake vacant units is obtained from the 5-year estimates by American Community Survey (ACS; US Census Bureau, 2021). The ACS 5-year average vacant homes in San Francisco is 18,626. These include properties in the market for rental and unoccupied homes. We assume that vacant rental homes remain available after the disaster, that is, the owners do not occupy or sell them.

Immediate impact
For each of the three earthquakes, 100 ground motion maps are generated to partially capture uncertainty in the immediate impacts of the earthquakes. All buildings are assumed to be light wood-frame buildings. Repair time is estimated to be 90 and 180 days for severely and completely damaged buildings, respectively. Table 1 provides an overview of the impacts of each earthquake. Severely or completely damaged buildings buildings are assumed to require major repairs (FEMA, 2015) and cannot be immediately reoccupied by their households. For completely damaged buildings, reoccupancy is reestablished when the building is fully repaired. For severely damaged buildings, 50% of the repairs need to be completed before the building is reoccupiable (FEMA, 2015, Table 15.11). In the following, we refer to these households as ''displaced households.'' The results in the following represent a conservative estimate of the number of displaced persons because in reality some households may opt to stay in their homes despite their damaged homes whereas others may stay with family or friends. Rather than specify locations of temporary housing units (which are not known from ACS data), we assume that these units are damaged at the same rate as the overall housing stock in the city. We also assume that buildings that were vacant before the disaster will not be repaired before the buildings that were occupied. The last column in Table 1 shows the expected number of available temporary dwellings after each earthquake.

Housing recovery
For each of the 100 damage maps per earthquake, we simulate housing recovery for 8 years following the event using 14-day time steps. The recovery time for each building depends on its repair time and the delay to start repairs. Repair time is a step function of the damage state. Repair delay depends on the time for a household to obtain financing and the competition for contractors in the community. If the homeowner is unable to obtain enough funding, the buildings are sold and repaired by the new owner, but a delay is incurred by this transaction. There is significant variability in household's capacity to obtain financing and consequently in the repair delay. Some households can start repairs soon after the earthquake, whereas others might rely on grants that take years to be disbursed. Specifically, lower-income households are more reliant on public loans and grants, and these funds are more slowly disbursed . Thus, lower-income households are forced to wait longer to start repairs. In consequence, these households will be more heavily impacted by escalating temporary housing costs because (1) they rely on temporary housing for longer and (2) they are more likely to be financially overburdened.
In the city of San Francisco, about 3000 persons work in the single-family construction and repair sector (ESRI, 2021). We assume a contractor crew comprises three persons; hence, we estimate that 1000 local contractor crews exist in San Francisco. Figure 5 shows the median housing recovery curves for three earthquakes on San Andreas Fault. For each earthquake, three recovery scenarios reflect varying behaviors of the out-of-town contractor agents. In the ''Unfavorable'' scenario, out-of-town contractors are not willing to come to the community and recovery relies solely on the local workforce. In the ''Very Favorable'' scenario, out-of-town contractor agents perceive the labor market in San Francisco as appealing and respond to the totality of the demand for contractors that is not supplied by local contractors (i.e. R = 1 in Equation 3). In the ''Partially Favorable'' scenario, one out-of-town contractor will come into the community for each two units of unmet demand (i.e. R = 0.5). The results show that in the unfavorable labor market, recovery is ''bottlenecked'' by a shortage of contractors. The other two scenarios lead to results that are similar to each other and both significantly better than the unfavorable scenario. The change in slope in the curves around the 2-year mark is due to some households being reliant on public funding which is slowly disbursed over several years.
Temporary housing needs Figure 6 shows the number of out-of-town contractors in the community over time, for the two assumed favorable market conditions. If the labor market is ''Very Favorable,'' there is a spike in contractors around 1 year after the earthquake. The long right tail in this scenario is due to homeowners' delay in obtaining financing. If the labor market is ''Partially Favorable,'' the peak within the first 2 years is smaller, but the right tail is longer. The longer right tail of the ''Partially Favorable'' scenario is because a smaller number of out-oftown contractors are supplied early in the recovery compared with the ''Very Favorable'' scenario, which delays the switch of recovery bottleneck from contractor supply to delay in obtaining financing. In other words, around the 2-year mark in the ''Partially Favorable'' scenario, many buildings are still on the waitlist for contractors after they have secured financing thereby delaying the departure of out-of-town contractors. For the M 7.2 and M 7.9 earthquakes, out-of-town contractors remain for several years. Figure 6 shows that many out-of-town contractors may be attracted to the community if the market conditions are appealing, significantly impacting the post-disaster housing demands. Figure 7 presents the total temporary housing needs in the community. The results at time t = 0 represent the needs of the displaced households. Over time, the needs of the displaced households decrease whereas the needs of the out-of-town contractors may increase. Figure 7 also shows the temporary housing needs when recovery is not In the unfavorable scenario, only the 1000 local contractor crews are available to recover the housing stock. In the very favorable scenario, R = 1, that is, out-of-town contractors supply the demand not met by local contractors. In the partially favorable scenario, an out-of-town contractor will be attracted to the community when at least two units of housing demand are not met by local contractors.
supported by out-of-town contractors. In this case, although the local housing market does not suffer any extra pressure, the limited local workforce subjects residents to a much longer period of potential displacement. Figure 8 shows the probability of a housing shortage during recovery, P s (t), for the three earthquakes. The post-earthquake availability of temporary housing in the city from Table 1 and Equation 6 are used to calculate P s (t). As the earthquake magnitude increases  from 6.5 to 7.9, the probability of housing shortage immediately following the earthquake, P s (t = 0), increases from 0.20 to close to unity. For the M 7.9 earthquake, it is evident that more temporary housing is needed to support the displaced population. However, for the M 6.5 and M 7.2 earthquakes, there is a significant chance that the local vacant housing is sufficient to temporarily shelter the displaced population. Figure 8 demonstrates that a labor market favorable to out-of-town contractors may lead to a faster housing recovery and a lower probability of housing shortages in the longterm regardless of the earthquake magnitude. As expected, P s (t) decreases faster if out-oftown contractors are attracted. However, there are smaller differences between the ''Very Favorable'' and ''Partially Favorable'' scenarios than between the ''Partially Favorable'' and ''Unfavorable'' scenarios. It is also noted that the peaks in Figure 8 align with those in Figures 6 and 7 since the peaks are directly related to the recruitment of out-of-town contractors.
Finally, we note that all displaced households are accounted for in estimating the temporary housing demand. Furthermore, we do not consider the creation of temporary housing within the community and inter-municipal coordination to house the displaced population. Thus, the results in Figure 8 are likely a conservative estimate for the probability of housing shortage.

Balancing recovery speed and housing needs
In the previous sections, we described R as a metric of the out-of-town contractor agents' perception of the labor market in the community. If the out-of-town contractors perceive the market as R-favorable, they will supply a fraction R of the demand for out-of-town contractors. We also discussed how R = 1, a 100% favorable market, may lead to a surplus of contractors in the community, exacerbating the competition for temporary housing without a significant gain in housing recovery speed. Thus, we expect that there is a 0 \ R target \ 1 that balances recovery speed and the demand for temporary housing. For example, if R target = 0.9, the local government may be able to take actions to facilitate or create barriers to the influx of out-of-town contractors so that 90% of the total demand is supplied. Conversely, for communities where recovery is market-driven and governmental interventions are unlikely, R target provides a metric to evaluate the progress of housing recovery. That is, if the number of out-of-town contractors in the community is close to that which would be observed if the out-of-town contractors perceived the labor market as R target -favorable, the housing recovery will progress at close-to-ideal rates.
The proposed framework can be used to run housing recovery simulations for a range of R values for each of the earthquake magnitudes considered. For each R-M pair, we first generate one recovery curve, as in Figure 5, and calculate the area above the curve for each R-M pair. This area, with units households displaced 3 time, is used as a metric of the quality of the recovery process-the smaller the area the better the recovery process. Second, we generate Figure 6 for each R-M pair and calculate the peak demand for out-of-town contractors. The peak demand measures the impact of out-of-town contractors on the local housing market. Other metrics were tested, such as the area under the curve in Figure 6. All considered metrics produced similar conclusions, so the peak demand was chosen as an easily interpretable metric. The metrics for each R-M pair are plotted in Figure 9. To facilitate comparisons, the results are normalized. The ordinate axis is normalized by the peak for R = 1 for each M. The abscissa axis is normalized by the results in the scenario where R = 0. The numbers in the figure indicate the peak out-of-town contractors associated with R-M pairs. Figure 9 indicates that there are small gains in households displaced3time from increasing R from 0.5 to 1.0. However, to achieve R = 1.0, the peak number of out-of-town contractors doubles. Thus, R values near 0.5 may balance the gains in recovery speed and the R represents the out-of-town contractor's perception of the labor market in the community. The abscissa axis shows the area under the curves in Figure 5 normalized by that of the scenario with R = 0. The ordinate axis shows the peak in Figure 6 normalized by the peak of the scenario with R = 1.
impacts of having more out-of-town contractors in the community, that is, R target '0:5. Another application of Figure 9 is to estimate gains in recovery speed from recruiting outof-town contractors. For example, if the community anticipates that it can attract 1000 contractors during post-earthquake reconstruction, the reduction in the number of households displaced overtime can be interpolated. This figure provides communities with a simple mechanism for exploring the benefits of recruiting more contractors to improve housing recovery.

Interventions to address housing needs
The case study results demonstrate the potential benefits of recruiting contractors from nearby regions and contrast them with the impacts on the local housing market. However, communities may find alternatives to increase their temporary housing availability. After Hurricane Katrina, semi-permanent dwellings were used to house many Mississippian households who lost their homes (Abt Associates, 2009). Following the 2008 Wenchuan Earthquake, prefabricated construction workers' complexes were widely used by construction companies to house contractors (Chang-Richards et al., 2013). After the 2011 Christchurch Earthquake, hotels vacant due to the loss of tourism were used as temporary housing (Giovinazzi et al., 2012). Nongovernmental organizations (NGOs) built permanent buildings to house reconstruction professionals after the 2004 Indian Ocean tsunami (Chang-Richards et al., 2013). Those building complexes were later repurposed as interim accommodations for NGOs and tourists, showing the importance of considering secondlife uses when designing post-disaster housing programs. It is beyond our scope to recommend how communities should address this problem. However, the framework provides a method to compare the costs and benefits of any candidate strategies. For example, recovery planners use this framework and find the probability of housing shortage (P s (t)) unacceptable (e.g. stays high for a considerable duration), they can then assess different strategies of increasing temporary housing, for example, when to create new housing and how many to be created. The strategies would be implemented in our framework as the Housing Authority Agent's decision to increase temporary housing availability over a certain duration.

Case study limitations
Given the complex nature of the problem, the case study has limitations and relies on assumptions. Only single-family buildings are included due to challenges associated with determining the funding mechanisms and decisions involved in repairing multi-family buildings. However, our framework could be adapted to include multi-family buildings by creating multiple types of local and out-of-town contractor agents to represent workers specialized in different types of repairs. Due to the exclusion of multi-family residences, post-disaster temporary housing needs are likely to be higher, which emphasizes the need to plan for a potential temporary housing shortage. In addition, we do not account for the temporary housing needs of the homeless population (California Emergency Management Agency, 2011). The case study assumes that out-of-town contractors would contribute to the housing demands in the city. However, contractors could commute to San Francisco from neighboring counties. However, these neighboring communities are also likely to be impacted by the earthquake and accounting for this would significantly increase the complexity of the case study. The case study also omits the possibility of housing displaced residents with friends or relatives, or in trailers, hotel, or boats (Shelter-in-Place Task Force, 2012), due to complexities in modeling suitability of these options for several months or even years. Despite those assumptions, the case study provides a means to quantify the likelihood of out-of-town contractor housing needs negatively affecting residents. This emphasizes the importance of coordinating with potential host communities to ensure desired recovery progresses-an issue that has also been raised by other research efforts (California Emergency Management Agency, 2011).

Conclusion
This article introduces a modeling framework to simulate post-earthquake housing recovery, and estimate the demand for temporary housing from the local displaced households and out-of-town contractors needed to support the community's reconstruction. An agentbased approach is utilized, where households and contractors interact to simulate the recovery. Households attempt to secure temporary housing and recruit contractors for housing repairs. Local contractors take on repair jobs. If the demand for contractors exceeds the local workforce and temporary housing is available, out-of-town contractors support the housing reconstruction. The inputs to the model are estimates of building stock damage and repair times, and the number of post-earthquake vacant homes. The number of local contractors is an optional input and without it the simulation relies only on out-of-town contractors. A metric of the attractiveness of the post-disaster housing market is also needed. A proxy for this metric, which we defined as R = [0, 1], can be estimated from expected or measured increases in housing costs. Alternatively, the user can run ''what-if'' analysis to gain insights into potential scenarios for recovery. This modeling framework allows the user to explore contractor supply-demand dynamics, and investigate the impacts of out-of-town contractors on the community recovery and the local housing market. Communities can use the framework before a disaster to study potential housing and out-of-town contractor needs. Alternatively, the framework can be used for real-time post-disaster assessments to estimate the expected demand for temporary housing and outof-town contractors in the following months, giving communities leeway to adapt.
A case study is presented on the housing recovery of the city of San Francisco after hypothetical M 6.5, M 7.2, and M 7.9 earthquakes on the San Andreas Fault. It shows that housing reconstruction in San Francisco is likely to be bottlenecked by availability of local contractors. If recruited from out-of-town and housed within the city, contractors may cause a temporary housing shortage. Several aspects of the housing recovery are evaluated, providing metrics to support recovery-enhancing decisions. An example shows how communities could balance the overall housing needs while achieving their recovery goals. By identifying R target and the number of out-of-town contractors needed, the community can plan for accommodating only the number of contractors that are significantly helpful to recovery. There is a limit to expediting recovery by attracting more contractors because at some point contractor availability is not the bottleneck. Thus, this study shows that by pre-planning for contractor supply, disaster-affected communities can accelerate their housing recovery while managing housing challenges for the local displaced population.

Declaration of conflicting interests
The author(s) declared no potential conflicts of interest with respect to the research, authorship, and/ or publication of this article.