BioSystemsUM / MEWpy

Metabolic Engineering Workbench
https://mewpy.readthedocs.io
GNU General Public License v3.0
37 stars 12 forks source link

error with visualizer=True #8

Closed cdanielmachado closed 3 years ago

cdanielmachado commented 3 years ago

Hi Vitor,

When I use the visualizer option I get the following error:

~/miniconda/miniconda3/envs/py36/lib/python3.6/site-packages/mewpy/optimization/ea.py in dominance_test(solution1, solution2, maximize)
    176     best_is_two = 0
    177 
--> 178     for i in range(len(solution1.fitness)):
    179         value1 = solution1.fitness[i]
    180         value2 = solution2.fitness[i]

AttributeError: 'KOSolution' object has no attribute 'fitness'
vmspereira commented 3 years ago

Hi Daniel,

Firstly, thanks for pointing out this issue and taking an interest in MEWpy. I just made a pull request that solves the problem. Please let me know if anything else comes up.

Best regards Vítor

cdanielmachado commented 3 years ago

Thanks a lot, I think this is a really great tool.

I am creating a few modeling tutorials for teaching purposes (that can be run online using binder) and I just made a very simple one on strain design with MEWpy:

https://github.com/cdanielmachado/teaching

It is still very basic, but I will try to gradually improve it with more detailed examples. The fact that it runs on binder makes my life much easier :)