예제 #1
0
        // private static ProgressBar progressBar = new ProgressBar();

        static async Task Main(string[] args)
        {
            Host.Program.RunServer(args);
            Console.BackgroundColor = ConsoleColor.Black;
            Console.ForegroundColor = ConsoleColor.Gray;
            Console.Clear();
            Console.SetCursorPosition(0, 1);
            Console.WriteLine(AsciiLogo.VSLogo);
            Console.ForegroundColor = ConsoleColor.Cyan;
            Console.SetCursorPosition(0, 1);
            Console.WriteLine(AsciiLogo.VSLogo2);
            Console.ForegroundColor = ConsoleColor.Cyan;
            Console.SetCursorPosition(71, 10);
            Console.WriteLine("Loading the Central Bureau of Statistics");
            Console.ForegroundColor = ConsoleColor.White;
            Console.SetCursorPosition(71, 12);
            Console.Write("Marriage Probabilities...");
            MaritalStatusProbability.Init();
            Console.WriteLine("Loaded");
            Console.SetCursorPosition(71, 13);
            Console.Write("ChildBirth Probabilities...");
            ChildrenProbability.Init();
            Console.WriteLine("Loaded");
            Console.SetCursorPosition(71, 14);
            Console.Write("Age Probabilities...");
            AgeProbability.Init();
            Console.WriteLine("Loaded");
            Console.CursorVisible   = false;
            Console.BackgroundColor = ConsoleColor.DarkBlue;
            Console.Clear();
            Console.ForegroundColor = ConsoleColor.Black;
            Console.SetCursorPosition(0, 7);
            Console.WriteLine(AsciiLogo.QR);
            Console.SetCursorPosition(0, 0);
            Console.ForegroundColor = ConsoleColor.Yellow;
            Console.WriteLine(AsciiLogo.VSLogo3);
            var startDate = new DateTime(1950, 1, 1);

            endDate = new DateTime(2020, 1, 1).AddDays(-1);
            Console.ForegroundColor = ConsoleColor.White;
            env = new SimSharp.Simulation(new DateTime(1950, 1, 1), 42);
            var people = new Population(env, endDate, Statistics);

            startPerf = DateTime.UtcNow.AddYears(-1);
            Console.SetCursorPosition(0, 18);
            Console.WriteLine(AsciiLogo.Heartbeat);
            t = new Timer(Reporter, env, 1000, 250);
            env.RunFinished += Env_RunFinished;
            env.Run(endDate);
            // Console.Read();
        }
 static MaritalStatusTests()
 {
     MaritalStatusProbability.Init();
 }