Solved

Traffic simulator in container shipping yard

Posted on 2013-02-05
5
165 Views
Last Modified: 2013-02-11
Hello again, Experts!

I have been tasked by my manager to write an app that would simulate traffic in a container shipping yard.  The premise is that there are 8 entry gates that trucks could come in, wait for a minute to complete their transaction, then move on to the drop-off point.  My problem is that when two or more trucks overlap within the 1 minute interval, the next truck should get in through the next available gate while the previous truck continues its process.  So I am thinking that this would most likely employ multi-threading.

I have only been writing apps using VB.NET for a little over a year and I am still learning new things everyday. However, most of the apps I've written merely involves data access and reporting, which I'm already comfortable with.  This is the first time that I would be writing a simulator app so any ideas or references you could point me to would be very much appreciated.

Thanks!
Rick0124
0
Comment
Question by:Rick0124
  • 3
5 Comments
 
LVL 75

Expert Comment

by:käµfm³d 👽
ID: 38856785
Not to question your abilities, but a year isn't a great deal of experience, and multi-threading is a very advanced topic--very easy to screw up. Are you sure you're ready for something of that caliber?

Not attempting to dissuade you, but I don't want to BS you either  : )
0
 

Accepted Solution

by:
Rick0124 earned 0 total points
ID: 38856818
Thanks, Kaufmed.  

I understand that multi-threading is very advanced indeed for my experience that is why I am also open to other suggestions.  But I would rather learn it the hard way than have this work outsourced, LOL!

If you have links that I could read about or maybe even watch, I would very much appreciate it.

Regards,
Rick0124
0
 
LVL 12

Expert Comment

by:profgeek
ID: 38859943
What you're wanting to do is a system simulation, which is best done using a language specifically tailored for that task.  In the old (mainframe) days we used GPSS (General Purpose System Simulation), but it's not easy to find anymore.  There are some simulation language packages, however:

http://www.wolverinesoftware.com/   (uses GPSS/H)

http://webgpss.com/index.html  (web GPSS)

http://www.minutemansoftware.com/simulation.htm

Simulations are very difficult to program from scratch, as they are based upon statistical modeling.  I used to give my advanced VB students a "simple" one line / one server simulation to write in VB and it was over most of their heads.  Even advanced VB programmers would be hard-pressed.  It's not the programming, it's the conceptual framework of a real-time simulation where you are modeling reality.  First of all, there are myriad parameters you need to input to your model.  Second, there are variations in run-time variables like arrival times, service times, resource availability, dependancies, etc..  It is well worth the time and money to learn and use something like GPSS, where the statistical algorithms are already built in.  

One more thing is that simulation does require a working knowledge of statistics.  If you are rusty there, but have some background, you can probably refresh as you go.  If you have no statistical background, you will be in over your head in no time at all.
0
 

Author Comment

by:Rick0124
ID: 38860329
Thank you for the suggestion, ProfGeek.  You are spot on with the parameters required for the simulator app I am trying to write.  I surely would like to be in one of your classes! :)  I will look at the links you provided and go from there.

Thanks again!
Rick0124
0
 

Author Closing Comment

by:Rick0124
ID: 38875499
Although ProfGeek's answer did not directly answer my question, it did however, gave me ideas on where to go from there.
0

Featured Post

Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In my previous two articles we discussed Binary Serialization (http://www.experts-exchange.com/A_4362.html) and XML Serialization (http://www.experts-exchange.com/A_4425.html). In this article we will try to know more about SOAP (Simple Object Acces…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…
This video shows how to quickly and easily add an email signature for all users on Exchange 2016. The resulting signature is applied on a server level by Exchange Online. The email signature template has been downloaded from: www.mail-signatures…

773 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question