Comments (4)
Hello @drissDean !
Isula's implementation of ACO algorithms look for solutions with the minimum cost. These solutions are generated by instances of Ant
, and the cost is obtained by the method Ant::getSolutionCost()
. In a TSP instance, the cost is expressed in terms of distance. If you have a different cost metric, just override Ant::getSolutionCost()
with the logic that suits your domain.
from isula.
Thank you very much.
I'm striving to keep the minimum cost too. The issue with the Euclidean system is that no two cities in a country are joined with a straightforward path. We can even find watercourses or other things we would have to bypass and that would make the distance much longer. So I need to take into account certain real factors for the system I have to build. I actually try to deliver the best itinerary given the actual traffic data, not only distances between points.
Since I've taken the aco-acs-tsp implementation, then I have to create my own class which would extend AntForTsp class (and overload the getSolutionCost() method) and use it anywhere we had AntForTsp class before?
from isula.
Hi @drissDean ,
I would approach it this way:
- Extend
AntForTsp
, for exampleCustomAntForTsp
, overridinggetSolutionCost()
. According to your problem, you might also need to overridegetHeuristicValue()
. - Use these new type
CustomAntForTsp
when creating theAntColony
instance for yourAcoProblemSolver
. Take a look at thegetAntColony
method at AcoTspWithIsula.
Good luck!
from isula.
Alright, sir. Thank you so much.
from isula.
Related Issues (6)
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 isula.