public void setupEnvironment()
        {
            Commands cmd = new Commands();

            cmd.performOneCommand(Commands.COMMAND_CLEAR_GLOBAL);
            SampleUtil.loadVM();
            ConfigurationBuilder.vg = VariantGeneratorFactory.GetVariantGenerator("z3");
        }
示例#2
0
        public static bool testOptionalNumSample()
        {
            VariabilityModel     withOptional        = SampleUtil.loadOptionalVM();
            List <Configuration> sampledWithOptional = SampleUtil.sampleWholePopulation(withOptional);

            return(7 == sampledWithOptional.Count && sampledWithOptional.Exists(x =>
                                                                                x.BinaryOptions.ContainsKey(withOptional.AbrstactOptions[0])));
        }
示例#3
0
        public void setupEnvironment()
        {
            Commands cmd = new Commands();

            cmd.performOneCommand(Commands.COMMAND_CLEAR_GLOBAL);

            if (file != null)
            {
                string path = Path.GetFullPath(Path.Combine(System.AppDomain.CurrentDomain.BaseDirectory, "..//..//.."))
                              + Path.DirectorySeparatorChar + "ExampleFiles"
                              + Path.DirectorySeparatorChar + file;
                SampleUtil.loadVM(path);
            }
            else
            {
                SampleUtil.loadVM();
            }


            ConfigurationBuilder.vg = VariantGeneratorFactory.GetVariantGenerator("z3");
        }
示例#4
0
 public void TestDistributionAwareSolverSelection()
 {
     Assert.True(SampleUtil.TestDistributionAwareSolverSelection("z3", 217,
                                                                 0, "SolverSelection", "True"));
 }
示例#5
0
 public void TestBinaryRandom()
 {
     Assert.True(SampleUtil.TestBinaryRandom("z3", 308, "asTW2", 15));
 }
示例#6
0
 public void TestDistributionAware()
 {
     Assert.True(SampleUtil.TestHybridStrategy("msSolver", EXPECTED_DIST_AW, 0
                                               , new DistributionAware(), "DistributionAwareCompleteConfigurations"));
 }
示例#7
0
 public void TestHypersampling()
 {
     Assert.True(SampleUtil.TestHypersampling("z3", 176, 50));
 }
示例#8
0
 public void TestFeatureWise()
 {
     Assert.True(SampleUtil.TestBinaryNoParam(70, "z3"
                                              , SamplingStrategies.OPTIONWISE, "FeaturewiseSampling.csv"));
 }
示例#9
0
 public void TestNegFeatureWise()
 {
     Assert.True(SampleUtil.TestBinaryNoParam(105, "z3"
                                              , SamplingStrategies.NEGATIVE_OPTIONWISE, "NegFWSampling.csv"));
 }
示例#10
0
 public void TestBoxBehnken()
 {
     Assert.True(SampleUtil.TestBoxBehnken("msSolver", EXPECTED_BOXBEHNKEN));
 }
示例#11
0
 public void TestHypersampling()
 {
     Assert.True(SampleUtil.TestHypersampling("msSolver", EXPECTED_HYPERSAMPLING_50, 50));
     Assert.True(SampleUtil.TestHypersampling("msSolver", EXPECTED_HYPERSAMPLING_40, 40));
 }
示例#12
0
 public void TestNegFeatureWise()
 {
     Assert.True(SampleUtil.TestBinaryNoParam(EXPECTED_NEG_FEATURE_WISE, "msSolver"
                                              , SamplingStrategies.NEGATIVE_OPTIONWISE, "NegFWSampling.csv"));
 }
示例#13
0
 public void TestFeatureWise()
 {
     Assert.True(SampleUtil.TestBinaryNoParam(EXPECTED_OPTIONWISE, "msSolver"
                                              , SamplingStrategies.OPTIONWISE, "FeaturewiseSampling.csv"));
 }
示例#14
0
 public void TestLoadingTestVM()
 {
     Assert.IsTrue(SampleUtil.loadVM());
 }
示例#15
0
 public void TestDistributionAwareSolverSelection()
 {
     Assert.True(SampleUtil.TestDistributionAwareSolverSelection("msSolver", EXPECTED_DIST_AW_SOLVER
                                                                 , 0, "SolverSelection", "True"));
 }
示例#16
0
 public void TestDistributionPreserving()
 {
     Assert.True(SampleUtil.TestHybridStrategy("msSolver", EXPECTED_DIST_PRESERVING, 0
                                               , new DistributionPreserving(), "DistributionPreserving"));
 }
示例#17
0
 public void TestTWise()
 {
     setupEnvironment();
     Assert.True(SampleUtil.TestTWise("z3", 602, 3));
 }
示例#18
0
 public void TestOneFactorAtATime()
 {
     Assert.True(SampleUtil.TestOneFactorAtATime("msSolver", EXPECTED_ONE_FACTOR_AT_A_TIME_5, 5));
     Assert.True(SampleUtil.TestOneFactorAtATime("msSolver", EXPECTED_ONE_FACTOR_AT_A_TIME_3, 3));
 }
示例#19
0
 public void TestSamplingOptionalNumeric()
 {
     Assert.That(SampleUtil.testOptionalNumSample());
 }
示例#20
0
 public void TestNumericRandom()
 {
     Assert.True(SampleUtil.TestNumericRandom("msSolver", EXPECTED_RANDOM_12_1, 1, 12));
     Assert.True(SampleUtil.TestNumericRandom("msSolver", EXPECTED_RANDOM_10_0, 0, 10));
 }
示例#21
0
 public void testWholePop()
 {
     Assert.True(SampleUtil.TestBinaryNoParam(SampleUtil.EXPECTED_CENTRALCOMP_ALLBINARY, "z3",
                                              SamplingStrategies.ALLBINARY, "AllbinarySampling.csv"));
 }
示例#22
0
 public void TestPlackettBurman()
 {
     Assert.True(SampleUtil.TestPlackettBurman("msSolver", EXPECTED_PLACKETT_BURMAN_3_9, 3, 9));
     Assert.True(SampleUtil.TestPlackettBurman("msSolver", EXPECTED_PLACKETT_BURMAN_5_125, 5, 125));
 }
示例#23
0
 public void TestPairwise()
 {
     Assert.True(SampleUtil.TestBinaryNoParam(EXPECTED_PAIRWISE, "z3"
                                              , SamplingStrategies.PAIRWISE, "PairwiseSampling.csv"));
 }
示例#24
0
 public void TestNumericRandom()
 {
     Assert.True(SampleUtil.TestNumericRandom("z3", 352, 1, 8));
 }
示例#25
0
 public void TestBoxBehnken()
 {
     Assert.True(SampleUtil.TestBoxBehnken("z3", 220));
 }
示例#26
0
 public void TestTWise()
 {
     Assert.True(SampleUtil.TestTWise("msSolver", EXPECTED_T_WISE_3, 3));
     Assert.True(SampleUtil.TestTWise("msSolver", EXPECTED_T_WISE_2, 2));
 }
示例#27
0
 public void TestOneFactorAtATime()
 {
     Assert.True(SampleUtil.TestOneFactorAtATime("z3", 220, 5));
 }
示例#28
0
 public void TestBinaryRandom()
 {
     Assert.True(SampleUtil.TestBinaryRandom("msSolver", EXPECTED_BINARY_RANDOM_TW_15, "asTW", 15));
 }
示例#29
0
 public void TestPlackettBurman()
 {
     Assert.True(SampleUtil.TestPlackettBurman("z3", 264, 3, 9));
 }
示例#30
0
 public void TestKExchange()
 {
     Assert.True(SampleUtil.TestKExchange("z3", 264, 7, 2));
 }