コード例 #1
0
        public static void LoadManualData(string inputDir, string outputDir)
        {
            ManualDataReader reader = new ManualDataReader(inputDir + "CSVs");

            reader.ReadWaferFabSettings();

            reader.WaferFabSettings.SampleInterval = 12 * 60 * 60; // 12 hours
        }
コード例 #2
0
ファイル: ShellViewModel.cs プロジェクト: paatrickd/OUTPUT
        public ShellViewModel()
        {
            string inputDir         = @"C:\CSSLWaferFab\Input\";
            string outputDir        = @"C:\CSSLWaferFab\Output\WaferFabGUI";
            string eptParameterFile = @"FittedEPTParameters - 2019-6-1.csv";

            WaferFabSim = new ShellModel(outputDir);
            WaferFabSim.ReadSimulationResults();
            WaferFabSim.PropertyChanged += ShellModel_PropertyChanged;

            // Link relay commands
            RunSimulationCommand     = new RelayCommand(RunSimulationAsync, () => true);
            ClearAllWIPDataCommand   = new RelayCommand(ClearAllWIPPlots, () => CanClearWIPData);
            ClearLastWIPDataCommand  = new RelayCommand(ClearLastWIPPlot, () => CanClearWIPData);
            PlayAnimationCommand     = new RelayCommand(PlayAnimationAsync, () => (SnapshotsToAnimate != null && SnapshotsToAnimate.Any() && !isAnimationRunning) || AnimationPaused);
            PauseAnimationCommand    = new RelayCommand(PauseAnimation, () => isAnimationRunning && !AnimationPaused);
            StopAnimationCommand     = new RelayCommand(StopAnimation, () => isAnimationRunning);
            LoadRealSnapshotsCommand = new RelayCommand(LoadRealSnapshotsAsync, () => true);

            // Initialize properties
            DispatcherTypes = new ObservableCollection <string>()
            {
                "BQF", "EPTOvertaking", "Random", "MIVS"
            };
            SelectedDispatcherType = DispatcherTypes.Last();
            WorkCenters            = new ObservableCollection <WorkCenterData>();
            LotStartQtys           = new ObservableCollection <LotStartQty>();
            XAxisLotSteps          = new ObservableCollection <CheckBoxLotStep>();
            WIPBarChart            = new PlotModel {
                Title = "WIP balance"
            };
            dialogCoordinator = DialogCoordinator.Instance;
            inputDirectory    = inputDir;
            FPSAnimation      = 5;
            FPSMax            = 5;
            waferThresholdQty = 1;

            // Initialize Experiment Settings
            experimentSettings = new ExperimentSettings();
            experimentSettings.NumberOfReplications = 1;
            experimentSettings.LengthOfReplication  = 1 * 24 * 60 * 60;
            experimentSettings.LengthOfWarmUp       = 0 * 60 * 60;
            Settings.WriteOutput = true;

            // Initialize Waferfab Settings
            this.reader                           = new AutoDataReader(inputDirectory + @"\CSVs", inputDir + @"\SerializedFiles");
            waferFabSettings                      = this.reader.ReadWaferFabSettings(eptParameterFile, false, true, DispatcherBase.Type.EPTOVERTAKING);
            waferFabSettings.WIPTargets           = this.reader.ReadWIPTargets(waferFabSettings.LotSteps, "WIPTargets.csv");
            waferFabSettings.UseRealLotStartsFlag = true;
            waferFabSettings.SampleInterval       = 60 * 60;
            initializeGUIWaferFabSettings(waferFabSettings);

            // TEMPORARY
            var reader   = new ManualDataReader(inputDirectory + @"\Manual");
            var settings = reader.ReadWaferFabSettings();

            // Initialize bar chart
            SimulationSnapshots = new ObservableCollection <SimulationSnapshot>(WaferFabSim.MySimResults.SimulationSnapshots);
            foreach (var step in waferFabSettings.LotSteps.OrderBy(x => x.Value.Id))
            {
                XAxisLotSteps.Add(new CheckBoxLotStep(settings.LotSteps.ContainsKey(step.Key), $"{step.Key}"));
            }
            xAxis = new CategoryAxis()
            {
                Angle = 60, ItemsSource = XAxisLotSteps.Where(x => x.Selected).Select(x => x.Name)
            };
            WIPBarChart.Axes.Add(xAxis);
            yAxis = new LinearAxis()
            {
                Minimum = 0
            };
            yAxis.Maximum = 400;
            WIPBarChart.Axes.Add(yAxis);
        }