Comments (2)
solved I just update acopy and networks to last versions
from acopy.
Hi @bankauskas, sorry this is giving you trouble. Which version of ACOpy are you using? Unfortunately, I'm unable to reproduce the problem on my end:
>>> import acopy
... import networkx as nx
...
... g = nx.Graph()
...
... g.add_edge(0, 1, weight = 2)
... g.add_edge(1, 2, weight = 2)
... g.add_edge(2, 3, weight = 2)
... g.add_edge(3, 0, weight = 2)
... g.add_edge(0, 2, weight = 1)
... g.add_edge(1, 3, weight = 1)
...
... solver = acopy.Solver(rho=.03, q=1)
... colony = acopy.Colony(alpha=1, beta=3)
... tour = solver.solve(g, colony, limit=100)
>>> tour.path
[(3, 1), (1, 0), (0, 2), (2, 3)]
From your traceback I see you actually used a tmp_g
graph:
tour = solver.solve(tmp_g, colony, limit=100)
Does tmp_g
differ from the g
you constructed above?
Lastly, looking at the code for score_edge
and thinking about the specific error you're getting (a ValueError
from DataFrame. __nonzero__
) my guess is maybe you somehow assigned a DataFrame as the weight of an edge?
from acopy.
Related Issues (20)
- update_scent should encompass _trace_elite HOT 1
- Don't need to ask each ant if moving is possible HOT 2
- Can't copy Ants or Worlds HOT 1
- Cloned ant has source ant's uid HOT 1
- Strange method names HOT 1
- The main method is a mess! HOT 1
- No way to input coordinates from command line HOT 1
- Running ACO when starting start node is given HOT 4
- PyPI import missing utils HOT 7
- Failure on noncomplete graph HOT 2
- Error: not exists edge when using networkx graph generator HOT 4
- [Proposal] ant's move can handles the not complete graph. HOT 1
- Only works for fully connected graphs HOT 1
- Algorirhm diverge
- bump version of click
- Yielding local best OR global best HOT 1
- Argument/property name mismatch HOT 3
- No property access for initial world pheromone level HOT 1
- No documentation for properties HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from acopy.