Traditional compartmental models such as SIR (susceptible,infected,recovered) assume that the epidemic transmits in a homogeneous population,but the real contact patterns in epidemics are heterogeneous.Employing a more realistic model that considers heterogeneous contact is consequently necessary.Here,we use a contact network to reconstruct unprotected,protected contact,and airborne spread to simulate the two-stages outbreak of COVID-19 (coronavirus disease 2019) on the "Diamond Princess" cruise ship.We employ Bayesian inference and Metropolis-Hastings sampling to estimate the model parameters and quantify the uncertainties by the ensemble simulation technique.During the early epidemic with intensive social contacts,the results reveal that the average transmissibility t was 0.026 and the basic reproductive number R0 was 6.94,triple that in the WHO report,indicating that all people would be infected in one month.The t and R0 decreased to 0.0007 and 0.2 when quarantine was implemented.The reconstruction suggests that diluting the airborne virus concentration in closed settings is useful in addition to isolation,and high-risk susceptible should follow rigorous prevention measures in case exposed.This study can provide useful implications for control and prevention measures for the other cruise ships and closed settings.