A 39-year-old man has been arrested after the incident at the Palace of Holyroodhouse in Edinburgh.