public bool RuntimeValidation(ref string error) { var realRoot = Root.MainClient as ITravelDemandModel; if (realRoot == null) { error = "'" + Name + "' is unable to run because the model system that is being estimated is not based on an ITravelDemandModel!"; return(false); } RealRoot = realRoot; return(true); }
private void FindRoot() { var ancestry = Functions.ModelSystemReflection.BuildModelStructureChain(Config, this); for (int i = ancestry.Count - 1; i >= 0; i--) { if (ancestry[i].Module is ITravelDemandModel tdm) { Root = tdm; return; } } }
public bool RuntimeValidation(ref string error) { var realRoot = Root.MainClient as ITravelDemandModel; if (realRoot == null) { error = "'" + Name + "' is unable to run because the model system that is being estimated is not based on an ITravelDemandModel!"; return false; } RealRoot = realRoot; return true; }