Shortest way in C# Target is: Input.txt --- Calculation --- Output.txt

M

Martin Stöferle

Hello,

I have a list with 15 and/or n positions.
The goal should be of generating a new list
with the shortest processing sequence.

Background is:
I have a drilling table with engines for X Y.
(x1, y1) (x2, y2) (x3, y3)

How can I make it?

POS x y Input.txt
_________________________
..1..126,13 66,25
..2..266,34 66,25
..3..406,56 66,25
..4..126,13 127,84
..5..266,34 127,84
..6..406,56 127,84
..7...11,45 140,27
..8..151,59 140,27
..9. 291,73 140,27
10. 11,45 201,86
11. 151,59 201,86
12. 291,73 201,86
13. 11,45 263,46
14. 151,59 263,46
15. 291,73 263,46


Target

Class in C# ---- calulate

Optimize list
POS x y Output.txt
_________________________
.1.. ? ?
.2..
.3..
.4..
.5..
.6..
.7..
.8..
.9.
10.
11.
12.
13.
14.
15.

Questions:
a) I look for a sample program,
to send my list.

-- Translate ---

Answer: Is the the optmized list.
Gladly also as text format.
Someone can help me.
Input.txt --- Calculation --- Output.txt
b) Best one should also understand it,
not only a black box.
There is a step by step instruction, understandable explanation.

Thank you.

Best regards
Martin

Maybe like this
http://de.wikipedia.org/wiki/Problem_des_Handlungsreisenden
But how is the correct way.

1. Read the Input file
2. Calculate the distance, how? the formular?
3.
4.
5.
...
n.
 
T

tony lock

What you are describing is what is normally called the travelling salesman
problem, I suggest you look up solutions to it.

PS it is not simple.
 
M

Martin Stöferle

Hello,
What you are describing is what is normally called the travelling salesman
problem, I suggest you look up solutions to it.

PS it is not simple.
Yes you are right.

Do you have a good sample?
Read the file
Analyse
Write the optimize list, way.

Greats Martin
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top