Management of farm animals for efficient production of meat, milk, eggs and other animal products