private double makeSureSmaxIsntViolated(int i, double nextStake) {
		int sMaxI = road.getSmax(i);
		int sMax2 = road.getSmax(i-1);

		if (nextStake > sMaxI && nextStake > sMax2) {
			nextStake = sMaxI < sMax2 ? sMax2 : sMaxI;
			nextStake = lastStake() + nextStake;
		}
		return nextStake;
	}