For those that have worked with the earlier versions of the simulator that Bill Chesnut and I constructed for the Metro content (the Highway Simulator), changes are also required to how AdvanceTimeSettings are specified.
The AdapterAdvanceTimeSettings value is now generated by binding an AdvanceTimeGenerationSettings (that is based on your adapter configuration) with an AdvanceTimePolicy setting.
public class TollPointInputFactory :
ITypedInputAdapterFactory<TollPointInputConfig>,
ITypedDeclareAdvanceTimeProperties<TollPointInputConfig>
{
public InputAdapterBase Create<TollPointEvent>
(TollPointInputConfig configInfo,
EventShape eventShape)
{
return new TollPointInput<TollPointEvent>(configInfo);
}
public void Dispose()
{
}
public AdapterAdvanceTimeSettings DeclareAdvanceTimeProperties<TPayload>
(TollPointInputConfig configInfo,
EventShape eventShape)
{
var atgs = new AdvanceTimeGenerationSettings
(configInfo.CtiFrequency,
TimeSpan.FromSeconds(0),
true);
var ats = new AdapterAdvanceTimeSettings
(atgs,
AdvanceTimePolicy.Drop);
return ats;
}
}
In this case, I've specified the Drop policy. An alternate policy is Adjust. The documention suggested that Adjust causes the event to be moved back into the window that you're using. For the events we were using, we found that wasn't what happened. It turns out that that was because we were using Point events. What Adjust actually does is clip an event to lie wholly within the CTI period as long as the event overlaps the CTI. This would only then work with Interval or Edge events, not with Point events.