Overcoming the 23 point restriction on Google Maps - google-maps-markers

I am looking for a way to overcome the 23 point restriction to address a larger (1000) number of points for a larger number of vehicles(10).
As a result a type of genetic algorithm implementation should be followed for this process to be achieved.
Anybody who has documentation or solution on that would be extremely helpful.

Related

How do I implement the Gaussian mutation method in my genetic algorithm?

I am doing a research paper on a specific genetic algorithm and wanted to analyse the influence of using the Gaussian mutation method. However, the only thing I understand is that I have to sample a random Gaussian value and add that to the gene I have read somewhere on the internet that the mean should be 0, which I understand; this gives us negative as well as positive values. However, I have not found a single source that gave an example of what the std. dev should be or how it should be calculated.
Does anyone know how the standard deviation is determined using Gaussian mutation method so I can get a value from it?
I have read the question and answers of this question here on StackOverflow, but it does not provide me with any details regarding my problem.
What a reasonable (or even the optimal)mutation strength is, depends on the problem to be solved.
Usually you apply Genetic Algorithms to very hard optimization problems for that usual optimization algorithms fail. You can imagine the possible „solutions“ to such an optimization problem as a fitness landscape with high peaks for good solutions and valleys for bad ones.
So if your problem corresponds to a landscape with many peaks of similar height spread out widely (how do you know?), you should use a broad Gaussian distribution so that your chance to find the maximum peak is higher. If you believe however that you have already a pretty good solution (whatever this is) you could use a smaller distribution to find the maximum faster.
So a reasonable approach is to start with a broad distribution and let the population develop towards a (local) maximum by reducing the distribution width.
Again, the concrete numerical values must be derived from the problem.
EDIT:
If you want to play a little with the effects, you could download my free iPhone/iPad app "Steinertree" that shows the effects of varying mutation strength and population size.

Algorithm for calculating most efficient grouping

I have quite a strange question on my hands.
I have a list (~500 entries) of lengths of wooden beams in different sizes, such as 3400mm, 1245mm, 900mm, etc.
The maximum length of a wooden beam is 5400mm and in order to reduce the amount of wood being wasted I want to find an algorithm that tries every possible way to combine the smaller sizes to fit into 5400mm beams or as close as possible.
So let's say I have five different lengths: 3000, 1000, 300, 2000, 900 I would end up with:
3000+2000+300 = 5300 // The closest combination to 5400, meaning the amount of wood being wasted is only 100mm on this beam.
1000+900 = 1900 // The rest
I'm not sure if this qualifies for the traveling salesman problem and I have only begun to imagine what the algorithm might look like. But since there are so many smart people with combinatory skills here I just wanted to throw it out there before I bang my head bloody.
To make things even worse
Let's say we do find a solution to the problem above. The guys over at the wood shop rarely delivers 5400mm beams but it can range from 3000 to 5000 in 100mm intervals.
So I'll get a list of beam lengths from them on delivery.
Would it be possible to match the list "this is the beams I got" with the list "find out the best combination of the required beam lengths"?
I'm not sure if it's worth it in the end but any help is appreciated.
Kind regards
Richard
This is the Cutting Stock Problem in 1 dimension. It's reducible to the Knapsack problem so it is in fact NP-complete, but it's generally tractable and in cases where it isn't many good approximate solutions exist, because this is an insanely important problem in industry.
It's typically solved exactly using dynamic programming, which is kind of a mindfuck, but you can find plenty of example implementations to help you out. Approximate polynomial time solutions typically call the dynamic programming code (which has pseudo-polynomial complexity) at various points, and the surrounding code is simpler. I guess the take home message here is don't try to write it yourself, find someone else's code and port it to your language and application environment.

Best algorithm to fill pages with collages

I'm working on an algorithm to fill a book with a number of pictures.
Each has a single picture of an collage of 8, 10 or 12 pictures.
There is a constraint on the maximum pages in the book.
I need an efficient algorithm to get layout the pages so that:
All pictures are used
The number of pages is as close to the maximum as possible
I could resolve this with a little recursion but I recently read something about Dynamic Programming and figured this might be a good problem for DP.
Having absolutely zero experience with DP I did some research but I didn't find a good example/tutorial that describes a problem like this.
Could someone give me a explanation about how and where to start?

Resource distribution w.r.t. individual capacity - is it a Knapsack problem?

I have a problem as follows:
I have few office locations and resources with different capabilities (integer numbers).
I want to distribute all the resources to different office locations to find the best way to divide them almost equally among the locations so that the capabilities of all the office locations are balanced as much as possible. Couple of things to keep in mind:
• Difference between number of resources in each office location should not be more than one.
• The capability of each office location (reached by adding individual capability) should be nearly equal as possible to each other.
I have researched over the internet and came to know about Knapsack algorithm and Bin-pack algorithm which sounds close to this problem.
Example:
Number of office locations = 3;
Number of people = 8;
People capability = 10, 20, 5, 150, 90, 200, 250, 140 (capabilities values of the 8 resources);
The above numbers are just sample. It can grow to 1000+ for resources and respective capabilities value. Number of office locations can be varied too.
I didn't start the programming part unless I am sure that the path that I am going to take it correct. I am requesting your help to guide me to a correct direction to solve this.
Also, if you can share a probable pseudo code for this, will be a great help.
Thanks!
This is the knapsack problem or is at least as difficult (consider an instance where there are only two offices), so obtaining the best solution will be very difficult. You may try to use some generic optimization heuristic like simulated annealing: http://en.wikipedia.org/wiki/Simulated_annealing

How calculate minimal waste when tailoring tubes

I have a rather mathematical problem I need to solve:
The task is to cut a predefined number of tubes out of fixed length tubes with a minimum amount of waste material.
So let's say I want to cut 10 1m tubes and 20 2,5m tubes out of tubes with a standardized length of 6m.
I'm not sure what an algorithm for this kind of problem would look like?
I was thinking to create a list of variations of the different sized tubes, fit them into the standard sized tubes and
then choose the variation with the minimal waste.
First I'm not sure if there are not other and better ways to attack the problem.
Second I did not find a solution HOW I would create such a variations list.
Any help is greatly appreciated, thanks!
I believe you are describing the cutting stock problem. Some additional information can be found here.
This is known as the Cutting Stock problem. Wikipedia has a number of references that might help you find clues to an algorithm that works.

Resources