Compute your grads in advance. How great will the changes in elevation be? Tunnels and curves can be issues. Also, my complaints on laying directly on foam are for hand laying...when you purchase wood ties, spikes, and bulk rail...and spike the individual rails down...Tetter's layout thread is good example of this. Laying sectional & flex track directly on foam is fine. Just cut your roadbed out of thinner foam board.