A model of the Danish agricultural sector named KRAM (KVL's Regionalized Agricultural Model) is developed in this paper. KRAM can be described as a spatial, dynamic, nonlinear, programming sector model. KRAM's purpose is to make policy analysis in the complex market conditions Danish agriculture is working under today. In order to do this in the best possible way the model optimizes the production functions on a very disaggregated level. This allows for analysis of changes in physical constraints to production, as well as price changes. The model is capable of calculating some environmental effects of agricultural production, and provides detailed spatial description of the agricultural economy and production. The time horizon is 10 years, and the model allows farms to develop during those years both in terms of investments on the farm, and in terms of the number of farms in different farm groups. The structural development is determined endogenously using profits and a Markov chain model. The main purpose of this paper is to outline the model, and place it in a theoretical framework. KRAM will be programmed in a set of smaller submodels, in order to ease the implementation of new features. The open structure also reduces the demand for computation power, and reduces the solution time significantly. Later papers will look into the programming, calibration and application of KRAM.