473,382 Members | 1,775 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,382 software developers and data experts.

Simulation Programming Skills and Python

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
Mar 6 '06 #1
4 2754
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.

Mar 6 '06 #2
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

Mar 6 '06 #3

Richard Blackwood wrote:
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

Thank you all!

- Richard Blackwood


Mar 6 '06 #4
On Mon, 06 Mar 2006 10:48:46 -0500, Richard Blackwood wrote:
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.

--
USB Priests for only 10$
Mar 7 '06 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Steaming Balturd | last post by:
are there any php based economic simulations out there - not trading games per se, but more like simulating an economy, be it running a business or running a government? All i've been able to...
2
by: Samir Patel | last post by:
For last couple of weeks, I was doing lot of research on various simulation libraries. Only one I find in python is http://simpy.sourceforge.net. It is very powerful, but it seems that it does not...
19
by: Nicolas Pernetty | last post by:
Hello, I'm looking for any work/paper/ressource about continuous system simulation using Python or any similar object oriented languages (or even UML theory !). I'm aware of SimPy for...
6
by: bambooforest | last post by:
Hi all, I'm from a Linguistics background and am new(er) to programming. Could someone recommend a book or resource that teaches programming aspects with Python? Python I hear is a very...
12
by: alimoe | last post by:
I am interested in coding an app which uses physics and 3d and neural nets and genetics. Any pointers?
0
by: kirby.urner | last post by:
. === Although I haven't been invited to keynote in Dallas -- although I did volunteer (given my considerable experience) -- I thought a next best thing would be to lead by example, and...
0
by: Jeff Rush | last post by:
(inspired by a thread on the psf-members list about Python certification) Those who know me know I am no fan of the programmer certification industry and I agree that your typical certificate...
13
by: btkuhn | last post by:
Hi guys, I'm learning Python by teaching myself, and after going through several tutorials I feel like I've learned the basics. Since I'm not taking a class or anything, I've been doing...
0
by: Stef Mientki | last post by:
hi Ben, btkuhn@email.unc.edu wrote: I'm working on an open source alternative for MatLab / LabView (math again ;-) and there's still a lot to do - (re-)design of the core engine (multi...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.