Large Vensim models and memory

Use this forum to post Vensim related questions.
Post Reply
John Swanson
Member
Posts: 23
Joined: Mon Jan 10, 2005 12:39 pm

Large Vensim models and memory

Post by John Swanson »

I have an unusually large vensim model, used for urban modelling. Because it uses zones to model large geographic areas it uses a lot of large arrays, and I have trouble with it hitting a maximum memory limit. I use 32 bit Windows 7 with 4GB RAM, which is the maximum RAM Win7 can use.

The 64 bit version of Windows allows access to 192GB RAM, which could transform the situation. So my question is: am I right? If I use Vensim under the 64 bit version of Windows, will I be able to access that much RAM?

(To illustrate, with 700 zones I need lots of arrays with 700*700=490,000 elements. They have to be split by different types of people and activity, and so it quickly builds up. I've used external C++ functions to improve memory efficiency but I still get the dreaded message 'not enough memory to allocate xxxx handles', where xxxx is a big number).
Administrator
Super Administrator
Posts: 4597
Joined: Wed Mar 05, 2003 3:10 am

Re: large Vensom models and memory

Post by Administrator »

Hello John,

Vensim itself is only available in a 32 bit build at the moment, so running it on Windows x64 will make no difference.

If each zone really needs to be able to reference each other zone, there is little you can do for now. But if 1 zone only references maybe 4 others, I'd combine the two zones into one subscript range (zone to zone). That way you might end up with maybe 2000 elements in zone to zone rather than the 490k.

We do have plans for a x64 build of Vensim (I'm actively working on it at the moment).

Tony.
Advice to posters seeking help (it really helps us to help you)
http://www.ventanasystems.co.uk/forum/v ... f=2&t=4391

Units are important!
http://www.bbc.co.uk/news/magazine-27509559
gwr
Senior Member
Posts: 209
Joined: Sun Oct 04, 2009 8:40 pm
Vensim version: DSS

Re: Large Vensim models and memory

Post by gwr »

Hi John,

you are as it sounds working on a similar problem that we have been working on here. In our case it was classical, zone-based transportation modeling. I had this issue (dealing with bigger models) up in a post last year, so you might take a look:

http://www.ventanasystems.co.uk/forum/v ... f=2&t=4591

In transportation modeling you can't reasonably use someting like a von Neumann neighborhood restricting the neighborhood on 4 or 8 cells. Since people go further than that obviously. So the flattening of the subscript range does not work out here.

From our experience 64bit will not help when going to 700+ cells since the SD modeling paradigm starts to become the problem: You keep too many boxes ('stocks') in the game. For that reason we have started to use a hybrid approach mixing microsimulation and SD (you just look at a fraction of the population and their attributes like station 1,2,..,n in a day) - while handling feedback on a global level. That speeds up things and keeps memory clean.

Kind regards,

Guido

PS: We still have not quite figured how Vensim handles memory. In the usual case everything is stored so you can look at it for graphs etc. Essentially if you needed it you could (if you stuck to simple continuous formula) just store the stocks (for the last t) and then 32 Bit should carry you very far indeed. But somehow Vensim seems to need more than that even with 'Minimum Memory Flag' activated.
Post Reply