Architectural Design of Autonomous Stochastic Business Process Simulators in the Agricultural Sector

Designing Additional Functionality (Extensions) for Agricultural Complexes in Isolated Sandbox Environments

Author

Core Simulation Framework & Stochastic Systems Research

Published

June 14, 2026

1 Introduction: Mobile Workstation Context and Field Worker Tracker

This paper describes an architectural extension of the autonomous digital simulation engine (Core Simulation Engine), tailored specifically to the requirements of the agricultural sector. Unlike the first application, FoodLifeCycleApp, the current simulation perimeter shifts from a domestic environment (similar to the enterprise version) into an industrial B2B segment. The objects of simulation are the operational activities of field inspectors, manual laborers, agronomists, and other workers executing physical tasks across a distributed geographical footprint.

The core engineering challenge of the platform is the non-linear generation of a so-called “dirty” digital footprint. This footprint is formed by manual laborers interacting with their mobile workstations. These operational field conditions subject the human agents to specific stressors that fundamentally alter their behavioral models:

  • Severe climate exposure (extreme temperature peaks, gale-force winds, heavy precipitation).
  • Physical exhaustion and cumulative cognitive fatigue throughout the work shift.
  • Unstable GSM network coverage, forcing the mobile workstation to operate in offline modes with subsequent batch data offloading.

The transaction arrays generated by the simulator are transmitted to the live API of the external target system via actual network calls from the mobile application. The logs collected at the end of the day serve as a reference baseline for stress-testing external analytical platforms: process topology reconstruction modules (Process Mining) and internal fraud detection perimeters (Forensic Analysis).

2 Behavioral Factor Modeling for Field Workers

A worker’s digital twin (\(DT_i\)) is initialized in the In-Memory registry as a multidimensional feature vector. In this model, the metabolic parameters from the previous paper are replaced with physical and operational degraders:

\[\mathbf{DT}_i = \langle \mathbf{A}_{\text{agro}}, E_{\text{fatigue}}, K_{\text{climate}}, C_{\text{network}}, H_{\text{anxiety}} \rangle\]

Where:

  • \(\mathbf{A}_{\text{agro}}\) — The Crop Priority Matrix1, containing weight coefficients representing the agent’s subjective priority toward specific fields or crops (e.g., wheat vs. forage grasses).
  • \(E_{\text{fatigue}} \in [0.0 \dots 1.0]\) — The dynamic physical and cognitive exhaustion level of the worker2, continuously incremented by the macro-orchestrator with each hour of the shift.
  • \(K_{\text{climate}} \in [0.0 \dots 1.0]\) — The climate pressure coefficient, tied to the intra-day sinusoid3.
  • \(C_{\text{network}} \in \{0, 1\}\) — A binary flag indicating cellular network availability in the current geographical zone.
  • \(H_{\text{anxiety}} \in [1.0 \dots 5.0]\) — The systemic anxiety coefficient (stress factor), which escalates, for instance, during mobile workstation validation errors.

2.1 Stochastic Event Trigger Algorithm via Softmax

To ensure strict normalization and map calculated behavioral factors into a probability space of \([0 \dots 1]\), the simulation engine maps the agro-agent’s multidimensional state vector using the exponential Softmax operator4.

At each time step \(t\), for each active digital twin, the engine first calculates a vector of raw logits (intent intensities) \(\mathbf{S}(t) = \{s_{\text{routine}}, s_{\text{bypass}}, s_{\text{anomaly}}\}\). The logit intensity for executing a routine operation in the field (or greenhouse) (\(s_{\text{routine}}\)) is defined by the following stochastic function:

\[s_{\text{routine}}(t) = (1 - E_{\text{fatigue}}(t)) \cdot (1 - K_{\text{climate}}(t)) \cdot \mathbf{A}_{\text{agro}, i}\]

The climate pressure coefficient \(K_{\text{climate}}(t)\) models the midday heat peak and is tied to the angular frequency of the simulated day \(\omega\):

\[K_{\text{climate}}(t) = K_{\text{base}} + \Delta K \cdot \max\left(0, \sin(\omega t - \phi)\right)\]

Where \(\phi\) is the phase shift that moves the peak temperature workload to 14:00 of the simulated time. As fatigue \(E_{\text{fatigue}}\) and climate pressure escalate, the routine logit \(s_{\text{routine}}\) degrades, while the logits for loopholes (\(s_{\text{bypass}}\))5 and anomalies (\(s_{\text{anomaly}}\)) grow exponentially:

\[s_{\text{bypass}}(t) = \exp\left(E_{\text{fatigue}}(t) \cdot H_{\text{anxiety}}(t)\right)\]

The mapping to the final probability vector \(\mathbf{P}(t)\) is performed via Softmax normalization:

\[p_k(t) = \frac{e^{s_k(t)}}{\sum_{j} e^{s_j(t)}}\]

3 IT Domain Architecture and SQL Master Data Structure

The simulator operates as an isolated In-Memory domain deployed within the host machine’s RAM to eliminate disk latency overhead. The business process topology, employee roles, and the loopholes available to them are strictly governed by a relational SQL Master Data structure (SQLite/PostgreSQL). This design guarantees that agents interact exclusively with valid endpoints of the actual mobile application.

WarningImportant Note

This public documentation does not cover all steps and scenarios for the application specifically, or for the digital business process simulation ecosystem as a whole.

SQL Structure Example
-- Registry of field worker job profiles
CREATE TABLE job_profiles (
    profile_id SERIAL PRIMARY KEY,
    role_code VARCHAR(50) UNIQUE NOT NULL,
    profile_name VARCHAR(150) NOT NULL,
    department VARCHAR(100) NOT NULL
);

-- Registry of end-to-end agricultural processes
CREATE TABLE business_processes (
    process_id VARCHAR(50) PRIMARY KEY,
    process_name VARCHAR(255) NOT NULL,
    description TEXT
);

-- Routine process steps and their mapping to mobile API endpoints
CREATE TABLE process_steps (
    step_id SERIAL PRIMARY KEY,
    process_id VARCHAR(50) REFERENCES business_processes(process_id) ON DELETE CASCADE,
    step_number INT NOT NULL,
    activity_code VARCHAR(100) NOT NULL,
    endpoint VARCHAR(255) NOT NULL,
    UNIQUE(process_id, step_number)
);

-- Role-Based Access Control (RBAC) permission matrix
CREATE TABLE profile_permissions (
    permission_id SERIAL PRIMARY KEY,
    profile_id INT REFERENCES job_profiles(profile_id) ON DELETE CASCADE,
    step_id INT REFERENCES process_steps(step_id) ON DELETE CASCADE,
    UNIQUE(profile_id, step_id)
);

-- Registry of allowed built-in interface loopholes (drafts/offline)
CREATE TABLE allowed_bypasses (
    bypass_id VARCHAR(50) PRIMARY KEY,
    process_id VARCHAR(50) REFERENCES business_processes(process_id) ON DELETE CASCADE,
    from_step INT NOT NULL,
    to_step INT NOT NULL,
    required_trigger VARCHAR(100) NOT NULL
);

4 Sequence Diagram: Agricultural Worker Session and Telemetry Transmission

To provide a detailed description of how the internal simulator components interact with the live agricultural platform API, an end-to-end execution model for a time step has been designed. All internal computations, geofence polygon processing, and local draft logic are isolated within RAM (In-Memory Sandbox). Requests to the mobile backend are executed via an asynchronous HttpClient without utilizing stubs at the network layer.

sequenceDiagram
    autonumber
    
    box rgb(240, 245, 255) Internal Simulation Loop (In Memory Sandbox)
        participant Orch as DayOrchestrator Dispatcher
        participant Agent as DigitalTwin Agent Thread
        participant Valid as Geofence Validator Module
    end
    
    box rgb(255, 245, 240) External Target System (Mobile Backend)
        participant API as Live Agricultural API
    end

    Orch->>Agent: Initialize shift work time step
    activate Agent
    
    Agent->>API: HTTP POST /api/v1/auth/login (JWT Session Authentication)
    activate API
    API-->>Agent: HTTP 200 OK (Returns Access Token & Session Key)
    deactivate API

    Agent->>Agent: Calculate intent vector based on fatigue and heat
    Agent->>Agent: Generate random number and select action

    alt Routine Step: Logging Crop Inspection (ROUTINE)
        開設->>Valid: Request GPS coordinate validation for current field
        activate Valid
        Valid-->>Agent: Coordinates inside polygon (Geofence OK)
        deactivate Valid
        Agent->>API: HTTP POST /api/v1/fields/report (Send Geo DTO)
        activate API
        API-->>Agent: HTTP 202 Accepted (Form data saved)
        deactivate API

    else Loophole: Editing Local Draft (ALLOWED_BYPASS)
        Agent->>Agent: Save DTO to application local cache (Offline Mode)
        Agent->>Agent: Re-open and modify draft stochastically in memory
        Agent->>API: HTTP PUT /api/v1/drafts/update (Flush accumulated batch)
        activate API
        API-->>Agent: HTTP 200 OK (Draft synchronized)
        deactivate API

    else Submitting Media Reports: Defect Photos and Voice Logs
        Agent->>API: HTTP POST /api/v1/media/upload-photo (Binary JPEG file)
        activate API
        API-->>Agent: HTTP 201 Created (Media server accepted crop/leaf disease image)
        deactivate API
        Agent->>API: HTTP POST /api/v1/media/upload-audio (Whisper Voice Report)
        activate API
        API-->>Agent: HTTP 200 OK (Audio dispatched for text recognition)
        deactivate API

    else Critical Anomaly: Invalid Coordinates (ANOMALOUS_BYPASS)
        Agent->>Valid: Request location (Agent physically skipped distant sector)
        activate Valid
        Valid-->>Agent: Coordinates outside polygon (Geofence Violation)
        deactivate Valid
        Agent->>API: HTTP POST /api/v1/fields/report (Spoofed GPS Coordinates)
        activate API
        API-->>Agent: HTTP 403 Forbidden (Backend detected location fraud)
        deactivate API
        Agent->>Agent: trigger_incident_shock (Worker stress increases due to validation error)
    end
    
    Agent-->>Orch: Write time step results to global daily event log
    deactivate Agent

5 Decomposition of Destructive Anomaly Classes and Field Telemetry

The uniqueness of the digital footprint generated by the simulator lies in its transition from pure textual DTO transactions to dense streams of heavy binary metadata. Under the influence of high climate pressure and extreme fatigue (\(E_{\text{fatigue}} \to 1.0\)), digital twins begin to intentionally violate mobile workstation regulations, creating three specific anomaly classes for subsequent Forensic analysis.

5.1 Audio Report Simulation and Whisper Mock Integration

When recording crop defects in remote fields, regulations require the worker to dictate a voice description of the issue. The simulator reproduces this process using a specialized media content generation circuit:

  1. Pseudo-Audio Stream Formation: The agent generates a binary array equivalent in duration and sampling rate to a real voice message in .wav or .ogg format.
  2. Text Draft Generation (Whisper Metadata): In parallel, the simulator generates a text string — a transcript that mimics real human speech while working in a field or greenhouse (incorporating specific agricultural terminology, stutters, pauses, and background wind noise). This text is packed into the HTTP request headers sent to the /api/v1/media/upload-audio endpoint.

By analyzing these outputs, external Process Mining analytical systems can correlate the heavy audio file upload timestamp, the Whisper neural network transcription metadata, and the final defect log card to uncover hidden latencies in operational incident handling.

5.2 Spatiotemporal Validation and Invalid Coordinates (Geofencing)

The Geofence Validator circuit within the simulator’s memory stores the exact polygons (boundaries) of all the enterprise’s agricultural fields and greenhouses. Every routine agent action must undergo a validation check for geographic coordinate intersections (the DTO coordinates must fall within the polygon of the assigned field).

The simulator reproduces two data falsification scenarios with high mathematical precision:

  • The “Skipped Plot” Scenario: An exhausted employee decides to skip a distant field plot. The simulator submits the inspection DTO form but generates static or looped GPS coordinates (Location Spoofing) copied from historical data logs (if the application interface permits such an action).
  • The “Off-Site Reporting” Scenario: The agent physically fails to reach the field on foot due to the intense heat but submits reports from an entirely different location. Consequently, the intervals between the fake geolocations in the API requests become unrealistically tight. On Process Mining charts, this instantly triggers anomalous transactions where the travel speed between points physically exceeds the maximum allowable 5 km/h for a walking laborer. The target backend blocks these requests with an HTTP 403 Forbidden status, which escalates the digital twin’s internal stress via the trigger_incident_shock function.

6 Conclusion

The developed modification of the Core Simulation Engine successfully demonstrates the invariance and scalability of the simulator’s core mathematical nucleus when transitioning from a consumer-centric context to an industrial B2B environment. The integration of specialized destructors (climate pressure, physical fatigue) paired with the exponential Softmax operator enabled an organic distribution of digital worker intents throughout a shift.

The In-Memory Sandbox architecture guarantees that heavy geospatial computations (Geofencing) and binary audio/photo metadata generation are isolated from external blocking backend calls, maintaining a consistently high iteration velocity for simulation time steps. The “dirty” digital footprint formed during simulation—containing protocol bypass attempts, coordinate spoofing, and cascading batch data offloads from offline mode—serves as an indispensable baseline for verifying and training automated audit algorithms (Process Mining) and internal fraud prevention modules within the agricultural sector.

Footnotes

  1. The Crop Priority Matrix is utilized in agronomy and farm management as a planting planning tool. It assists farmers or agricultural enterprises in determining which specific crops to cultivate during the current season when resources (land, budget, water, machinery) are constrained. Typically structured as a two-dimensional matrix (\(2 \times 2\)), crops are evaluated along two critical axes: profitability and market demand (High/Low margin, market demand) versus cultivation complexity and risks (weather dependence, irrigation requirements, pest vulnerability).↩︎

  2. The Dynamic Level of Physical and Cognitive Fatigue is a continuously shifting state of an employee, reflecting the accumulation of tiredness under current workloads and their capacity for recovery during work operations. In modern ergonomics and Work Health and Safety (WHS) management, exhaustion is no longer viewed as a static metric recorded at the end of a shift. It is a non-linear, wave-like process where physical fatigue (muscular fatigue, tremors) and cognitive exhaustion (decreased concentration, slowed reaction times) continuously intertwine and compound one another.↩︎

  3. A dynamic mathematical multiplier in ergonomics and occupational physiology that adjusts the rate of a worker’s fatigue accumulation based on cyclic diurnal changes in environmental parameters (temperature, humidity, solar radiation). This coefficient integrates directly into the previously described dynamic worker exhaustion model, superimposing a circadian climate wave onto the human agent’s baseline resource expenditure.↩︎

  4. The exponential Softmax operator is a mathematical function that transforms a vector of arbitrary real numbers (known as logits) into a probability vector. In the context of employee state monitoring systems (e.g., when calculating dynamic exhaustion), Softmax serves as a critical link. It takes the “raw” calculated risks from various models (physical fatigue, cognitive pressure, climate pressure coefficient \(K_{\text{climate}}\)) and maps them into clear, normalized probabilities indicating the exact operational zone (Green, Yellow, Orange, or Red) the worker occupies at any given time.↩︎

  5. In the context of end-to-end dynamic systems that monitor employee states, bypass logits (\(s_{\text{bypass}}\)) represent specialized mathematical components introduced into the logit vector prior to passing it to the Softmax operator. Their primary purpose is to block system false positives (“loopholes”) or, conversely, to allow critical signals to bypass standard neural network weights when a situation escalates out of control.↩︎