rgrow.Simulation#

class rgrow.Simulation#

A combination of a System, and a list of States, which can be added to.

This is not generally created directly, but is instead usually created from a TileSet, using TileSet.to_simulation().

__init__(*args, **kwargs)#

Methods

__init__(*args, **kwargs)

add_n_states(n)

Adds n new states to the simulation.

add_state()

Add a new state to the simulation.

canvas_copy([state_index])

Returns the current canvas for state_index (default 0), as an array copy.

canvas_view([state_index])

Returns the current canvas for state_index (default 0), as a direct view of the state array.

evolve([state_index, for_events, ...])

Evolve a particular state, with index state_index, subject to some bounds.

evolve_all([for_events, total_events, ...])

Evolve all states, stopping each as they reach the boundary conditions.

evolve_some(state_indices[, for_events, ...])

Evolve some states, stopping each as they reach the boundary conditions.

get_system_param(name)

Gets a system parameter.

mismatch_array([state_index])

n_mismatches([state_index])

name_canvas([state_index])

Returns the current canvas for state_index (default 0), as an array of tile names.

plot_state([state_index, ax])

Plot a state as a pcolormesh.

set_system_param(name, value)

Sets a system parameter.

state_events([state_index])

Returns the number of events simulated for the state.

state_ntiles([state_index])

Returns the number of tiles in the state.

state_time([state_index])

Returns the amount of time simulated (in seconds) for the state.

tile_cmap()

Returns a matplotlib colormap for tile numbers.

Attributes

states_events

Returns a list of the total number of events simulated for each state.

states_ntiles

Returns a list of the number of tiles in each state.

states_time

Returns a list of the amount of time simulated (in seconds) for each state.

tile_colors

tile_concs

tile_names

tile_stoics