Due to the confidentiality disclosure control process applied to the FSS data, many values in the dataset are missing. This repository contains an optimization model to fill these gaps and ensure consistency between different spatial (NUTS 0, NUTS 2, NUTS 3, and gridcells of 10x10, 20x20, 60x60 km2) and thematical (total agricultural area and livestock numbers, and their disaggregation into increasingly detailed crop/livestock groups) levels.