예제 #1
0
        private static void LimesRun()
        {
            var radii = new[]
            { 50, 100, 150, 200, 250, 300 };   //{0.01, 0.02, 0.03, 0.04, 0.05, 0.06, 0.07, 0.08, 0.09, 0.1};
            var          startingPoint = CreateStartingPoints(1).First();
            const string directoryPath = @"C:\Workspaces\etc\szakdoga\LongWithSmallRadii10";

            Parallel.ForEach(radii, radius =>
            {
                var room = TrackFactory.RoomWithPlaneRoof(radius);
                room.NumberOfIterations = 1_000_000;
                room.Start(startingPoint);

                var specificPath = Path.Combine(directoryPath, radius.ToString(CultureInfo.InvariantCulture));
                Writer(room, specificPath, FileMode.Create);
            });
        }
예제 #2
0
        private static void ParallelStart(double radius)
        {
            var startingPoints = VeryCloseStartingPoints(1);
            var distances      = new List <List <Vector3D> >(1);

            Parallel.ForEach(startingPoints, (startLine, _, l) =>
            {
                var room = TrackFactory.RoomWithPlaneRoof(radius);
                room.NumberOfIterations = 100_000;
                room.Start(startLine);
                lock (LockObject)
                {
                    Console.WriteLine($"Done with {startLine.Direction}");
                    distances.Add(room.EveryHitpoint);
                }

                var directory = $@"C:\Workspaces\etc\szakdoga\kicsik2tized4\{l}";
                Directory.CreateDirectory(directory);
                Writer(room, directory, FileMode.Create);
            });
        }
예제 #3
0
        private static void NearAutoCorrelation(double radius)
        {
            var startingPoints = VeryCloseStartingPoints(2);
            var distances      = new List <List <Vector3D> >();

            Parallel.ForEach(startingPoints, (startLine, _, l) =>
            {
                var room = TrackFactory.RoomWithPlaneRoof(radius);
                room.NumberOfIterations = 2_000;
                room.Start(startLine);
                WriteSequence(room, false, l.ToString());
                lock (LockObject)
                {
                    Console.WriteLine($"Done with {startLine.Direction}");
                    distances.Add(room.EveryHitpoint);
                }
            });
            Directory.CreateDirectory(@"C:\Users\haraszti\Desktop\szakdoga\NearAuto2\kozel\");
            var distance = distances[0].Zip(distances[1], (x, y) => Vector3D.AbsoluteValue(x - y));

            File.WriteAllLines(@"C:\Users\haraszti\Desktop\szakdoga\NearAuto2\kozel\dist.txt",
                               distance.Select(x => x.ToString(CultureInfo.CurrentCulture)));
        }