Esempio n. 1
0
        public void TestPlackettBurman()
        {
            Dictionary <string, string> parameters = new Dictionary <string, string>();

            parameters.Add("level", "3");
            parameters.Add("measurements", "9");
            PlackettBurmanDesign sampling = new PlackettBurmanDesign();

            sampling.setSamplingParameters(parameters);
            testNumeric(sampling, EXPECTED_PLACKETT_BURMAN_3_9);
            parameters.Clear();
            parameters.Add("level", "5");
            parameters.Add("measurements", "125");
            sampling.setSamplingParameters(parameters);
            testNumeric(sampling, EXPECTED_PLACKETT_BURMAN_5_125);
        }
Esempio n. 2
0
        public static bool TestPlackettBurman(string solver, int expected, int level, int measurements)
        {
            string loc = resolvePath(solver, "PlackettSampling" + level.ToString() + measurements.ToString() + ".csv");
            Dictionary <string, string> parameters = new Dictionary <string, string>();

            parameters.Add("level", level.ToString());
            parameters.Add("measurements", measurements.ToString());
            PlackettBurmanDesign sampling = new PlackettBurmanDesign();

            sampling.setSamplingParameters(parameters);
            List <Configuration> result         = testNumeric(sampling);
            List <Configuration> expectedSample = ConfigurationReader.readConfigurations_Header_CSV(loc, GlobalState.varModel);

            return(containsAllMeasurements(result, expectedSample) && result.Count == expected);
        }