Simulation Programming Skills and Python

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Richard Blackwood

    #1

    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
  • Lonnie Princehouse

    #2
    Re: Simulation Programming Skills and Python

    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.

    Comment

    • bearophileHUGS@lycos.com

      #3
      Re: Simulation Programming Skills and Python

      Richard Blackwood:
      [color=blue]
      >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?<[/color]

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

      [color=blue]
      >Python a good language for simulation programming?<[/color]

      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

      Comment

      • gene tani

        #4
        Re: Simulation Programming Skills and Python


        Richard Blackwood wrote:[color=blue]
        > 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?
        >[/color]

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




        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

        [color=blue]
        > Thank you all!
        >
        > - Richard Blackwood[/color]

        Comment

        • Mc Osten

          #5
          Re: Simulation Programming Skills and Python

          On Mon, 06 Mar 2006 10:48:46 -0500, Richard Blackwood wrote:
          [color=blue]
          > Two, is
          > Python a good language for simulation programming?[/color]

          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$

          Comment

          Working...