One of the most important and difficult parts of constructing a multidimensional numerical simulation of flame acceleration and deflagration-to-detonation transition (DDT) in a reacting flow is finding a reliable and affordable model of the chemical and diffusive properties. For simulations of realistic scenarios, full detailed chemical models (with hundreds of chemical reactions and many species) are computationally prohibitive. In addition, they are usually inaccurate for high-temperature and high-pressure shock-laden flows. This paper presents a general approach for developing an automated procedure to determine the reaction parameters for a simplified chemical-diffusive model to simulate flame acceleration and DDT in stoichiometric methane-air and ethylene-oxygen mixtures. The procedure uses a combination of a genetic algorithm and Nelder-Mead optimization scheme to find the optimal reaction parameters for a reaction rate based on an Arrhenius form for conversion of reactants to products. The model finds six optimal reaction parameters (ratio of specific heats, activation energy, preexponential factor, heat release rate, thermal conductivity coefficient, and overall molecular weight) that reproduce six target flame and detonation properties (adiabatic flame temperature, constant volume equilibrium temperature, laminar flame speed, laminar flame thickness, Chapman-Jouguet detonation velocity, and detonation half-reaction thickness). Results from the optimization procedure show that the optimal reaction parameters, when used in 1-D reactive Navier-Stokes simulations, closely reproduce the target flame and detonation properties for the stoichiometric methane-air and ethylene-oxygen mixtures. The effects of uncertainties in the values of target flame and detonation properties can be minimized to have little effect on the resulting optimal reaction parameters, and the reaction parameters can be tailored, if necessary, for the different regimes of flame acceleration and DDT. When the reaction parameters are used as input in a 2-D simulation of flame acceleration and DDT in an obstacle-laden channel containing stoichiometric methane-air, the simulation results closely follow the transition to detonation observed in experiments. This automated procedure for finding parameters for a proposed reaction model makes it possible to simulate the behavior of flames and detonations in large, complex scenarios, which would otherwise be an incalculable problem.