esa / pygmo2

A Python platform to perform parallel computations of optimisation tasks (global and local) via the asynchronous generalized island model.
https://esa.github.io/pygmo2/
Mozilla Public License 2.0
414 stars 56 forks source link

It is not possible to modify topology objects with "add/remove edge" or "add_vertex". #109

Open israel-cj opened 1 year ago

israel-cj commented 1 year ago

Since what I want is a different topology. I wonder if there is a way to modify, for example, the ring topology or fully connected through "add_edge" or "add_vertex" on the topology. I would be very grateful if you could send me a minimal example of adding or removing islands from the topology with these methods, as I have not been able to do it.:

t1 = pg.topology(pg.ring(5)) t1.add_vertex() Output: AttributeError: 'pygmo.core.topology' object has no attribute 'add_vertex'