SYMBOL INDEX (341 symbols across 27 files) FILE: agentpy/agent.py class Agent (line 11) | class Agent(Object): method __init__ (line 27) | def __init__(self, model, *args, **kwargs): FILE: agentpy/datadict.py class NpEncoder (line 16) | class NpEncoder(json.JSONEncoder): method default (line 19) | def default(self, obj): function _last_exp_id (line 32) | def _last_exp_id(name, path): class DataDict (line 45) | class DataDict(AttrDict): method __repr__ (line 63) | def __repr__(self, indent=False): method _short_repr (line 96) | def _short_repr(self): method __eq__ (line 100) | def __eq__(self, other): method __ne__ (line 114) | def __ne__(self, other): method _sobol_set_df_index (line 120) | def _sobol_set_df_index(df, p_keys, reporter): method calc_sobol (line 125) | def calc_sobol(self, reporters=None, **kwargs): method _combine_vars (line 206) | def _combine_vars(self, obj_types=True, var_keys=True): method _dict_pars_to_df (line 256) | def _dict_pars_to_df(self, dict_pars): method _combine_pars (line 262) | def _combine_pars(self, sample=True, constants=True): method arrange (line 283) | def arrange(self, variables=False, reporters=False, parameters=False, method arrange_reporters (line 362) | def arrange_reporters(self): method arrange_variables (line 367) | def arrange_variables(self): method save (line 374) | def save(self, exp_name=None, exp_id=None, path='ap_output', display=T... method _load (line 450) | def _load(self, exp_name=None, exp_id=None, method load (line 522) | def load(cls, exp_name=None, exp_id=None, path='ap_output', display=Tr... FILE: agentpy/examples.py function gini (line 5) | def gini(x): class WealthAgent (line 16) | class WealthAgent(ap.Agent): method setup (line 20) | def setup(self): method wealth_transfer (line 24) | def wealth_transfer(self): class WealthModel (line 33) | class WealthModel(ap.Model): method setup (line 48) | def setup(self): method step (line 51) | def step(self): method update (line 54) | def update(self): method end (line 58) | def end(self): class SegregationAgent (line 62) | class SegregationAgent(ap.Agent): method setup (line 64) | def setup(self): method update_happiness (line 72) | def update_happiness(self): method find_new_home (line 80) | def find_new_home(self): class SegregationModel (line 86) | class SegregationModel(ap.Model): method setup (line 105) | def setup(self): method update (line 116) | def update(self): method step (line 125) | def step(self): method get_segregation (line 129) | def get_segregation(self): method end (line 133) | def end(self): FILE: agentpy/experiment.py class Experiment (line 20) | class Experiment: method __init__ (line 48) | def __init__(self, model_class, sample=None, iterations=1, method _parameters_to_output (line 116) | def _parameters_to_output(self): method _add_single_output_to_combined (line 135) | def _add_single_output_to_combined(single_output, combined_output): method _combine_dataframes (line 155) | def _combine_dataframes(self, combined_output): method _single_sim (line 175) | def _single_sim(self, run_id): method run (line 189) | def run(self, n_jobs=1, pool=None, display=True, **kwargs): method end (line 283) | def end(self): FILE: agentpy/grid.py class _IterArea (line 16) | class _IterArea: method __init__ (line 27) | def __init__(self, area, exclude=None): method __len__ (line 31) | def __len__(self): method __iter__ (line 40) | def __iter__(self): class GridIter (line 57) | class GridIter(AgentIter): method __init__ (line 82) | def __init__(self, model, iter_, items): method __getitem__ (line 86) | def __getitem__(self, item): class Grid (line 91) | class Grid(SpatialEnvironment): method _agent_field (line 140) | def _agent_field(field_name, shape, model): method __init__ (line 148) | def __init__(self, model, shape, torus=False, method agents (line 168) | def agents(self): method _add_agent (line 173) | def _add_agent(self, agent, position, field): method add_agents (line 178) | def add_agents(self, agents, positions=None, random=False, empty=False): method remove_agents (line 241) | def remove_agents(self, agents): method _border_behavior (line 253) | def _border_behavior(position, shape, torus): method move_to (line 267) | def move_to(self, agent, pos): method move_by (line 294) | def move_by(self, agent, path): method neighbors (line 304) | def neighbors(self, agent, distance=1): method apply (line 354) | def apply(self, func, field='agents'): method attr_grid (line 364) | def attr_grid(self, attr_key, otypes='f', field='agents'): method add_field (line 384) | def add_field(self, key, values=None): method del_field (line 409) | def del_field(self, key): FILE: agentpy/model.py class Model (line 23) | class Model(Object): method __init__ (line 103) | def __init__(self, parameters=None, _run_id=None, **kwargs): method __repr__ (line 146) | def __repr__(self): method as_function (line 152) | def as_function(cls, **kwargs): method info (line 189) | def info(self): method _new_id (line 201) | def _new_id(self): method report (line 208) | def report(self, rep_keys, value=None): method setup (line 259) | def setup(self): method step (line 264) | def step(self): method update (line 270) | def update(self): method end (line 276) | def end(self): method set_parameters (line 283) | def set_parameters(self, parameters): method sim_setup (line 287) | def sim_setup(self, steps=None, seed=None): method sim_step (line 323) | def sim_step(self): method sim_reset (line 332) | def sim_reset(self): method stop (line 342) | def stop(self): method run (line 346) | def run(self, steps=None, seed=None, display=True): method create_output (line 396) | def create_output(self): FILE: agentpy/network.py class AgentNode (line 10) | class AgentNode(set): method __init__ (line 15) | def __init__(self, label): method __hash__ (line 18) | def __hash__(self): method __repr__ (line 21) | def __repr__(self): class Network (line 25) | class Network(Object): method __init__ (line 49) | def __init__(self, model, graph=None, **kwargs): method agents (line 67) | def agents(self): method nodes (line 71) | def nodes(self): method add_node (line 76) | def add_node(self, label=None): method remove_node (line 94) | def remove_node(self, node): method add_agents (line 105) | def add_agents(self, agents, positions=None): method remove_agents (line 128) | def remove_agents(self, agents): method move_to (line 136) | def move_to(self, agent, node): method neighbors (line 148) | def neighbors(self, agent): FILE: agentpy/objects.py class Object (line 10) | class Object: method __init__ (line 13) | def __init__(self, model): method __repr__ (line 23) | def __repr__(self): method __getattr__ (line 26) | def __getattr__(self, key): method __getitem__ (line 29) | def __getitem__(self, key): method __setitem__ (line 32) | def __setitem__(self, key, value): method _set_var_ignore (line 35) | def _set_var_ignore(self): method vars (line 40) | def vars(self): method record (line 45) | def record(self, var_keys, value=None): method _record (line 94) | def _record(self, var_keys, value=None): method setup (line 118) | def setup(self, **kwargs): class SpatialEnvironment (line 142) | class SpatialEnvironment(Object): method record_positions (line 144) | def record_positions(self, label='p'): FILE: agentpy/sample.py class Range (line 18) | class Range: method __init__ (line 31) | def __init__(self, vmin=0, vmax=1, vdef=None): method __repr__ (line 37) | def __repr__(self): class IntRange (line 41) | class IntRange(Range): method __init__ (line 56) | def __init__(self, vmin=0, vmax=1, vdef=None): method __repr__ (line 62) | def __repr__(self): class Values (line 66) | class Values: method __init__ (line 77) | def __init__(self, *args, vdef=None): method __len__ (line 81) | def __len__(self): method __repr__ (line 84) | def __repr__(self): class Sample (line 88) | class Sample: method __init__ (line 139) | def __init__(self, parameters, n=None, method __repr__ (line 152) | def __repr__(self): method __iter__ (line 155) | def __iter__(self): method __len__ (line 158) | def __len__(self): method _assign_random_seeds (line 163) | def _assign_random_seeds(self, seed): method _linspace (line 169) | def _linspace(parameters, n, product=True): method _saltelli (line 201) | def _saltelli(self, params, n, calc_second_order=True): FILE: agentpy/sequences.py class AgentSequence (line 13) | class AgentSequence: method __repr__ (line 16) | def __repr__(self): method __getattr__ (line 21) | def __getattr__(self, name): method _set (line 29) | def _set(self, key, value): method _obj_gen (line 33) | def _obj_gen(model, n, cls, *args, **kwargs): class AttrIter (line 53) | class AttrIter(AgentSequence, Sequence): method __init__ (line 65) | def __init__(self, source, attr=None): method __repr__ (line 69) | def __repr__(self): method _iter_attr (line 73) | def _iter_attr(a, s): method __iter__ (line 77) | def __iter__(self): method __len__ (line 84) | def __len__(self): method __getitem__ (line 87) | def __getitem__(self, key): method __setitem__ (line 94) | def __setitem__(self, key, value): method __call__ (line 101) | def __call__(self, *args, **kwargs): method __eq__ (line 104) | def __eq__(self, other): method __ne__ (line 107) | def __ne__(self, other): method __lt__ (line 110) | def __lt__(self, other): method __le__ (line 113) | def __le__(self, other): method __gt__ (line 116) | def __gt__(self, other): method __ge__ (line 119) | def __ge__(self, other): method __add__ (line 122) | def __add__(self, v): method __sub__ (line 128) | def __sub__(self, v): method __mul__ (line 134) | def __mul__(self, v): method __truediv__ (line 140) | def __truediv__(self, v): method __iadd__ (line 146) | def __iadd__(self, v): method __isub__ (line 149) | def __isub__(self, v): method __imul__ (line 152) | def __imul__(self, v): method __itruediv__ (line 155) | def __itruediv__(self, v): function _random (line 161) | def _random(model, gen, obj_list, n=1, replace=False): class AgentList (line 182) | class AgentList(AgentSequence, list): method __init__ (line 256) | def __init__(self, model, objs=(), cls=None, *args, **kwargs): method __setattr__ (line 263) | def __setattr__(self, name, value): method __add__ (line 273) | def __add__(self, other): method select (line 278) | def select(self, selection): method random (line 287) | def random(self, n=1, replace=False): method sort (line 301) | def sort(self, var_key, reverse=False): method shuffle (line 312) | def shuffle(self): class AgentDList (line 318) | class AgentDList(AgentSequence, ListDict): method __init__ (line 351) | def __init__(self, model, objs=(), cls=None, *args, **kwargs): method __setattr__ (line 366) | def __setattr__(self, name, value): method __add__ (line 376) | def __add__(self, other): method random (line 381) | def random(self, n=1, replace=False): method select (line 395) | def select(self, selection): method sort (line 405) | def sort(self, var_key, reverse=False): method shuffle (line 417) | def shuffle(self): method buffer (line 422) | def buffer(self): class AgentSet (line 428) | class AgentSet(AgentSequence, set): method __init__ (line 446) | def __init__(self, model, objs=(), cls=None, *args, **kwargs): class AgentIter (line 454) | class AgentIter(AgentSequence): method __init__ (line 457) | def __init__(self, model, source=()): method __getitem__ (line 461) | def __getitem__(self, item): method __iter__ (line 465) | def __iter__(self): method __len__ (line 468) | def __len__(self): method __setattr__ (line 471) | def __setattr__(self, name, value): method to_list (line 481) | def to_list(self): method to_dlist (line 485) | def to_dlist(self): class AgentDListIter (line 490) | class AgentDListIter(AgentIter): method __init__ (line 493) | def __init__(self, model, source=(), shuffle=False, buffer=False): method __iter__ (line 499) | def __iter__(self): method buffer (line 509) | def buffer(self): method shuffle (line 513) | def shuffle(self): method _buffered_iter (line 517) | def _buffered_iter(self): FILE: agentpy/space.py class Space (line 19) | class Space(SpatialEnvironment): method __init__ (line 55) | def __init__(self, model, shape, torus=False, **kwargs): method agents (line 72) | def agents(self): method kdtree (line 76) | def kdtree(self): method add_agents (line 93) | def add_agents(self, agents, positions=None, random=False): method remove_agents (line 124) | def remove_agents(self, agents): method _border_behavior (line 133) | def _border_behavior(position, shape, torus): method move_to (line 152) | def move_to(self, agent, pos): method move_by (line 164) | def move_by(self, agent, path): method neighbors (line 174) | def neighbors(self, agent, distance): method select (line 194) | def select(self, center, radius): FILE: agentpy/tools.py class AgentpyError (line 9) | class AgentpyError(Exception): function make_none (line 13) | def make_none(*args, **kwargs): class InfoStr (line 17) | class InfoStr(str): method __repr__ (line 19) | def __repr__(self): function make_matrix (line 23) | def make_matrix(shape, loc_type=make_none, list_type=list, pos=None): function make_list (line 36) | def make_list(element, keep_none=False): function param_tuples_to_salib (line 50) | def param_tuples_to_salib(param_ranges_tuples): class AttrDict (line 65) | class AttrDict(dict): method __init__ (line 80) | def __init__(self, *args, **kwargs): method __getattr__ (line 85) | def __getattr__(self, name): method __setattr__ (line 92) | def __setattr__(self, name, value): method __delattr__ (line 95) | def __delattr__(self, item): method _short_repr (line 98) | def _short_repr(self): class ListDict (line 103) | class ListDict(Sequence): method __init__ (line 107) | def __init__(self, iterable): method __iter__ (line 113) | def __iter__(self): method __len__ (line 116) | def __len__(self): method __getitem__ (line 119) | def __getitem__(self, item): method __contains__ (line 122) | def __contains__(self, item): method extend (line 125) | def extend(self, seq): method append (line 129) | def append(self, item): method replace (line 135) | def replace(self, old_item, new_item): method remove (line 140) | def remove(self, item): method pop (line 147) | def pop(self, index): FILE: agentpy/visualization.py function animate (line 17) | def animate(model, fig, axs, plot, steps=None, seed=None, function _apply_colors (line 99) | def _apply_colors(grid, color_dict, convert): function gridplot (line 125) | def gridplot(grid, color_dict=None, convert=False, ax=None, **kwargs): FILE: docs/agentpy_demo.py class MoneyAgent (line 7) | class MoneyAgent(ap.Agent): method setup (line 9) | def setup(self): method wealth_transfer (line 12) | def wealth_transfer(self): class MoneyModel (line 21) | class MoneyModel(ap.Model): method setup (line 23) | def setup(self): method step (line 27) | def step(self): FILE: tests/test_datadict.py function test_combine_vars (line 14) | def test_combine_vars(): class MyModel (line 71) | class MyModel(ap.Model): method step (line 72) | def step(self): function test_repr (line 80) | def test_repr(): class AgentType1 (line 87) | class AgentType1(ap.Agent): method setup (line 88) | def setup(self): method action (line 91) | def action(self): class AgentType2 (line 95) | class AgentType2(AgentType1): method setup (line 96) | def setup(self): method action (line 100) | def action(self): class EnvType3 (line 104) | class EnvType3(ap.Agent): method setup (line 105) | def setup(self): method action (line 109) | def action(self): class EnvType4 (line 113) | class EnvType4(ap.Agent): method setup (line 114) | def setup(self): method action (line 117) | def action(self): class ModelType0 (line 121) | class ModelType0(ap.Model): method setup (line 123) | def setup(self): method step (line 132) | def step(self): method end (line 136) | def end(self): function test_testing_model (line 140) | def test_testing_model(): function arrange_things (line 158) | def arrange_things(results): function test_datadict_arrange_for_single_run (line 172) | def test_datadict_arrange_for_single_run(): function test_datadict_arrange_for_multi_run (line 190) | def test_datadict_arrange_for_multi_run(): function test_datadict_arrange_measures (line 206) | def test_datadict_arrange_measures(): function test_datadict_arrange_variables (line 214) | def test_datadict_arrange_variables(): function test_automatic_loading (line 222) | def test_automatic_loading(): function test_saved_equals_loaded (line 246) | def test_saved_equals_loaded(): class WeirdObject (line 265) | class WeirdObject: function test_save_load (line 269) | def test_save_load(): function test_load_unreadable (line 297) | def test_load_unreadable(): class SobolModel (line 308) | class SobolModel(ap.Model): method step (line 309) | def step(self): function test_calc_sobol (line 314) | def test_calc_sobol(): FILE: tests/test_examples.py function test_WealthModel (line 7) | def test_WealthModel(): function test_SegregationModel (line 18) | def test_SegregationModel(): FILE: tests/test_experiment.py class MyModel (line 11) | class MyModel(ap.Model): method setup (line 13) | def setup(self): function test_basics (line 18) | def test_basics(): function test_parallel_processing (line 30) | def test_parallel_processing(): function test_random (line 50) | def test_random(): FILE: tests/test_grid.py function make_grid (line 7) | def make_grid(s, n=0, track_empty=False, agent_cls=ap.Agent): function test_general (line 15) | def test_general(): function test_add_agents (line 21) | def test_add_agents(): function test_remove (line 95) | def test_remove(): function test_grid_iter (line 113) | def test_grid_iter(): function test_attr_grid (line 122) | def test_attr_grid(): function test_apply (line 127) | def test_apply(): function test_move (line 132) | def test_move(): function test_move_empty_multiple_agents (line 147) | def test_move_empty_multiple_agents(): function test_move_torus (line 162) | def test_move_torus(): function test_neighbors (line 190) | def test_neighbors(): function test_neighbors_with_torus (line 198) | def test_neighbors_with_torus(): function test_field (line 232) | def test_field(): function test_record_positions (line 257) | def test_record_positions(): FILE: tests/test_init.py function test_version (line 5) | def test_version(): FILE: tests/test_model.py function test_run (line 9) | def test_run(): function test_default_parameter_choice (line 30) | def test_default_parameter_choice(): function test_report_and_as_function (line 36) | def test_report_and_as_function(): function test_update_parameters (line 52) | def test_update_parameters(): function test_sim_methods (line 61) | def test_sim_methods(): function test_run_seed (line 87) | def test_run_seed(): function test_stop (line 105) | def test_stop(): function test_setup (line 119) | def test_setup(): function test_create_output (line 154) | def test_create_output(): function test_report_seed (line 175) | def test_report_seed(): FILE: tests/test_network.py function test_add_agents (line 6) | def test_add_agents(): function test_move_agent (line 42) | def test_move_agent(): function test_remove_agents (line 63) | def test_remove_agents(): FILE: tests/test_objects.py function test_basics (line 5) | def test_basics(): function test_record (line 20) | def test_record(): function test_record_all (line 35) | def test_record_all(): FILE: tests/test_sample.py function test_repr (line 7) | def test_repr(): function test_seed (line 18) | def test_seed(): function test_errors (line 31) | def test_errors(): function test_linspace_product (line 37) | def test_linspace_product(): function test_linspace_zip (line 76) | def test_linspace_zip(): function test_sample_saltelli (line 85) | def test_sample_saltelli(): function test_sample_saltelli_second (line 111) | def test_sample_saltelli_second(): FILE: tests/test_sequences.py function test_basics (line 7) | def test_basics(): function test_kwargs (line 40) | def test_kwargs(): function test_add (line 57) | def test_add(): function test_agent_group (line 81) | def test_agent_group(): function test_attr_list (line 126) | def test_attr_list(): function test_select (line 154) | def test_select(): function test_random (line 179) | def test_random(): function test_sort (line 204) | def test_sort(): function test_arithmetics (line 223) | def test_arithmetics(): function test_remove (line 262) | def test_remove(): FILE: tests/test_space.py function make_space (line 7) | def make_space(s, n=0, torus=False): function test_general (line 18) | def test_general(): function test_KDTree (line 25) | def test_KDTree(): function test_add_agents_random (line 35) | def test_add_agents_random(): function test_remove (line 43) | def test_remove(): function test_positions (line 52) | def test_positions(): FILE: tests/test_tools.py function test_InfoStr (line 7) | def test_InfoStr(): function test_make_list (line 11) | def test_make_list(): function test_make_matrix (line 20) | def test_make_matrix(): function test_attr_dict (line 30) | def test_attr_dict(): function test_ListDict (line 43) | def test_ListDict(): FILE: tests/test_visualization.py function test_gridplot (line 7) | def test_gridplot(): function test_animation (line 34) | def test_animation():