Showing posts with label Netlogo. Show all posts
Showing posts with label Netlogo. Show all posts

5 Movies on Particles, Agents and Emergent Behaviour

Crowd, transport and urban simulations are at their roots down to 'Agents' or 'Objects' that are assigned a set of rules as to how to moves in relation to both the environment and other agents around them. 3D Studio Max has a built in 'Crowd and Delegate' system which can be used to assign behaviour and therefore create realistic traffic of pedestrian systems in 3D space.

The movie below displays our first tentative steps to explore emergent behaviour via the introduction of simple rules. The movie starts out with a basic 'wander' behaviour where the agents only knowledge is the shape of the surface. Moving on we assign each of our 'cubes' (of which we have become quite fond of...) a level of vision so they can see ahead and therefore avoid each other and objects in their environment.

Crowd and Delegates - Emergent Behaviour from digitalurban on Vimeo.

Thirdly, the agents seek a 'sphere' which could be viewed as a source of food. While being aware of each other and tweaking the way the cubes move a swarm behaviour emerges. Finally, we introduce competing groups with two priorities, firstly to eat and secondly to stay as a group. The majority choose the group over the food but a couple stray off in search of sustenance and lose the other members.

Previous steps in our visualisation of agent based models are based around a simple flocking examples

This model is an attempt to mimic the flocking of birds, while the resulting motion also resembles schools of fish. The flocks that appear in this model are not created or led in any way by special leader rather, each bird is following exactly the same set of rules, from which flocks emerge.

We have exported the model into 3D Max providing the visualisation below, as ever these are early days but the results seem to run well with 300 'birds' over 1000 frames. The birds are rendered as cubes at the moment for proof of concept:


Flocking in NetLogo exported to 3D Max from digitalurban on Vimeo.

Music "Funkmelon Blooz" (Electronica)

The birds follow three rules: "alignment", "separation", and "cohesion". "Alignment" means that a bird tends to turn so that it is moving in the same direction that nearby birds are moving. "Separation" means that a bird will turn to avoid another bird which gets too close. "Cohesion" means that a bird will move towards other nearby birds (unless another bird is too close). When two birds are too close, the "separation" rule overrides the other two, which are deactivated until the minimum separation is achieved.

The three rules affect only the bird's heading. Each bird always moves forward at the same constant speed.

If we were using the built in Crowd and Delegate system a true 3D flocking system would be possible, but it would be pure visualisation, by importing via NetLogo you gain access to the raw data and thus spatial analysis is possible. It is also quick to model and provides the best of both worlds - 3d visualisation and complex modelling.

While 3D Max is of use for crowd and particle simulation when it comes to modelling complex systems an external package is required, such as NetLogo. The movie below details our first steps at CASA (home of digital urban) to export a basic traffic model from NetLogo into 3D Studio Max. The import script was written by our new PhD student, Ateen Patel and opens up a vast array of opportunities to both visualise and model the city.


Music by The Tedd-Z Cookbook, Aerodrome (Funky Shuffle Remix)

NetLogo is a cross-platform multi-agent programmable modeling environment that is widely. It is particularly well suited for modeling complex systems developing over time. Modelers can give instructions to hundreds or thousands of independent "agents" all operating concurrently. This makes it possible to explore the connection between the micro-level behavior of individuals and the macro-level patterns that emerge from the interaction of many individuals.(Nation Master Encyclopedia).

How does this relate to the city? The next part is to put in real geographical data and to get the agents movies and reacting to each other on a spatial network, more on that to come. Perhaps using a particle system as per the movie below:

Particles in the City from digitalurban on Vimeo.

All of these models are going into our exhibition space previewed below to allow a step by step guide to the principles of agent based modelling.



The virtual exhibition space has been placed on hold due to work pressures on other projects over the last few months but is something we hope to return to soon.

NetLogo and Repast to 3DMax to Unity: ABM Visualisation

Our work on Unity stalled for a while due to another projects and deadlines, but we are back on the case from next week with the aim of providing a quick and easy route to visualise agent based models with an urban theme .

The movie below details where we left off:



The ultimate aim is go from popular agent based modelling packages such as NetLogo or Repast into 3D Max and subsequently out to a game engine.

The movie below shows basic agent based models created directly inside of 3D Max:

Crowd and Delegates - Emergent Behaviour from digitalurban on Vimeo.



Finally, below is output from NetLogo visualised in Max - this is now up and running in Unity so the proof of concept seems to work:

Flocking in NetLogo exported to 3D Max from digitalurban on Vimeo.



All being well we should have a plugin for 3D Max available in the next quarter allowing direct input for agent based models.

Netlogo Import into 3D Max: Tutorial and Code

Flocking in NetLogo exported to 3D Max from digitalurban on Vimeo.

Music "Funkmelon Blooz" (Electronica)

A few months ago readers may remember we posted a series of movies produced using output from NetLogo direct in 3D Max - examples included the flocking simulation above and the basic traffic model below:

NetLogo to 3D Max - Proof of Concept from digitalurban on Vimeo.

Music by The Tedd-Z Cookbook, Aerodrome (Funky Shuffle Remix)

Both proofs of concept the source code and a tutorial are now available the Crowd Simulation Blog by the Ateen Patel a PhD student at CASA. Ateen has written a short tutorial (including the code) and several other posts on how to get information from a simple NetLogo Traffic Model and visualise it in 3D Max from Autodesk.

NetLogo is a cross-platform multi-agent programmable modeling environment that is widely. It is particularly well suited for modeling complex systems developing over time. Modelers can give instructions to hundreds or thousands of independent "agents" all operating concurrently. This makes it possible to explore the connection between the micro-level behavior of individuals and the macro-level patterns that emerge from the interaction of many individuals.(Nation Master Encyclopedia).

CASA, home of digital urban, has a few blogs of note now, the Crowd Simulation Blog is defiantly worth keeping an eye on for those interested in pedestrian modeling...

Flocking: NetLogo to 3DMax

The next step in our visualisation of agent based models is a simple flocking example.

This model is an attempt to mimic the flocking of birds, while the resulting motion also resembles schools of fish. The flocks that appear in this model are not created or led in any way by special leader rather, each bird is following exactly the same set of rules, from which flocks emerge.

We have exported the model into 3D Max providing the visualisation below, as ever these are early days but the results seem to run well with 300 'birds' over 1000 frames. The birds are rendered as cubes at the moment for proof of concept:


Flocking in NetLogo exported to 3D Max from digitalurban on Vimeo.


Music "Funkmelon Blooz" (Electronica)

The birds follow three rules: "alignment", "separation", and "cohesion". "Alignment" means that a bird tends to turn so that it is moving in the same direction that nearby birds are moving. "Separation" means that a bird will turn to avoid another bird which gets too close. "Cohesion" means that a bird will move towards other nearby birds (unless another bird is too close). When two birds are too close, the "separation" rule overrides the other two, which are deactivated until the minimum separation is achieved.

The three rules affect only the bird's heading. Each bird always moves forward at the same constant speed.

If we were using the built in Crowd and Delegate system a true 3D flocking system would be possible, but it would be pure visualisation, by importing via NetLogo you gain access to the raw data and thus spatial analysis is possible. It is also quick to model and provides the best of both worlds - 3d visualisation and complex modelling.

How does this relate to the city? The next part is to put in real geographical data and to get the agents movies and reacting to each other on a spatial network, more on that to come.

You can download NetLogo from here, its comes with a excellent tutorial so you can start building your own model.

NetLogo to 3DMax: Complex Models and 3D Visualisation

We have been running a series of posts recently looking at crowd simulation, dynamics and particles in 3D Max. The aim is to visualise the complex systems that make up the city within an environment that allows both clear and easy visualisation and export capabilities to other packages such as Crysis or Google Earth.

While 3D Max is of use for crowd and particle simulation when it comes to modelling complex systems an external package is required, such as NetLogo. The movie below details our first steps at CASA (home of digital urban) to export a basic traffic model from NetLogo into 3D Studio Max. The import script was written by our new PhD student, Ateen Patel and opens up a vast array of opportunities to both visualise and model the city.


NetLogo to 3D Max - Proof of Concept from digitalurban on Vimeo.


Music by The Tedd-Z Cookbook, Aerodrome (Funky Shuffle Remix)

NetLogo is a cross-platform multi-agent programmable modeling environment that is widely. It is particularly well suited for modeling complex systems developing over time. Modelers can give instructions to hundreds or thousands of independent "agents" all operating concurrently. This makes it possible to explore the connection between the micro-level behavior of individuals and the macro-level patterns that emerge from the interaction of many individuals.(Nation Master Encyclopedia)

We will have more posts on complex systems and visualising the city over the coming weeks and months.

See http://gisagents.blogspot.com/ for more on modelling, agents and the city.