虽然我理解模拟和模拟的一般含义,但我几乎总是对它们感到困惑。假设我创建了一个模仿现有硬件/软件的软件,我应该如何称呼它?模拟器还是模拟器?
有人能从编程的角度来解释一下吗?
福利:这两个词在英语中有什么区别?(对不起,我的母语不是英语:))
虽然我理解模拟和模拟的一般含义,但我几乎总是对它们感到困惑。假设我创建了一个模仿现有硬件/软件的软件,我应该如何称呼它?模拟器还是模拟器?
有人能从编程的角度来解释一下吗?
福利:这两个词在英语中有什么区别?(对不起,我的母语不是英语:))
当前回答
两者都是对象的模型,您可以通过某种方式控制对象的输入和观察对象的输出。
关键的区别在于:
使用模拟器,您希望输出与所模拟的对象将产生的结果完全匹配。 使用模拟器,您希望输出的某些属性与对象将产生的类似。
让我举个例子——假设你想做一些系统测试,看看在系统中添加一个新的传感器(比如温度计)会如何影响系统。你知道温度计每秒发送8次包含其测量值的信息。
模拟——如果你还没有温度计,但是你想测试这个消息速率不会使你的系统过载,你可以通过附加一个每秒发送8次随机数的单元来模拟传感器。您可以运行任何不依赖于传感器发送的实际值的测试。
模拟——假设你有一个非常昂贵的温度计,测量值为0.001 C,你想看看是否可以使用一个更便宜的温度计,只能测量到最近的0.5 C。你可以使用一个昂贵的温度计模拟更便宜的温度计,然后将读数四舍五入到最近的0.5 C,并运行依赖于温度值的测试。
注意,模拟也可以用于预测或预测行为。有限元分析模拟应用于许多领域,包括天气预报和虚拟风洞。
术语的定义:
竞赛——超越或完全匹配 模仿——模仿外表或性格
其他回答
词语的定义最好地描述了差异。谷歌搜索给出了以下模拟和仿真的定义:
模仿…的外表或特征。
模仿,赶上或超越(某人或某项成就),通常是通过模仿。
仿真模拟一个系统。仿真可以很好地模拟一个系统,从而可以取代它,甚至可能超过它。
在计算中,模拟将是它所模拟的系统的替换。通常情况下,它甚至会超越它所模仿的系统。例如,游戏控制台模拟器通常会做一些改进,比如更好的硬件兼容性、更好的性能和更好的音频/视频质量。
另一方面,模拟由于是模型而受到限制。它们是模拟系统的最佳尝试,而不是系统的替代品。有硬件模拟器,因为硬件可以被模仿,而且很难区分。没有种植模拟器,因为没有仿真可以取代实际的种植。我们只能模拟一种耕作模式,以了解如何更好地耕作。
我不认为模拟器和模拟器可以比较。两者都模仿某些东西,但不是同一推理范围的一部分,它们不在同一上下文中使用。
简而言之:模拟器被设计用来复制原始程序的某些特性,甚至可以在真实环境中替换它。模拟器的设计不是为了复制原物的特征,而是为了在人类看来与原物相似。没有了原有的功能,仿真器无法在实际环境中代替原有的功能。
An emulator is a device that mimics something close enough so that it can be substituted to the real thing. E.g you want a circuit to work like a ROM (read only memory) circuit, but also wants to adjust the content until it is what you want. You'll use a ROM emulator, a black box (likely to be CPU-based) with a physical and electrical interfaces compatible with the ROM you want to emulate. The emulator will be plugged into the device in place of the real ROM. The motherboard will not see any difference when working, but you will be able to change the emulated-ROM content easily. Said otherwise the emulator will act exactly as the actual thing in its motherboard context (maybe a little bit slower due to actual internal model) but there will be additional functions (like re-writing) visible only to the designer, out of the motherboard context. So emulator definition would be: something that mimic the original, has all of its functional features, can actually replace it to some extend in the real world, and may have additional features not visible in the normal context.
A simulator is used in another thinking context, e.g a plane simulator, a car simulator, etc. The simulation will take care only of some aspect of the actual thing, usually those related to how a human being will perceive and control it. The simulator will not perform the functions of the real stuff, and cannot be sustituted to it. The plane simulator will not fly or carry someone, it's not its purpose at all. The simulator is not intended to work, but to appear to the pilot somehow like the actual thing for purposes other than its normal ones, e.g. to allow ground training (including in unusual situations like all-engine failure). So simulator definition would be: something that can appear to human, to some extend, like the original, but cannot replace it for actual use. In addition the pilot will know that the simulator is a simulator.
我认为我们不会看到ROM模拟器,因为ROM不与人类交互,我们也不会看到任何平面模拟器,因为在现实世界中,飞机无法有一个替代物来执行相同的功能。
在我看来,模拟器或模拟器中的模型可以是任何东西,并且不必与原始模型相似。一个ROM模拟器模型将很可能是软件而不是硬件,MS飞行模拟器不能比它更软件。
这两个术语的比较将与当前选择的答案(来自Toybuilder)相矛盾,后者将差异放在内部模型上,而我的建议是,差异在于假的是否可以用于执行实际世界中的实际功能(确实在某些可接受的范围内)。
注意,飞机模拟器还必须模拟地球、太阳、风等,这些都不是飞机的一部分,所以飞机模拟器必须模拟飞机的某些方面,以及飞机的环境,因为它不是在这个实际环境中使用,而是在一个训练室中使用。
This is a big difference with the emulator which emulates only the orginal, and its purpose is to be used in the environment of the original with no need to emulate it. Back to the plane context... what could be a plane emulator? Maybe a train that will connect two airports -- actually two plane steps -- carrying passengers, with stewardesses onboard, with car interior looking like an actual plane cabin, and with captain saying "ladies and gentlemen our altitude is currenlty 10 kms and the temperature at our destination is 24°C". Its benefit is difficult to see, hum...
总之,模拟器是一个真实的东西,旨在工作,模拟器是一个假的,旨在欺骗用户。
仿真器是一个系统的模型,它可以接受被仿真系统可以接受的任何有效输入,并产生相同的输出或结果。所以你的软件就是一个模拟器,只要它能精确地再现被仿真系统的行为。
To understand the difference between a simulator and an emulator, keep in mind that a simulator tries to mimic the behavior of a real device. For example, in the case of the iOS Simulator, it simulates the real behavior of an actual iPhone/iPad device. However, the Simulator itself uses the various libraries installed on the Mac (such as QuickTime) to perform its rendering so that the effect looks the same as an actual iPhone. In addition, applications tested on the Simulator are compiled into x86 code, which is the byte-code understood by the Simulator. A real iPhone device, conversely, uses ARM-based code.
相比之下,模拟器模拟真实设备的工作。在模拟器上测试的应用程序被编译成实际设备使用的实际字节码。仿真器通过将字节码转换为可由运行仿真器的主机执行的形式来执行应用程序。
为了理解模拟和模拟之间的微妙区别,假设您试图说服一个孩子玩刀是危险的。为了模拟这种情况,你假装用刀割伤自己,并痛苦地呻吟。为了模仿这一点,你真的会割伤自己。
模拟是一种行为类似于其他事物,但以完全不同的方式实现的系统。它提供了系统的基本行为,但不一定遵守被模拟系统的所有规则。它的存在是为了让你了解事物是如何工作的。
模拟是一种行为完全类似于其他系统的系统,并且遵守所模拟系统的所有规则。它实际上是另一个系统的完全复制,甚至与仿真系统的输入和输出二进制兼容,但在与原始仿真系统的环境不同的环境中运行。规则是固定的,不能更改,否则系统会失败。