2
In the image above I have mapped the separation positions within the warehouse where I work. I need to calculate how far the person you’re separating travels inside the warehouse. For example if the person is separating in the position 1AF-001-10 and moves to the position 1AD-013-10 if I calculate only X and Y he will calculate in a straight line but it will be wrong I need him to go through the points of intersection there is the problem. I don’t know how I’m gonna get him to understand which points he needs to pick up to calculate the right route when he gets off the streets he’s been searing. I placed the points of intersection that would be these links... and the right I just couldn’t figure out how to make him understand which points he needs to take. For example in this case the above should be calculated as follows:
De Para
1AF-001-10 || 1AD-013-10 = soma(valor1,valor2,valor3)
That is to say :
De Para
1AF-001-10 || interseçãoE = valor1
De Para
interseçãoE || interseçãoD = valor2
De Para
interseçãoD || 1AD-013-10 = valor3
Hello, good morning... first thank you for the answer, the problem is that I do not have access to all tools in our bank and there are things like this that you suggest I do not have access to do, I can only select and some functions this makes it difficult enough
– Ariel Gonçalves
If you have access to the database to select, nothing prevents you from creating a small program that queries that database, creates the graph and applies the algorithm.
– cantoni
Mr Cantoni is absolutely right. If you have the De-for individual and the distance between each, you can take the data and build such a program. Unfortunately, you’ll need to study some of the references he gave you. But one problem you will certainly have is that making this calculation every query can become computationally unfeasible (especially if many queries occur). Assuming that the locations do not change (because they are fixed in the warehouse), the ideal would be for you to pre-calculate the possible routes and store them in another table. Then your query becomes trivial. :)
– Luiz Vieira
Poxa now I felt like a donkey with you talking that is easy kkkkk. I will start searching why I am beginner in sql. but thank you so much for the tips, I’ll see what I can do
– Ariel Gonçalves
@Arielgonçalves, your challenge will not be in SQL, but in programming it in some language. There is a lot of support on the Internet. When I say it’s not complicated, it’s from my point of view. I completely understand your difficulty, but I can say that if you persist, you will get exactly what you want and with several more things that you will think about halfway through. If you like algorithms, it’s a great way to go. A tip: There are already frameworks and ready-made graph libraries. Mount the graph with database information and choose the algorithm.
– cantoni