コード例 #1
0
 private static bool HasCapacity(ModuleGraphEdge route)
 {
     if (route.Target.LimitItemCount > 0)
     {
         return(route.Target.CurrentItemCount < route.Target.LimitItemCount);
     }
     return(true);
 }
コード例 #2
0
        private static double EdgeCostFunction(ModuleGraphEdge edge)
        {
            if (edge.Target.State != PlatformModuleState.Run)
            {
                return(double.PositiveInfinity);
            }

            if (edge.Target.IsFull(edge.TargetPort))
            {
                return(double.PositiveInfinity);
            }

            // TODO: respect throughput capability of individual modules as soon as the minimalistic statistic feature is implemented in Mosaic
            return((double)ItemTransitionCost + edge.Target.CurrentItemCount);
        }