If a hearing has not begun in the trial of the issue of just compensation for the taking or damaging of property and the petitioner has not already acquired the title or a lesser interest or estate in, or taken possession of, such property, the petitioner may upon motion obtain, as a matter of right, an order dismissing the proceeding as to such property. Such order shall also provide, except as may be provided otherwise in a settlement by agreement of the parties, that the petitioner shall pay such owner or owners their reasonable expenses that have been actually incurred by them in preparing for the trial on the issue of just compensation, in such amounts as the court deems just and reasonable.
Va. Code § 25.1-248