Simulation Programming Skills and Python

  • Thread starter Richard Blackwood
  • Start date
R

Richard Blackwood

Hello all. I have a few questions about simulation programming. One, do
all programmers know to how to code a simulation? By simulation I mean a
model of real world relationships (i.e. like Civilization which is a
simulation of ruling nations through various historical settings). For
example, could someone who codes word processing application necessarily
know how to do a simulation of economic relationships between banks and
enterprises if he/she had access to an economist? Is the skill of being
able to translate in one's head realworld relationships into a model
represented by code an inherent/native skill of all programmers? Two, is
Python a good language for simulation programming?

Thank you all!

- Richard Blackwood
 
L

Lonnie Princehouse

Object oriented languages lend themselves fairly well to this sort of
modeling, and a strong programmer in any language should be able to
take a good description of a well thought-out model and write some code
for it.

However, by far the harder part is designing a good model. Asking
whether all programmers are capable of that is sort of like asking
whether all carpenters are architects.

As for Python, it's a good language for prototyping. The development
cycle moves very fast, so one can experiment with many different ideas
more quickly than in Java or C++. The price, however, is execution
speed. There are extension modules like the scipy suite which can
reclaim some lost speed, but Python will generally be slower than
compiled languages.
 
B

bearophileHUGS

Richard Blackwood:
Is the skill of being able to translate in one's head realworld relationships into a model represented by code an inherent/native skill of all programmers?<

I don't think so. Creating a good computational model can be a complex
art.

Python a good language for simulation programming?<

It depends on the type of simulation. Python can be good to create a
prototype of the simulation program, and it can be good if the
simulation doesn't require much number crunching that cannot be
vectorized :)
If the simulation require a lot of number crunching, but such
operations can be done with Numarray and the like, then you can
probably use Python or Mathematica, or similar systems.
Otherwise you may need a hybrid program (Python + Pyrex, Swig, or f2py,
ShedSkin, etc).

Bye,
bearophile
 
G

gene tani

Richard said:
Hello all. I have a few questions about simulation programming. One, do
all programmers know to how to code a simulation? By simulation I mean a
model of real world relationships (i.e. like Civilization which is a
simulation of ruling nations through various historical settings). For
example, could someone who codes word processing application necessarily
know how to do a simulation of economic relationships between banks and
enterprises if he/she had access to an economist? Is the skill of being
able to translate in one's head realworld relationships into a model
represented by code an inherent/native skill of all programmers? Two, is
Python a good language for simulation programming?

The 2nd question is easy: python is excellent for your purpose, you'll
find lots of examples googleing for "python discrete event simulation",


http://simpy.sourceforge.net/

libs for linear algebra, statistics /probability / sampling, OR
algorithms, (both native libs and hooks to C/Fortran libs like GSL,
LAPACK etc.

The 1st question is open-ended, it's kind of like asking are
mathematicians good at music by disposition on average? (or something
like that) When you're modeling a knowledge domain with a developer
who doesn't master the details of the domain, you have to have
incredible specifications and testing, at all levels of the model
 
M

Mc Osten

Two, is
Python a good language for simulation programming?

Civilization 4 is (partly) written in Python. I suppose they thought Python
was a good language for that. I said partly because as far as I know some
code is C++ for speed reasons.
 

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

Members online

Forum statistics

Threads
473,755
Messages
2,569,537
Members
45,020
Latest member
GenesisGai

Latest Threads

Top