Added multi-objective support to PyEO (and changed its name to that)

This commit is contained in:
maartenkeijzer 2003-01-06 16:10:38 +00:00
commit 0a4fb55031
21 changed files with 60 additions and 328 deletions

View file

@ -0,0 +1,23 @@
from maxone import *
import unittest
class TestSGA(unittest.TestCase):
def testMO(self):
setObjectivesSize(2);
setObjectivesValue(0,1);
setObjectivesValue(1,-1);
eo1 = EO();
eo2 = EO();
eo1.fitness = [0,1];
eo2.fitness = [1,1];
print dominates(eo1, eo2)
setObjectivesValue(0,-1)
setObjectivesValue(1,1);
print dominates(eo1, eo2)
if __name__=='__main__':
unittest.main()