Simulation of the capital structure of an enterprise taking into account the dynamics of parameters of the external environment