*9.1. Segregation and Social Interaction*

This use-case should demonstrate the impact of real-world humans on the simulation of social interaction and social networks (clusters). Crowd sensing was used to create digital twins in the simulation with model parameters derived by surveys performed with a WEB-page or suing mobile App software. For the sake of simplification, the world consists of a regular grid (patch grid). The Sakoda interaction model introduced in Section 7 is basically a local interaction model, in contrast to algorithmic models shown in the use-cases in Sections 9.2 and 9.3.

### 9.1.1. Long-Term Mobility

The initial simulation was performed with 200 class *a* and 200 class *b* agents and a unified *S* = (1,−1,−1,1) setting for all agents (blue and red squares) of both classes and unconstrained mobility leading to classical segregation structures (strong isolated clusters), shown in Figure 10.

During the simulation run, crowd sensing was performed using chat bot agents. Up to 200 digital twins (triangles) retrieved form crowd sensing surveys (chat dialogues, see Example 1) were added to the simulation dynamically. The *S* vector and the social distance *r* of digital twins now depend on the answers given by the (real) humans, which can differ from the initial *S* setting. These agents (if their *S* differs from the basic model) create a disturbance in the segregation patterns. Agents with *s*αβ = 0/1 and *s*αα = 0/1 can be integrated into both groups and are able to bind different groups close together (see the development and movement of the blue and red clusters inside the red circle in Figure 10). The figure shows different simulation snapshots at 500, 1000, and 1500 simulation steps. Each simulation step corresponds to a real-time interval of 10 s (to enable crowd sensing in real-time). The survey participants were chosen randomly by the chat bot agents.

Using an initial unified stable parameter set for all agents, digital twins with varying and different parameter sets based on survey data can be used to test the stability and convergence criteria of structure formation or mobility patterns like in traffic management on a fine-grain scale.

**Figure 10.** Simulation world with long-term mobility, without spatial and context constraints at different simulation times (500/1000/1500 steps) consisting of 200/200 a/b class agents (blue/red squares) all with S = (1,−1,−1,1) and r = 3 parameter settings and additionally up to 200 digital twins (triangles with colour based on individual S/r parameters).

**Example 1.** *A typical survey job script for the Sakoda model.*

```
job = [ 
 script : [ 
 {question:'Who are you? Do you think you are poor or rich?', 
 choices:['Poor','Rich','Do not know'], 
 tag:'class'}, 
 {question:'How do you rate your relation to people of your own group $1?'+ 
 'Do you like (1) or dislike (-1) them?', 
 choices:['-1','0','1'], 
 eval:function (dialog) return [dialog[0].answer] end, 
 cond:function (dialog) return dialog[0].answer!='Do not know' end, 
 tag:'attitudeP'}, 
 {question: 
 'How do you rate your relation to people of the other group $1?'+ 
 'Do you like (1) or dislike (-1) them?', 
 choices:['-1','0','1'], 
 eval:function (dialog) return
[dialog[0].answer=='Poor'?'Rich':'Poor'] end, 
 cond:function (dialog) return dialog[0].answer!='Do not know' end, 
 tag:'attitudeN'}, 
 {question:'Do you have $1 friends?',choices:['Yes','No'], 
 eval:function (dialog) return
[dialog[0].answer=='Poor'?'rich':'poor'] end, 
 cond:function (dialog) return dialog[0].answer!='Do not know' end, 
 tag:'friendsN'}, 
 {question:'How old are you?',tag:'age'}, 
 {question:'What is your monthly salary?', 
 choices :['5000'],tag:'salary'}, 
 {question:'Where do you live [Enter ZIP Code]?', 
 value:function () return myIpLocation().city end, tag:'location'}, 
 {question:'How many social contacts do you have?',tag:'contacts'}, 
 {question:'Do you like to move?', 
 choices:['Yes','Maybe','No'],tag:'mobility'}, 
 {message:'Thank you!'} 
 ], 
 action : function (script) { 
 // create digital-twin from script data;
 .. 
 } 
]
```