# PBRF Layer 2 NBM v0.4 Initial Simulation Plan ## 1. Objective This document outlines the plan for initial computational experiments using the refined PBRF Layer 2 formalism, the Dynamic Causal Influence Network (DCIN) v0.4, as defined in [[archive/projects/PBRF/0235_PBRF_L2_NBM_Definition_v0.4]]. The primary goals of these simulations are: 1. **Verification:** Re-verify the conservation mechanism (REQ-L2-06) with the modified flow calculation. 2. **Persistence Mechanism Exploration:** Observe the qualitative effects of the *new* persistence feedback mechanism (resistance to flux, controlled by `β`) on dynamics. Compare directly with v0.3 results. Does it promote stability or aggregation differently? 3. **Context Mechanism Exploration:** Observe the qualitative effects of the newly defined context mechanism (average neighbor state influencing potential, controlled by `ε`). 4. **Basic Behavior:** Explore diffusion/equilibration and potential pattern formation tendencies on simple network structures under the new rules. ## 2. Formalism Recap (DCIN v0.4) * **Network:** Directed graph `G=(V, E)` with static edge weights `w_ji ≥ 0`. * **States:** Node state `S_i ∈ ℝ`, Node persistence `P_i ∈ ℝ≥0`. * **Context:** `Context_i(t) = [ Σ_{k∈N_{in}(i)} w_{ki} S_k(t) ] / [ Σ_{k∈N_{in}(i)} w_{ki} ]`. * **Potential:** `Φ_i(t) = S_i(t) * (1 + ε * Context_i(t))`. * **Flow:** `Flow_{ji}(t) = [ w_{ji} / (1 + β * P_i(t)) ] * (Φ_j(t) - Φ_i(t))`. (Persistence `P_i` at *receiving* node resists flow). * **State Update:** `S_i(t+1) = S_i(t) + Δt * [Net Flow]` (inherently conservative). * **Persistence Update:** `P_i(t+1) = P_i(t) * exp(-γ * |ΔS_i|) + δ * (1 - exp(-γ * |ΔS_i|))`. ## 3. Simulation Setup * **Environment:** Standard scientific computing environment (e.g., Python with NumPy/SciPy). * **Time:** Discrete sequence steps `t = 0, 1, 2, ...`. Set `Δt = 1`. * **Default Parameters:** `γ = 0.1`, `δ = 0.1` (unless varied). * **Initial Conditions:** * `S_i(0)`: Specific patterns (e.g., single peak, step function) or random noise around baseline. * `P_i(0)`: Typically initialized low (e.g., `P_i(0) = δ`). * `w_ji`: Defined by topology (e.g., uniform weights). ## 4. Proposed Experiments **Experiment 1: Conservation Verification (v0.4)** * **Objective:** Numerically verify that `Σ_i S_i(t)` remains constant with the v0.4 flow rule. * **Network:** Small, closed networks (e.g., 3-node cycle, 5-node random graph). * **Parameters:** Arbitrary initial `S_i(0)`, `P_i(0)`, `w_ji`. Set `β > 0` and `ε ≠ 0` to ensure all mechanisms are active. * **Procedure:** Run simulation for T steps (e.g., T=100). Calculate `TotalS(t) = Σ_i S_i(t)` at each step. * **Expected Outcome:** `TotalS(t)` should remain constant within machine precision. * **Analysis:** Plot `TotalS(t)` vs `t`. Check for drift. **Experiment 2: Diffusion Baseline (v0.4: `β=0, ε=0`)** * **Objective:** Establish baseline diffusion behavior without persistence or context effects. * **Network:** 1D chain (N=51 nodes), reflecting boundaries. `w=1` for adjacent nodes. * **Parameters:** Set `β = 0`, `ε = 0`. Initial condition: Single peak `S_25(0) = 1.0`, others 0. `P_i(0) = δ`. * **Procedure:** Run simulation until near equilibrium (e.g., T=500). * **Expected Outcome:** Standard diffusion towards uniform `S_i`. `P_i` evolves based on local `ΔS_i`. (Should replicate Exp 2 from v0.3). * **Analysis:** Plot `S_i(t)` and `P_i(t)` profiles. **Experiment 3: Effect of Persistence Resistance (`β > 0, ε=0`)** * **Objective:** Observe how persistence-as-resistance affects dynamics. Compare to v0.3 (potential enhancement). * **Network:** Same as Exp 2 (1D chain). * **Parameters:** Set `ε = 0`. Vary `β > 0` (e.g., 0.1, 1.0, 10.0). Initial condition: Single peak `S_25(0) = 1.0`, others 0. `P_i(0) = δ`. * **Procedure:** Run simulation (e.g., T=500 or longer if dynamics slow). * **Expected Outcome (Hypothesis):** High `P_i` at a node `i` will reduce flow *into* and *out of* it. This should *slow down* the diffusion/equilibration process compared to `β=0`. Will this resistance allow the initial peak to persist longer? Could it lead to sharper interfaces or prevent low-`S` regions from being invaded? Will it promote aggregation by making existing high-`S` regions resistant to dissipation? * **Analysis:** Compare `S_i(t)` and `P_i(t)` profiles for different `β` values and against the `β=0` baseline (Exp 2) and the v0.3 results (Exp 3 from [[0234]]). Measure equilibration time or peak decay rate. Look for signs of pattern stabilization or aggregation. **Experiment 4: Effect of Context Modulation (`ε ≠ 0`)** * **Objective:** Observe the effect of context (average neighbor state) influencing potential. * **Network:** 1D chain (N=51) or small graph with varying connectivity. * **Parameters:** Set `β` to 0 or a fixed positive value. Vary `ε` (e.g., -1.0, -0.1, 0.1, 1.0). Initial condition: Step function (e.g., `S_i=1` for `i<25`, `S_i=0` for `i>=25`) or random noise. * **Procedure:** Run simulation. * **Expected Outcome (Hypothesis):** * Positive `ε`: Nodes with high-`S` neighbors will have higher potential `Φ`, potentially increasing outflow from those neighbors towards the node (if `S_i` is lower) or increasing outflow from the node itself (if `S_i` is higher). Might enhance contrast or accelerate dynamics near interfaces. * Negative `ε`: Nodes with high-`S` neighbors will have lower potential `Φ`, potentially inhibiting flow from those neighbors or reducing outflow from the node. Might dampen dynamics or smooth interfaces. * **Analysis:** Compare `S_i(t)`, `P_i(t)`, `Φ_i(t)` profiles for different `ε` values. Analyze flow patterns near interfaces or regions with varying context. ## 5. Outputs and Analysis * Time series data for `S_i(t)`, `P_i(t)`, `Φ_i(t)`. * Calculation of total `Σ S_i(t)` (for Exp 1). * Plots of spatial profiles `S_i`, `P_i`, `Φ_i` at different times `t`. * Comparison plots for different parameter values (`β`, `ε`) vs. baselines (v0.4 `β=0`, v0.3 results). * Quantitative metrics (e.g., equilibration time, peak height decay rate, interface width) if applicable. ## 6. Scope and Limitations * Focus on verifying core mechanics and exploring qualitative effects of new persistence/context rules on simple topologies. * Static topology (`w_ji` fixed). * Limited parameter exploration. * Does not aim to reproduce specific physical phenomena yet. Results will guide further refinement of the DCIN formalism, particularly the effectiveness of the persistence-resistance mechanism for pattern stabilization/aggregation and the role of the context term. **Next Step:** Implement the DCIN v0.4 model and execute these experiments. Create node `0237_PBRF_L2_NBM_v0.4_Initial_Sim_Results`.