Farmers’ entitlements and their optimal investment