Comments (2)
What I'll do is make World
accept an already created distance matrix. I'll then create a subclass of it that accepts a list of coordinates and makes the assumption you mentioned.
from acopy.
The new World
class no longer relies on Node
data, rather it uses Edge
data. So, use your already created distance matrix to create a list of Edge
s and create the World
from that instead.
# Assumes a list of origin nodes *origins*, a list of destination nodes *dests*, and a
# distance matrix *dmat* have already been declared and initialized.
edges = []
for a in range(len(origins)):
for b in range(len(dests)):
edges.append([Edge(origins[a], dests[b], length=dmat[a][b])])
world = World(edges)
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
- ValueError: The truth value of a DataFrame is ambiguous. Use a.empty, a.bool(), a.item(), a.any() or a.all(). HOT 2
- 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.