Exemplo n.º 1
0
        public void PCC_MSD_dymola_CA()
        {
            string outputDir         = "PCC_MSD_dymola_CA";
            string petExperimentPath = "/@TestBenches|kind=Testing|relpos=0/@SingleConfig|kind=Testing|relpos=0/@PCC_CA|kind=ParametricExplorationFolder|relpos=0/@PCC_MSD_dymola_CA|kind=ParametricExploration|relpos=0";

            Assert.True(File.Exists(mgaFile), "Failed to generate the mga.");
            bool result = CyPhyPETRunner.Run(outputDir, mgaFile, petExperimentPath);

            Assert.True(result, "CyPhyPET failed.");
        }
Exemplo n.º 2
0
        public void RI_PCC3Metrics_CA()
        {
            string outputDir         = "RI_PCC3Metrics_CA";
            string petExperimentPath = "/@Testing|kind=Testing|relpos=0/@PCC|kind=ParametricExplorationFolder|relpos=0/@RI_PCC3Metrics_CA|kind=ParametricExploration|relpos=0";

            Assert.True(File.Exists(mgaFile), "Failed to generate the mga.");
            bool result = CyPhyPETRunner.Run(outputDir, mgaFile, petExperimentPath);

            Assert.True(result, "CyPhyPET failed.");
        }
Exemplo n.º 3
0
        public void PET_Fail_LogNormal_shape_zero()
        {
            string outputDir         = "LogNormal_shape_zero";
            string petExperimentPath = "/@TestBenches|kind=Testing|relpos=0/@FailingModels|kind=Testing|relpos=0/@InterpreterShouldFail|kind=ParametricExplorationFolder|relpos=0/@LogNormal_shape_zero|kind=ParametricExploration|relpos=0";

            Assert.True(File.Exists(mgaFile), "Failed to generate the mga.");
            bool result = CyPhyPETRunner.Run(outputDir, mgaFile, petExperimentPath);

            Assert.False(result, "CyPhyPET should have failed, but did not.");
        }
Exemplo n.º 4
0
        public void BETA_UP_TS()
        {
            string outputDir         = "BETA_UP_TS";
            string petExperimentPath = "/@TestBenches|kind=Testing|relpos=0/@FailingModels|kind=Testing|relpos=0/@ReferenceExperiments|kind=ParametricExplorationFolder|relpos=0/@BETA_UP_TS|kind=ParametricExploration|relpos=0";

            Assert.True(File.Exists(mgaFile), "Failed to generate the mga.");
            bool result = CyPhyPETRunner.Run(outputDir, mgaFile, petExperimentPath);

            Assert.True(result, "CyPhyPET failed.");
        }
Exemplo n.º 5
0
        public void PET_Fail_Opt1Param2Outputs()
        {
            string outputDir         = "Opt1Param2Outputs";
            string petExperimentPath = "/@TestBenches|kind=Testing|relpos=0/@SingleConfig|kind=Testing|relpos=0/@TestingParameterAndMetricMappings|kind=Testing|relpos=0/@PETTests|kind=ParametricExplorationFolder|relpos=0/@Optimizer|kind=ParametricExplorationFolder|relpos=0/@Opt1Param2Outputs|kind=ParametricExploration|relpos=0";

            Assert.True(File.Exists(mgaFile), "Failed to generate the mga.");
            bool result = CyPhyPETRunner.Run(outputDir, mgaFile, petExperimentPath);

            Assert.False(result, "CyPhyPET should have failed, but did not.");
        }
Exemplo n.º 6
0
        public void PSRS1Param1Output()
        {
            string outputDir         = "PSRS1Param1Output";
            string petExperimentPath = "/@TestBenches|kind=Testing|relpos=0/@SingleConfig|kind=Testing|relpos=0/@TestingParameterAndMetricMappings|kind=Testing|relpos=0/@PETTests|kind=ParametricExplorationFolder|relpos=0/@ParameterStudy|kind=ParametricExplorationFolder|relpos=0/@PSRS1Param1Output|kind=ParametricExploration|relpos=0";

            Assert.True(File.Exists(mgaFile), "Failed to generate the mga.");
            bool result = CyPhyPETRunner.Run(outputDir, mgaFile, petExperimentPath);

            Assert.True(result, "CyPhyPET failed.");
        }
        public void PET_Fail_PCC_BrokenTestBench()
        {
            string outputDir         = "PCC_BrokenTestBench";
            string petExperimentPath = "/@Examples|kind=Testing|relpos=0/@PETRuleFailures|kind=ParametricExplorationFolder|relpos=0/@PCC_BrokenTestBench|kind=ParametricExploration|relpos=0";

            Assert.True(File.Exists(mgaFile), "Failed to generate the mga.");
            bool result = CyPhyPETRunner.Run(outputDir, mgaFile, petExperimentPath);

            Assert.False(result, "CyPhyPET should have failed, but did not.");
        }
Exemplo n.º 8
0
        public void NeuralNetExample()
        {
            string outputDir         = "NeuralNetExample";
            string petExperimentPath = "/@Examples|kind=Testing|relpos=0/@SurrogateModeling|kind=ParametricExplorationFolder|relpos=0/@NeuralNetExample|kind=ParametricExploration|relpos=0";

            Assert.True(File.Exists(mgaFile), "Failed to generate the mga.");
            bool result = CyPhyPETRunner.Run(outputDir, mgaFile, petExperimentPath);

            Assert.True(result, "CyPhyPET failed.");
        }
        public void PCC_for_MSD()
        {
            string outputDir         = "PCC_for_MSD";
            string petExperimentPath = "/@Examples|kind=Testing|relpos=0/@PCC|kind=ParametricExplorationFolder|relpos=0/@PCC_for_MSD|kind=ParametricExploration|relpos=0";

            Assert.True(File.Exists(mgaFile), "Failed to generate the mga.");
            bool result = CyPhyPETRunner.Run(outputDir, mgaFile, petExperimentPath);

            Assert.True(result, "CyPhyPET failed.");
        }
        public void PET_Fail_MDAO_DesignVarMinGreaterThanMax()
        {
            string outputDir         = "MDAO_DesignVarMinGreaterThanMax";
            string petExperimentPath = "/@Examples|kind=Testing|relpos=0/@PETRuleFailures|kind=ParametricExplorationFolder|relpos=0/@MDAO_DesignVarMinGreaterThanMax|kind=ParametricExploration|relpos=0";

            Assert.True(File.Exists(mgaFile), "Failed to generate the mga.");
            bool result = CyPhyPETRunner.Run(outputDir, mgaFile, petExperimentPath);

            Assert.False(result, "CyPhyPET should have failed, but did not.");
        }
        public void PET_Fail_Optimizer_ConstraintValuesInvalid()
        {
            string outputDir         = "Optimizer_ConstraintValuesInvalid";
            string petExperimentPath = "/@Examples|kind=Testing|relpos=0/@PETRuleFailures|kind=ParametricExplorationFolder|relpos=0/@Optimizer_ConstraintValuesInvalid|kind=ParametricExploration|relpos=0";

            Assert.True(File.Exists(mgaFile), "Failed to generate the mga.");
            bool result = CyPhyPETRunner.Run(outputDir, mgaFile, petExperimentPath);

            Assert.False(result, "CyPhyPET should have failed, but did not.");
        }
        public void PET_MDAO_zeroDesignVariables()
        {
            string outputDir         = "MDAO_zeroDesignVariables";
            string petExperimentPath = "/@Examples|kind=Testing|relpos=0/@PETRuleFailures|kind=ParametricExplorationFolder|relpos=0/@MDAO_zeroDesignVariables|kind=ParametricExploration|relpos=0";

            Assert.True(File.Exists(mgaFile), "Failed to generate the mga.");
            bool result = CyPhyPETRunner.Run(outputDir, mgaFile, petExperimentPath);

            Assert.True(result, "CyPhyPET should have succeeded.");
        }
        public void PET_Fail_NoDriver()
        {
            string outputDir         = "NoDriver";
            string petExperimentPath = "/@Examples|kind=Testing|relpos=0/@PETRuleFailures|kind=ParametricExplorationFolder|relpos=0/@NoDriver|kind=ParametricExploration|relpos=0";

            Assert.True(File.Exists(mgaFile), "Failed to generate the mga.");
            bool result = CyPhyPETRunner.Run(outputDir, mgaFile, petExperimentPath);

            Assert.True(result, "CyPhyPET should not have failed");
        }
Exemplo n.º 14
0
        public void FullSpeedForwardMaxSpeed_cfg1()
        {
            string outputDir         = "FullSpeedForwardMaxSpeed_cfg1";
            string petExperimentPath = "/@TestBenches|kind=Testing|relpos=0/@Dynamics|kind=Testing|relpos=0/@PCC|kind=ParametricExplorationFolder|relpos=0/@FullSpeedForwardMaxSpeed_cfg1|kind=ParametricExploration|relpos=0";

            Assert.True(File.Exists(mgaFile), "Failed to generate the mga.");
            bool result = false;

            result = CyPhyPETRunner.Run(outputDir, mgaFile, petExperimentPath);

            Assert.True(result, "CyPhyPET failed.");
        }
Exemplo n.º 15
0
        public void PCC_MSD_dymola_CA()
        {
            Assert.True(File.Exists(mgaFile), "Failed to generate the mga.");
            CyPhyGUIs.IInterpreterResult result = null;
            try
            {
                result = CyPhyPETRunner.Run("PCC_MSD_dymola_CA", mgaFile,
                                            "/@TestBenches|kind=Testing|relpos=0/@SingleConfig|kind=Testing|relpos=0/@PCC_CA|kind=ParametricExplorationFolder|relpos=0/@PCC_MSD_dymola_CA|kind=ParametricExploration|relpos=0");
            }
            catch (META.InterpreterException ex)
            {
                Console.WriteLine(ex.Message);
                Assert.NotNull(result);
            }

            Assert.NotNull(result);
            Assert.True(result.Success, "Interpreter return with result.Success as false!");
            var runCommand = result.RunCommand.Split(new char[] { ' ' }).FirstOrDefault();

            Assert.True(File.Exists(Path.Combine(Path.GetDirectoryName(mgaFile), "PCC_MSD_dymola_CA", runCommand)),
                        string.Format("RunCommand file : {0}, does not exist.", runCommand));
        }