Changes between Version 4 and Version 5 of doc/tec/mas/implementation
- Timestamp:
- Nov 19, 2018 2:35:32 PM (6 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
doc/tec/mas/implementation
v4 v5 5 5 [[NoteBox(note,This page is part of the **Multi Agent System** (MAS) documentation. \\ It contains a description of the technical implementation of the Multi Agent System (MAS). \\ For an overview of all MAS-related pages\, see the [wiki:doc/tec/mas MAS main page].)]] 6 6 7 This section will give a brief summary of the agent code structure. This structure is largely based on the structure of the [wiki:doc/tec/particle Lagrangian Particle Model]. 7 This section will give a brief summary of the agent code structure. This structure is largely based on the structure of the [wiki:doc/tec/particle Lagrangian Particle Model.\\ 8 The entire MAS is modularized and can be found in the file {{{SOURCE/multi_agent_system_mod.f90}}} ([browser:palm/trunk/SOURCE/multi_agent_system_mod.f90 here]). 8 9 9 10 == Storage of agent data == … … 48 49 TYPE agent_grid_type 49 50 50 TYPE(agent_type), DIMENSION(:), & 51 ALLOCATABLE :: agents 51 TYPE(agent_type), DIMENSION(:), ALLOCATABLE :: agents 52 52 53 53 END TYPE agent_grid_type … … 58 58 #!Latex 59 59 \begin{verbatim} 60 TYPE(agent_grid_type), DIMENSION(:,:), & 61 ALLOCATABLE :: agent_grid 60 TYPE(agent_grid_type), DIMENSION(:,:), ALLOCATABLE :: agent_grid 62 61 \end{verbatim} 63 62 }}} … … 70 69 \end{verbatim} 71 70 }}} 72 Here, '''''n_par''''' is the number of agents located in the grid volume defined by the indices '''''j''''', and '''''i'''''.As an agent moves from one grid volume to another, its data has to be copied from the 1-D array of the previous grid volume to the 1-D array of the new volume, and finally deleted from the previous one. \\\\71 Here, **//n_par//** is the number of agents located in the grid volume defined by the indices **//j//** and **//i//** As an agent moves from one grid volume to another, its data has to be copied from the 1-D array of the previous grid volume to the 1-D array of the new volume, and finally deleted from the previous one. \\\\ 73 72 74 73