public ReversalCombinations(Data[] requestedOutputsToReverse, Data[] requestedInputsToReverse, Workflow workflow)
        {
            RequestedOutputsToReverse = requestedOutputsToReverse;
            RequestedInputsToReverse  = requestedInputsToReverse;
            this.workflow             = workflow;
            dependencyAnalysis        = workflow.DependencyAnalysis;
            IndependentInputs         = workflow.ModelDataInputs;

            CheckReversalRequestCorrectness();
        }
Example #2
0
 public Analysis(IAnalysisReportInProgress analysisReportInProgress,
                 IDependencyAnalysis dependencyAnalysis,
                 IProjectAnalysis projectAnalysis,
                 IProjectNamespacesAnalysis projectNamespacesAnalysis,
                 IResultBuilderFactory resultBuilderFactory)
 {
     _analysisReportInProgress  = analysisReportInProgress;
     _dependencyAnalysis        = dependencyAnalysis;
     _projectAnalysis           = projectAnalysis;
     _projectNamespacesAnalysis = projectNamespacesAnalysis;
     _resultBuilderFactory      = resultBuilderFactory;
 }
        public GuidingReversal(Data[] requestedOutputsToReverse, Data[] requestedInputsToReverse, Data[] independentVariables, Workflow workflow)
        {
            RequestedOutputsToReverse = requestedOutputsToReverse;
            RequestedInputsToReverse  = requestedInputsToReverse;
            IndependentInputs         = independentVariables;
            this.workflow             = workflow;
            dependencyAnalysis        = workflow.DependencyAnalysis;

            if (NoutRequest > NinRequest)
            {
                Type = ReversalType.Outputs;
            }
            else
            {
                Type = ReversalType.Inputs;
            }

            FixesByRemoving = FixRequestByRemoving();
            FixesByAdding   = FixRequestByAdding();
        }
        public Mission(WorkflowComponent workflow)
        {
            this.Workflow = workflow;
            Components    = new List <WorkflowComponent>();
            if (workflow is Model model)
            {
                Components.Add(model);
            }
            else if (workflow is Workflow wf)
            {
                Components.AddRange(wf.ScheduledComponents);
            }

            dependencyAnalysis = new GraphBasedDependencyAnalysis(Components);
            componentsSegmentsGraph.AddVertices(Components);

            Data         = Components.GetAllData();
            VariableData = new HashSet <Data>(Data);
            ConstantData = new HashSet <Data>();
            dataSegmentsGraph.AddVertices(Data);
            independentVariables = workflow.ModelDataInputs;

            SegmentsGraph = new Graph();
        }