制定火车指南 [英] Developing a train guide

查看:85
本文介绍了制定火车指南的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想做一个可以帮助找到最佳路线的应用程序。



例如,乘坐火车从一个车站到另一个车站。有些车站要求我们换乘火车。



我不需要知道解决方案,我该怎么做?我不是要求解决方案或简单的出路。



我尝试过:



我尝试使用谷歌搜索,提出了旅行销售算法/ A *算法,但对于像我这样的初学程序员来说,它们看起来真的很复杂。我正在使用C#。任何小技巧都会对我有帮助。

I want to do an Application that can help find the best route possible.

Example, Taking a train from one station to another. Some stations require us switching trains.

I don't have to know the solution, How do i start this? I am not asking for solutions or easy way out.

What I have tried:

I tried googling, Came up with Travelling Sales algorithm/A* algorithm but they really look so complicated for a beginner programmer like me. I am working with C#. Any small tips will help me.

推荐答案

欧几里得和曼哈顿距离算法是解决距离问题最常用的方法,相对容易实现。如果您是第一次遇到这样的问题,那么您可以先在线查看距离问题,这将有助于您更好地理解问题陈述,然后寻找解决方案。以下是您开始查看的一些参考资料。



如果有帮助请告诉我。



在python中实现五种最常用的相似性度量 [ ^ ]



数学 - 计算C#中与欧几里德,曼哈顿和切比雪夫的距离 - 代码审查堆栈交换 [ ^ ]



https://www.codeproject.com / questions / 645917 / manhattan-distance-csharp
Euclidean and Manhattan distance algorithms are most commonly used approaches to solve distance problems and are relatively easier to implement. If you are into such problems for the first time then you can first start to look at distance problems online, that will help you develop understanding your problem statement better and then look for solution. Below are few references for you to start looking at.

Let me know if that helps.

Five most popular similarity measures implementation in python[^]

mathematics - Calculating distance with Euclidean, Manhattan, and Chebyshev in C# - Code Review Stack Exchange[^]

https://www.codeproject.com/questions/645917/manhattan-distance-csharp


你已经发布了几乎相同的阙提示:编辑问题 [ ^ ]

并接受了答案。第一个问题出了什么问题?

You already posted almost the same question: Editing a Question[^]
and accepted an answer. What is wrong in first question?
Quote:

我想做一个可以帮助找到最佳路线的应用程序可能。

I want to do an Application that can help find the best route possible.



您首先需要定义什么是最佳路线,什么使路线比另一路更好。


You first need to define what is the best route, what makes a route better than another.

引用:

但对于像我这样的初学程序员来说它们看起来真的很复杂。

but they really look so complicated for a beginner programmer like me.



算法看起来很复杂,因为它们很复杂,找到最佳路径是一个难题,有效的解决方案很复杂。如果你真的是初学者,这个问题太复杂了,因为你缺乏必要的背景。

这就像试图通过赢得一级方程式赛车的高价来学习驾驶汽车一样,它不起作用。

编程已经教给了数百万人,什么有效,什么不知道,这就是教师教学方式的原因,这是一种简单的方法。



我的建议:暂时搁置这个项目并学习更简单的项目,然后再回到这个项目。


Algorithms look complicated because they are complicated, Finding best path is a hard problem, efficient solutions are complicated. If you are really a beginner, such problem is too complicated because you lack necessary background.
It is like trying to learn to drive a car by winning a Formula 1 grand price, it don't work.
Programming have been teach to millions of people, what works and what don't is known and that is the reason teachers are teaching the way they are, it is the easy way.

My advice: put this project aside for now and learn with simpler projects, then come back to this project.


这篇关于制定火车指南的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆