  Star formation in a filamentary infrared dark cloud (IRDC) is simulated over
a dynamic range of 4.2 pc to 28 au for a period of $3.5\times 10^5$ yr,
including magnetic fields and both radiative and outflow feedback from the
protostars. At the end of the simulation, the star formation efficiency is 4.3
per cent and the star formation rate per free fall time is $\epsilon_{\rm
ff}\simeq 0.04$, within the range of observed values (Krumholz et al. 2012a).
The total stellar mass increases as $\sim\,t^2$, whereas the number of
protostars increases as $\sim\,t^{1.5}$. We find that the density profile
around most of the simulated protostars is $\sim\,\rho\propto r^{-1.5}$, as
predicted by Murray & Chang (2015). At the end of the simulation, the
protostellar mass function approaches the Chabrier (2005) stellar initial mass
function. We infer that the time to form a star of median mass $0.2\,M_\odot$
is about $1.4\times 10^5$~yr from the median mass accretion rate. We find good
agreement among the protostellar luminosities observed in the large sample of
Dunham et al. (2013), our simulation, and a theoretical estimate, and conclude
that the classical protostellar luminosity problem Kenyon et al. (1990) is
resolved. The multiplicity of the stellar systems in the simulation agrees to
within a factor 2 of observations of Class I young stellar objects; most of the
simulated multiple systems are unbound. Bipolar protostellar outflows are
launched using a sub-grid model, and extend up to 1 pc from their host star.
The mass-velocity relation of the simulated outflows is consistent with both
observation and theory.
