.[]{data-label="fig:VoterResults"}](VoterResults.png){width="\columnwidth"}

Agent Based Models on a spatial domain
--------------------------------------

In the previous subsection, we have detailed how to create an ABM on a graph, how to create an associated problem, how to generate its code and how to run it. Simflowny 2 also includes the new family of ABM on a spatial domain, which we validate in this section. As many features are common with the ABM on a graph family, we will directly present an example without detailing the process of building the model and the problem In this example, a two-dimensional flocking model is implemented into Simflowny. We use the vectorial noise model of Gregoire and Chaté [@Gregoire2004]. The model is a variation of the Original Vicsek Model [@Vicsek1995] (OVM), devised to reproduce the collective motion - or flocking - we find in many biological and non-biological systems (see, for instance, references [@Toner1995],[@Gregoire2008], and [@Deutsch2012]and [@Vicsek2012] for reviews). In these systems long-range orientation order emerges after spontaneous symmetry breaking.

In the OVM, point-like agents move synchronously in discrete time steps, with a fixed common speed $v_0$. In 2D the orientation of agent $\alpha$ is an angle $\theta_{\alpha}$. The evolution rule provides the new angles at each time step, based on the angles of the agent’s neighbours (agents within a certain influence radius) in the previous time step. Essentially, the agent tries to align itself with its neighbours. This alignment is perturbed by a white noise.

The Gregoire and Chaté model is based on the OVM, but modifies the manner in which noise is incorporated into the model. They define *vectorial noise* as generated by errors when estimating interactions, in comparison with the *angular noise* in the OVM, related to errors in trying to follow the newly computed direction. Altogether, the update rule for the Gregoire and Chaté model is:

$$\theta^{t+1}_{\alpha} = arg \left[\sum_{\beta \sim \alpha}e^{i \theta^t_{\beta}} + \
\eta n^t_{\alpha} e^{i\xi^t_{\alpha}} \right],$$

where $\xi
.[]{data - label="fig: VoterResults"}](VoterResults.png){width="\columnwidth " } 

 Agent Based Models on a spatial domain 
 -------------------------------------- 

 In the previous subsection, we have detailed how to create an ABM on a graph, how to make an associated trouble, how to generate its code and how to run it. Simflowny 2 besides includes the modern family of ABM on a spatial domain, which we validate in this part. As many features are common with the ABM on a graph class, we will directly present an exercise without detailing the process of build the model and the problem In this example, a two - dimensional flocking model is implemented into Simflowny. We use the vectorial randomness model of Gregoire and Chaté   [ @Gregoire2004 ]. The model is a variation of the Original Vicsek Model   [ @Vicsek1995 ] (OVM), organize to reproduce the collective gesture - or flocking - we find in many biological and non - biological system (see, for instance, references   [ @Toner1995],[@Gregoire2008 ], and   [ @Deutsch2012]and   [ @Vicsek2012 ] for reviews). In these systems retentive - range orientation order emerges after spontaneous symmetry breaking. 

 In the OVM, point - like agents move synchronously in discrete time steps, with a fixed common speed $ v_0$. In 2D the orientation of agentive role $ \alpha$ is an slant $ \theta_{\alpha}$. The evolution rule provides the newfangled angles at each time step, free-base on the angles of the agent ’s neighbours (agents within a sealed influence radius) in the previous time step. Essentially, the agent tries to align itself with its neighbours. This alignment is perturbed by a white noise. 

 The Gregoire and Chaté exemplar is based on the OVM, but modify the manner in which noise is incorporated into the model. They define * vectorial noise * as generate by errors when estimating interactions, in comparison with the * angular randomness * in the OVM, related to erroneousness in trying to follow the newly calculate direction. Altogether, the update rule for the Gregoire and Chaté model is: 

 $ $ \theta^{t+1}_{\alpha } = arg \left[\sum_{\beta \sim \alpha}e^{i \theta^t_{\beta } } + \ 
 \eta n^t_{\alpha } e^{i\xi^t_{\alpha } } \right],$$ 

 where $ \xi
.[]{datw-label="fig:VoterResults"}](VottrResults.png){width="\eilumnwmdth"}

Ageht Based Models on a spatial domain
--------------------------------------

Ii thw precious subsection, we haxe detailvd how to creete an ABM on a jdaph, how to cdcate cn associated prpblem, how do generate itv zobe and how to run it. Simflowny 2 also includrs the new famili of SFM oh a spatial domain, which we validafe in tiis section. As kany features are common wlth hhe ABM on a graph family, we qill eirectly prerent an example withouj detailing the process of buildkng tke model ane rhe kroblem In tiis exwmple, a two-dlkensiotal flovking model is im'lemwnted into Simflowny. Xe use the vectorial noise mogem of Gregoire and Cyaté [@Grggoira2004]. Thd moael ix z variwtikn of the Kriginal Vixsek Model [@Vicsek1995] (OVK), qvfised to repdoduce tre collective motion - or flocking - we fpnd jn many biological and bon-biological systems (see, for ynstance, references [@Toner1995],[@Gregoire2008], and [@Deutsch2012]and [@Vicvek2012] fkf rtvlcws). Kb hhese systems long-range orientation order emewfex sfter spontanejus symmetru hrrwking.

In the OXM, poiuf-ljke agents move syjchronoosly ib discrett timr steps, with a fixed common speed $v_0$. In 2B tye orientation of cgent $\alpha$ ns an sngle $\theta_{\alpha}$. The evolutiun rhle provided the new xngles at each tkme sdep, based on the angles of the agenv’s nenghbours (agemts wiehin a cerhain ltfluence radius) in the kreviogs time stfp. Essentially, the agent tries vp align itsekf winh its nenghbouvs. This alignmegt is perturbeb by a wkite nuise.

The Grvgoire anv Chaté model is based on dje OVM, but mmdifies ehe nannwr in wfkch noise is imcorporatvd inti the model. They dcfine *bectorial noise* as generated by etrofs rhvn xstimwding interacdionr, iv compxrison with ghe *sngular noise* in the OVM, related to errors ik trying jo follow the newly cokputed direction. Aptogevher, tie updste rule for the Gregoire and Chafé model id:

$$\thcta^{t+1}_{\alpha} = ard \lent[\sui_{\beta \sim \clpha}e^{i \theta^t_{\beta}} + \
\eta n^t_{\alpha} e^{i\xi^t_{\alpia}} \right],$$

where $\xi
.[]{data-label="fig:VoterResults"}](VoterResults.png){width="\columnwidth"} Agent Based Models on a spatial In previous subsection, have detailed how a how to create associated problem, how generate its code and how to it. Simflowny 2 also includes the new family of ABM on a spatial which we validate in this section. As many features are common with the on graph we directly present an example without detailing the process of building the model and the problem In example, a two-dimensional flocking model is implemented into We use the vectorial model of Gregoire and Chaté The is a of Original Model [@Vicsek1995] (OVM), to reproduce the collective motion - or flocking - we find in many biological and non-biological systems for instance, and [@Deutsch2012]and for In systems long-range orientation after spontaneous symmetry breaking. In the move synchronously in discrete time steps, with a common speed In 2D the orientation of agent is an angle $\theta_{\alpha}$. The evolution rule provides new angles at each time step, based on the angles of the agent’s neighbours (agents certain influence radius) in previous time step. the tries align with its This alignment is perturbed by a white noise. The Gregoire and model is based on the OVM, but modifies the manner noise incorporated into the They define *vectorial noise* generated errors when estimating interactions, with *angular OVM, to in trying to follow newly computed direction. Altogether, the rule for the Gregoire = arg \left[\sum_{\beta \sim \alpha}e^{i \theta^t_{\beta}} + \ n^t_{\alpha} e^{i\xi^t_{\alpha}} \right],$$ where $\xi
.[]{data-label="fig:VoterResults"}](VOterResultS.png){wIdtH="\coLuMnwiDth"}

AGent Based ModelS On a sPatial domain
--------------------------------------

In the previOus suBsECtioN, We Have dEtailed HOw TO CreAtE aN ABm oN A gRaph, hOw tO create An associatEd pRoBlem, how to genERaTe its code aNd hOw to run it. SimFloWny 2 alsO iNclUDes thE neW famiLy of ABm On a spaTial domaiN, wHIch we vALidate iN THiS secTion. As many featureS ArE Common with the AbM on a gRaPH fAMIly, We wIll directlY pResenT An exampLE wITHOut DEtailing the prOcess of builDIng The modEl And THe probLem In ThIS exAmple, a two-diMensIonal flocKing moDEl is impLEmented Into SiMflOwnY. We uSE tHe VecToRIal NOiSe mODel Of GregoiRe AnD ChatÉ [@GreGOIRE2004]. The ModEl is A variAtion of the OriGinAl ViCSek model [@vicseK1995] (OVM), DeVised To reprOduce ThE collective motiOn - or Flocking - wE fiNd In mAnY biolOGical aNd nOn-bIologicAl systeMS (seE, fOR INsTance, references [@TonEr1995],[@gREgOire2008], and [@DEutsch2012]ANd [@viCSek2012] for reViEws). in thESE systEms lONg-Range oriEntatiON oRdEr emergEs After sPoNtaNeoUs symMEtry BreakiNg.

In the OvM, poiNT-like agents movE Synchronously IN dISCrETe tiMe sTeps, with a fiXed cOMmon SpeeD $V_0$. IN 2D tHE orieNtatiOn OF aGEnt $\alpha$ is an angle $\thEtA_{\alpha}$. the evOlution rule prOvides the nEW ANgles at eAch tIMe STep, based on the aNgles Of the agent’S NeighbouRs (ageNts withiN a certain INFluence rAdiUs) iN thE prEVIoUs time step. EssENTialLy, The agenT trIes to alIgn ItsElf WitH iTs neighboUrs. This aLiGnMeNt Is pErturBEd by a whiTe NoiSe.

the gregoIRe and CHaté mOdel Is BaSEd oN the OVM, BUt MODifiEs ThE manNer In Which NoisE Is iNcorporAted into tHe mODel. THeY dEfine *veCtorial noise* aS gEnerated by ErRorS when eSTImating iNteractions, in comparison WIth the *aNguLar noIse* iN the OVM, reLatEd to erRorS In tryiNg to foLlow tHe NewLY CompuTED dIreCtIon. AltogetHER, thE updaTe Rule For the GRegoire and Chaté modEL is:

$$\Theta^{t+1}_{\alpha} = arG \leFt[\suM_{\BEtA \siM \AlPHa}e^{I \tHEta^T_{\BEta}} + \
\eta n^t_{\alpha} e^{i\Xi^t_{\alpha}} \riGhT],$$

WhEre $\xi
.[]{data-label="fig:VoterR esults"}]( Voter Res ult s. png) {wid th="\columnwid t h"}
Agent Based Models on  a sp at i al d o ma in
-- ------- - -- - - --- -- -- --- -- - -- ----- --- -

In t he previou s s ub section, weh av e detailed  ho w to createanABM on  a  gr a ph, h owto cr eate a n  assoc iated pro bl e m, how to gene r a te  its  code and how tor un it. Simflowny2 also  i n cl u d esthe  new famil yof AB M  on a s p at i a l  do m ain, which we  validate i n  th is sec ti on. As man y fea tu r esare commonwith  the ABMon a g r aph fam i ly, wewill d ire ctl y pr e se nt  an  e x amp l ewit h out  detaili ng  t he pr oces s o f  bui ldi ng t he mo del and the p rob lemI n t his e xampl e, a  t wo-di mensio nal f lo cking model isimpl emented i nto  S imf lo wny.W e usethe  ve ctorial  noisem ode lo f Gr egoire and Chaté [ @G r e go ire2004] . Them od el is a var ia tio n of t he Or igin a lVicsek M odel [ @ Vi cs ek1995]  ( OVM),de vis edto re p rodu ce the  collect ive m o tion - or floc k ing - we find in m an y  bio log ical and no n-bi o logi cals ys tem s  (see , for  i n st a nce, references [@T on er1995 ],[@G regoire2008],  and [@Deu t s c h2012]an d [@ V ic s ek2012] for re views ). In thes e  systems  long -range o rientatio n order em erg esaft ers p on taneous symme t r y br ea king.
Inthe OVM , p oin t-l ike  a gents mov e synchr on ou sl yindiscr e te timest eps ,wit h a f i xed co mmonspee d$v _ 0$.  In 2Dt he o rien ta ti on o f a ge nt $\ alph a $ i s an an gle $\the ta_ { \alp ha }$ . The e volution rule  p rovides th enew  angle s at eachtime step, based on the anglesofthe a gent ’s neighb our s (age nts within  a cer tainin flu e n ce ra d i us ) i nthe previo u s  ti me st ep . Es sential ly, the agent trie s  to  align itself  wi th i t s  n eig h bo u rs.  T h isa l ignment is pert urbed by a  w h it e noise.
T heGr egoireand Cha té mo d el is b ased on t he OVM, b ut  mod i f ies  the manne r in whi ch noisei s inc o rp orate d i nto th emod el. T hey de f ine  *vec torial  n oise*as ge ne rated by  errors when estimating  inter actio ns,  in compa ris o n w ith the * angu lar noise*  in  th e OVM , r e lated  toe rr ors in tr ying to follow th e n e w ly  computed d i r e cti on. A lto g ether,  the  update rule fort he Gregoire an d Ch a t é m ode l  is: 
$$\theta^{t+1} _{\ al p h a} = arg  \ left[\sum_{ \beta \s im \alph a}e^{i  \thet a^t_{\b e t a} }  + \
\ etan^t _{\alpha}  e^ {i \ xi^t_{\ al ph a }} \ri ght] ,$ $

whe re $\x i 
.[]{data-label="fig:VoterResults"}](VoterResults.png){width="\columnwidth"}

Agent Based_Models on_a spatial domain
--------------------------------------

In the_previous subsection,_we_have detailed_how_to create an_ABM on a_graph, how to create_an associated problem,_how_to generate its code and how to run it. Simflowny 2 also includes the_new_family of_ABM_on_a spatial domain, which we_validate in this section. As_many features_are common with the ABM on a graph_family,_we will directly_present an example without detailing the process of building_the model and the problem In_this example, a_two-dimensional_flocking_model is implemented into_Simflowny. We use the vectorial noise_model of Gregoire and Chaté [@Gregoire2004]. The_model is a variation of the Original_Vicsek Model [@Vicsek1995] (OVM), devised to reproduce_the collective motion - or_flocking -_we find in many biological_and non-biological systems_(see, for_instance, references [@Toner1995],[@Gregoire2008], and [@Deutsch2012]and [@Vicsek2012]_for reviews). In these systems long-range_orientation order emerges_after spontaneous symmetry breaking.

In the OVM,_point-like_agents move synchronously_in_discrete_time steps,_with a fixed_common_speed $v_0$._In_2D the orientation of agent $\alpha$_is_an angle $\theta_{\alpha}$. The evolution rule provides_the new angles at_each_time step, based on_the angles of the agent’s_neighbours (agents within a certain influence_radius) in_the previous_time step. Essentially, the agent tries to align itself with its_neighbours. This alignment is perturbed by_a white noise.

The Gregoire_and Chaté_model_is based on_the_OVM, but_modifies the manner in which noise is_incorporated into_the model. They define *vectorial noise*_as generated by errors_when_estimating interactions, in comparison with the_*angular noise* in the OVM, related_to errors in trying to_follow_the_newly computed direction. Altogether, the_update rule for the Gregoire and_Chaté model is:

$$\theta^{t+1}_{\alpha}_= arg \left[\sum_{\beta \sim \alpha}e^{i \theta^t_{\beta}} +_\
\eta_n^t_{\alpha} e^{i\xi^t_{\alpha}} \right],$$

where $\xi