Ejemplo n.º 1
0
        public void GEMOptimizerTestArithmeticException(InvalidFunc TypeFunc)
        {
            GEMOptimizer gem = new GEMOptimizer();

            GEMParams param = new GEMParams(1, 5, 1000 * 1000, 0.6, 10);

            Assert.Throws <InvalidValueFunctionException>(() => GeneralOptimizerTests.TestInavlidFunction(gem, param, TypeFunc));
        }
        public void FWOptimizerTestArithmeticException(InvalidFunc TypeFunc)
        {
            FWOptimizer fw = new FWOptimizer();

            FWParams param = new FWParams(10, 1000 * 1000, 3, 5, 10, 40);

            Assert.Throws <InvalidValueFunctionException>(() => GeneralOptimizerTests.TestInavlidFunction(fw, param, TypeFunc));
        }
        public void BBBCTestArithmeticException(InvalidFunc TypeFunc)
        {
            BBBCOptimizer bb = new BBBCOptimizer();

            BBBCParams param = new BBBCParams(10, GeneralOptimizerTests.ITER_MAX, 0.4, 0.3);

            Assert.Throws <InvalidValueFunctionException>(() => GeneralOptimizerTests.TestInavlidFunction(bb, param, TypeFunc));
        }
Ejemplo n.º 4
0
        public void GEMOptimizerTestOptimization()
        {
            GEMOptimizer gem = new GEMOptimizer();

            GEMParams param = new GEMParams(1, 5, GeneralOptimizerTests.ITER_MAX, 0.6, 10);

            bool error = GeneralOptimizerTests.TestOptimizer(gem, param);

            Assert.False(error);
        }
Ejemplo n.º 5
0
        public void GEMOptimizerCancel()
        {
            GEMOptimizer gem = new GEMOptimizer();

            GEMParams param = new GEMParams(1, 5, 1000 * 1000, 0.6, 10);

            bool error = GeneralOptimizerTests.TestCancel(gem, param);

            Assert.False(error);
        }
        public void FWOptimizerTestOptimization()
        {
            FWOptimizer fw = new FWOptimizer();

            FWParams param = new FWParams(10, GeneralOptimizerTests.ITER_MAX, 3, 1, 2, 4);

            bool error = GeneralOptimizerTests.TestOptimizer(fw, param);

            Assert.False(error);
        }
        public void BBBCTestOptimization()
        {
            BBBCOptimizer bb = new BBBCOptimizer();

            BBBCParams param = new BBBCParams(10, GeneralOptimizerTests.ITER_MAX, 0.4, 0.3);

            bool error = GeneralOptimizerTests.TestOptimizer(bb, param);

            Assert.False(error);
        }
        public void BBBCTestCancel()
        {
            BBBCOptimizer bb = new BBBCOptimizer();

            BBBCParams param = new BBBCParams(10, 1000 * 1000, 0.4, 0.3);

            bool error = GeneralOptimizerTests.TestCancel(bb, param);

            Assert.False(error);
        }
        public void FWOptimizerTestCancel()
        {
            FWOptimizer fw = new FWOptimizer();

            // Distance is Manhattan distance.
            FWParams param = new FWParams(10, 1000 * 1000, 3, 5, 10, 40);

            bool error = GeneralOptimizerTests.TestCancel(fw, param);

            Assert.False(error);
        }
Ejemplo n.º 10
0
        public void GEMOptimizerTestWrongParams()
        {
            GEMOptimizer gem = new GEMOptimizer();

            Assert.Throws <ArgumentException>(() => GeneralOptimizerTests.TestWrongParams(gem));
        }
        public void FWOptimizerTestWrongParams()
        {
            FWOptimizer fw = new FWOptimizer();

            Assert.Throws <ArgumentException>(() => GeneralOptimizerTests.TestWrongParams(fw));
        }
        public void BBBCTestWrongParams()
        {
            BBBCOptimizer bb = new BBBCOptimizer();

            Assert.Throws <ArgumentException>(() => GeneralOptimizerTests.TestWrongParams(bb));
        }