Related Entries

Quick Ref: SVN command line
Git with Dropbox
Cisco's new urbanism
Portable development links
Wish I had this 10 years ago

« Fall Foliage in East Coast
» Blair blames Indian Firms?

StarLogo

Great real life modeling tool.

StarLogo is a programmable modeling environment for exploring the workings of decentralized systems -- systems that are organized without an organizer, coordinated without a coordinator. With StarLogo, you can model (and gain insights into) many real-life phenomena, such as bird flocks, traffic jams, ant colonies, and market economies.

via Sanjay.

Last year, I had worked with conservation scientists to develop a methodology for analyzing influence of various factors on threats to conservation sites. Since this was outside of my normal work scope, with limited time (and limited time with scientists), I put together a Visio template and a Python program. The different threats and factors and diagrammed using Microsoft Visio. Each connecting path is given a number indicating the effect of the factor. The Python program then parses the Visio diagram, making a pickle datastore of nodes and path lengths. Reports are generated based on this datastore and feeding it into Microsoft Excel. In Excel, you can quickly see different scenarios by adjusting aggregated path numbers.

I’m seriously thinking of trying to use StarLogo for doing this, instead of Visio. Advantages are:

  1. i found the bit about extracting info from visio using python rather interesting .

    Does python allow vba like access to visio methods ?
    I have been using Jscript/vbscript to do a lot of similar integration stuff.

    What do you think the benefits are of using python compared to using something more 'native' to windows like jscript.

    great weblog though ! I particularly enjoy reading your insights on python (even though i've never used it) .

    Posted by: Ashok on September 27, 2002 02:26 AM
  2. Yes, Python with COM module allow full access to Visio's objects.

    I tried using VBA, because that will make life easier for users when it comes to installation. VBA has all the problems associated with Basic :-) Also, array manipulation in VBA is really bad - it seldom works the way you expect it to. Performance was getting really bad too, especially with large diagrams that have lot of interconnections.

    With Python, data type manipulation is straight forward. Array of classes, classes of arrays, array of array of classes all work the way you expect it to. It is a much cleaner language to read and write. I can't quite figure this out, but the Python code seems to run much faster than VBA code.

    I found it much easy to write logic in Python, then use plugin code for parsing things from Visio, adding it to Excel etc. Essentially, my application use Visio and Excel rather than trying to make Visio use my logic and Excel :-)

    Posted by: Babu on September 27, 2002 09:02 AM