# Path: platypus/operators.py
# class RandomGenerator(Generator):
#     
#     def __init__(self):
#         super(RandomGenerator, self).__init__()
#     
#     def generate(self, problem):
#         solution = Solution(problem)
#         solution.variables = [x.rand() for x in problem.types]
#         return solution


import pickle
import unittest
import functools
from ..problems import *
from ..operators import RandomGenerator
# Copyright 2015-2018 David Hadka
#
# This file is part of Platypus, a Python module for designing and using
# evolutionary algorithms (EAs) and multiobjective evolutionary algorithms
# (MOEAs).
#
# Platypus is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# Platypus is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with Platypus.  If not, see <http://www.gnu.org/licenses/>.

class TestProblemsSimple(unittest.TestCase):

    def test_DTLZ1(self):
        self._run_test(DTLZ1(2))
    
    def test_DTLZ2(self):
        self._run_test(DTLZ2(2))
        
    def test_DTLZ3(self):
        self._run_test(DTLZ3(2))
        

# Path: platypus/operators.py
# class RandomGenerator(Generator):
#     
#     def __init__(self):
#         super(RandomGenerator, self).__init__()
#     
#     def generate(self, problem):
#         solution = Solution(problem)
#         solution.variables = [x.rand() for x in problem.types]
#         return solution


# Path: platypus/tests/test_problems.py
import pickle
import unittest
import functools
from ..problems import *
from ..operators import RandomGenerator

# Copyright 2015-2018 David Hadka
#
# This file is part of Platypus, a Python module for designing and using
# evolutionary algorithms (EAs) and multiobjective evolutionary algorithms
# (MOEAs).
#
# Platypus is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# Platypus is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with Platypus.  If not, see <http://www.gnu.org/licenses/>.

class TestProblemsSimple(unittest.TestCase):

    def test_DTLZ1(self):
        self._run_test(DTLZ1(2))
    
    def test_DTLZ2(self):
        self._run_test(DTLZ2(2))
        
    def test_DTLZ3(self):
        self._run_test(DTLZ3(2))
        

    def test_DTLZ4(self):