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);
        }
Exemplo n.º 2
0
        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;
                }
            }
        }
Exemplo n.º 3
0
 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;
 }