samedi 9 janvier 2016

Design consideration when design a simple simulator

I'm trying to create a simple simulator in C#, which should simulate a very simple car engine. The simulator can either be on or off, and it will, for instance, have the following inputs (there will possibly come more in the future).

Use case:

In this example, the car engine will have the follow input parameter:

  • Thrust produced (0-100%)
  • Temperature (-50C to 300C)
  • NOS (enabled/disabled)
  • Driving mode (economy / normal / speed)
  • On/Off

These input parameter will alter the following two output parameter:

  • Thrust produced (0-150%)
  • Temperature (-50C to 300C)

If for instance the driving mode is set to economy, the maximum thrust which it can output will be e.g. 70%. NOS will also alternate the output somehow. The simulator will have an event handler, were the computed values for thrust and temperature will be announced.

Question:

I'm asking for some input on how this simulator easiest can be designed, so it can be extended with new input parameter later on. Any good design pattern you would recommend or articles? Feel free to ask questions or show your best solution :)

Thanks in advance

Aucun commentaire:

Enregistrer un commentaire