We consider the problem of ensuring food security of the country, which includes the task of controlled con- tainment of inflation for the most important types of agricul- tural products. We propose an approach to modeling that takes into account the interactions between market participants and allows to coordinate the interests of independent producers and the state. The mechanisms of grain market regulation in the Russian Federation are considered and analyzed, a mathematical formulation of the problem under study and methods for solving it are given. The results of a scenario analysis of the im- pact of export restriction parameters on domestic prices are pre- sented using the example of the wheat market in the Russian Federation.