Travelling Salesman Problem Constraint Representation - algorithm

I read a couple of articles and sample code about how to solve TSP with Genetic Algorithms and Ant Colony Optimization etc. But everything I found didn't include time (window) constraints, eg. "I have to be at customer x before 12am)" and assumed symmetry.
Can somebody point me into the direction of some sample code or articles that explain how I can add constraints to TSP and how I can represent those in code.
Thanks!

Professor Reinelt at university of heidelburg in germany is one of the leading experts for the TSP. He has a collection of papers on the various variants of the TSP.
see http://www.iwr.uni-heidelberg.de/groups/comopt/software/TSPLIB95/
I think your variant is called Vehicle Routing Problem with Time Windows. ( http://en.wikipedia.org/wiki/Vehicle_routing_problem )

You should take a look on what the state-of-the-art on Domain Independent Planning can do for you: http://ipc.informatik.uni-freiburg.de/

Related

NSGA-II with flight ticket reservation

I am totally confused with this optimization problem. Since I am a beginner for this evolutionary algorithms, if I asked a basic question, please forgive me. I checked many NSGA II examples. They took flight ticket reservation as a standard problem to explain two-objective optimization problem. I clearly understand the concept that for example, if we want to choose low cost and a few hours of traveling time, it is really hard to find best from multiple combinations as bellow. For example, if we have the following combinations,
How can I generate the initial population--> Chromosome. Since ticket types are Pareto front, how can I represent individuals (Chromosomes)?

Course Scheduling Algorithms: why use of DFS or Graph coloring is not suggested?

I need to develop a Course Timetabling software which can allot timeslots and rooms efficiently. This is a curriculum based routine, not post-enrollment based. And efficiently means classes are assigned timeslots according to staff time preferences and also need to minimize 1st year-2nd year class overlap so that 2nd year students can retake the courses they've failed to pass.(and also for 3rd-4th yr pair).
Now, at first i thought that would be an easy problem, but now it seems different. Most of the papers i've looked on uses Genetic Algorithm/PSO/Simulated Annealing or these type of algorithm. And i'm still unable to interpret the problem to a GA problem.
what i'm confused about is why almost none of them suggests DFS or Graph-coloring algorithm?
Can someone explain the scenario if DFS/graph-coloring is used? Or why they aren't suggested or tried.
My experience with solving this problem for a complex department, is that the hard constraints (like no overlapping of courses that are taken by the same population, and hard constraints of the teachers) are rather easily solvable by exact methods. I modeled the problem with 0-1 integer linear programming, and solved it with a SAT-based tool called minisat+. Competitive commercial tools like cplex can also solve it.
So with today's tools there is no need to approximate as suggested above, even when the input is rather large.
Now, optimizing the solution is a different story. There can be many (weighted) objectives, and finding the solution that brings the objective to minimum is indeed very hard computationally (no tool that I tried can solve it within 24 hours), but they reach near optimum in a few hours (I know it is near optimum because I can compute the theoretical bound on the solution).
This document describes applying a GA approach to university time-tabling, so it should be directly applicable to your requirement: Using a GA to solve university time-tabling

NSGA-II ( Non- Dominating Sorting Algorithm )

I have studied about Non dominating sorting algorithtm (nsga-II).
Algorithm is given on this link .
http://church.cs.virginia.edu/genprog/images/2/2f/Nsga_ii.pdf
I want to know it's real life application with examples.....I tried to search on the internet ,but no where found it.
If you have any ideas or relevent data/link ,please share with me.
You can find some real-life applications by just searching : "NSGA-II + applications" in Google Scholar : http://scholar.google.com/scholar?start=10&q=nsga-ii+application&hl=en&as_sdt=0,5
The ones who proposed NSGA-II are, indeed, Prof. Kalyanmoy Deb and his co-authors Samir Agrawal, Amrit Pratap and T. Meyarivan.
In my own research, I surveyed a number of NSGA-II based approaches for the portfolio optimization problem (a financial engineering problem), you can find a paper at the link : https://editorialexpress.com/cgi-bin/conference/download.cgi?db_name=CEF2012&paper_id=167
In my own, personal experience, I've used NSGA-II for two problems.
The Multi Objective Travelling salesman problem and
Community Detection in Networks.
These were mainly academic studies, so they can't be called real life applications.
For more concrete examples of NSGA-II in action, I know that, NSGA-II is used in optimization of chemical processes. Prof. S.K. Gupta, from whom I learnt about NSGA-II, did so himself and you can check out some of the practical applications in his list of papers
http://www.iitk.ac.in/che/Publ%20List%20SKG%20June%202012.pdf particularly paper #160, 163, 164, 177 and 187.
I'm not sure, but the inventor himself, Prof. Kalyanmoy Deb , also uses it in the field of Mechanical Engineering.
Basically, you can use it, in any Industrial Process, where optimization is required, be it a chemical process, or the design of car parts.
I used NSGA-II in a multi-objective evolutionary approach to optimize an artificial neural network that corresponds to a computational model of a part of the brain which is supposed to be a low-level system for action selection. If you are interested you may find more information on http://francky.me/publications.php#mRF2011
Note that any other Pareto-compliant ranking method would have probably worked.

Papers about Travelling Salesman Problem (TSP)

I'm searching for relative (after 2000) new papers about TSP.
All the papers I have found were quite hard and needed high level
mathematical skills. I'm looking for papers that are simple to read
for someone who has simple college mathematic knowledge and good
programming knowledge in Java and C (I didn't find any current paper
implementing TSP with these languages).
Any hints will be highly appreciated.
(edit)
What Im trying to say is that im searching for papers that dont need to understand
difficult formulas. For instance some papers describe algorithms, or the philosophy
of solution. It isnt necessary to implement that algorithm, just describe the techniques.
Maybe using some simple geometry ...
I found some papers based on Lin-Kernighan methods, which seemed ok ...
I'm somewhat familiar with the TSP literature, and I doubt there's anything matching your criteria; the simpler, less mathematical algorithms were pioneered long before your cutoff.
David S. Johnson and coauthors have some articles that I like: http://www2.research.att.com/~dsj/papers.html , in particular #1 and #3 under Traveling Salesman Problem.
If you want simple, here is one page that describes using space filling curves to find a good solution (not optimal obviously). Of course, a webpage is not a paper. Nor do I know if the ideas presented there were created after 2000. If this is more of what you are looking for, perhaps you should edit your question, or provide an example.
http://www2.isye.gatech.edu/~jjb/mow/mow.html
Here's what you can do:
1) Study chapter 11-Guided Local Search and Chapter 12- Iterated Local Search from Handbook of Metaheuristics(2010), each of these has a section describing how GLS and ILS are designed for TSP. Both ILS and GLS are interesting and quite easy to implement.
2) Check this paper: "Guided local search and its application to the traveling salesman problem"
3) Find the Ruby code for these algorithms here , and rewrite it in Java

Nesting maximum amount of shapes on a surface

In industry, there is often a problem where you need to calculate the most efficient use of material, be it fabric, wood, metal etc. So the starting point is X amount of shapes of given dimensions, made out of polygons and/or curved lines, and target is another polygon of given dimensions.
I assume many of the current CAM suites implement this, but having no experience using them or of their internals, what kind of computational algorithm is used to find the most efficient use of space? Can someone point me to a book or other reference that discusses this topic?
After Andrew in his answer pointed me to the right direction and named the problem for me, I decided to dump my research results here in a separate answer.
This is indeed a packing problem, and to be more precise, it is a nesting problem. The problem is mathematically NP-hard, and thus the algorithms currently in use are heuristic approaches. There does not seem to be any solutions that would solve the problem in linear time, except for trivial problem sets. Solving complex problems takes from minutes to hours with current hardware, if you want to achieve a solution with good material utilization. There are tens of commercial software solutions that offer nesting of shapes, but I was not able to locate any open source solutions, so there are no real examples where one could see the algorithms actually implemented.
Excellent description of the nesting and strip nesting problem with historical solutions can be found in a paper written by Benny Kjær Nielsen of University of Copenhagen (Nielsen).
General approach seems to be to mix and use multiple known algorithms in order to find the best nesting solution. These algorithms include (Guided / Iterated) Local Search, Fast Neighborhood Search that is based on No-Fit Polygon, and Jostling Heuristics. I found a great paper on this subject with pictures of how the algorithms work. It also had benchmarks of the different software implementations so far. This paper was presented at the International Symposium on Scheduling 2006 by S. Umetani et al (Umetani).
A relatively new and possibly the best approach to date is based on Hybrid Genetic Algorithm (HGA), a hybrid consisting of simulated annealing and genetic algorithm that has been described by Wu Qingming et al of Wuhan University (Quanming). They have implemented this by using Visual Studio, SQL database and genetic algorithm optimization toolbox (GAOT) in MatLab.
You are referring to a well known computer science domain of packing, for which there are a variety of problems defined and research done, for both 2-dimnensional space as well as 3-dimensional space.
There is considerable material on the net available for the defined problems, but to find it you knid of have to know the name of the problem to search for.
Some packages might well adopt a heuristic appraoch (which I suspect they will) and some might go to the lengths of calculating all the possibilities to get the absolute right answer.
http://en.wikipedia.org/wiki/Packing_problem

Resources