I feel bad that people don't get responses on here and i don't know the answer, so I asked AI. Hope this helps:
This is a very interesting capstone because you are combining three things that usually get treated separately: Leontief input-output structure, cybernetic feedback/control logic, and Bayesian updating.
A few thoughts on your three questions:
1. On the Kalman process-noise parameter
I would not treat the process-noise parameter as something you choose once and then leave alone. In your setting, it is basically the model’s belief about how quickly the underlying economic state can change between ticks. Because you are simulating at one tick per second, the parameter should not be interpreted as real economic time unless your ticks are explicitly standing in for days, weeks, or planning periods.
A principled capstone-level approach would be to estimate measurement noise from your simulated or observed output error, then tune process noise by looking at one-step-ahead prediction errors. If the filter is well tuned, the innovations should be roughly centered, not systematically biased, and not wildly overconfident.
For structural breaks, I would use an adaptive process-noise rule rather than a fixed value. For example, when the normalized forecast error exceeds a threshold for several ticks, temporarily inflate Q. That tells the filter that the old state estimate may no longer be reliable and that it should adapt faster. This is easier than implementing a full regime-switching Kalman filter, but it captures the basic idea.
So fixed Q is acceptable for the prototype, but adaptive Q is a stronger answer.
2. On Petkovich Case 6 and linear programming
For a 3x3 model, I would implement the linear programming solution rather than rely only on an iterative approximation. You do not need to hand-code the simplex algorithm unless the capstone requires it. Using a standard LP solver is perfectly defensible because the intellectual contribution is the modeling architecture, not reinventing simplex.
That said, an iterative approximation is acceptable if you clearly label it as a heuristic and validate it against the LP solution on small test cases. Since your model is only 3 sectors, you can probably do both: keep the iterative version for live visualization and use the LP solution as the benchmark for constrained cases.
That would actually make the project stronger. The dashboard can show how the cybernetic approximation converges toward the constrained optimum.
3. On updating the A-matrix coefficients
Applying a separate Kalman filter to each cell of the A matrix is a reasonable first prototype, but it has an important weakness: the cells of the A matrix are not really independent. A change in one input coefficient may be related to changes in others because of substitution, capacity constraints, accounting identities, or sector-level production relationships.
For a capstone, I would suggest one of three levels:
Simplest: update each coefficient with exponential smoothing or Bayesian weighted averaging. This is easy to explain and stable.
Intermediate: use one Kalman filter per row or column of the A matrix, so related coefficients move together.
Most advanced: treat the whole A matrix as the state vector in a multivariate Kalman filter. This is cleaner theoretically but more complex.
I would probably avoid independent filters for every cell unless you impose constraints afterward, such as non-negativity and plausible bounds on technical coefficients. Otherwise the filter may produce economically impossible coefficients.
My suggested path would be:
Use the Leontief inverse as the structural model.
Use Bayesian/Kalman updating for output now.
Use adaptive Q for structural breaks.
Use linear programming for Petkovich Case 6, at least as a validation benchmark.
Update the A matrix with constrained smoothing or row-level Bayesian updating before moving to a full matrix-state Kalman filter.
That keeps the project rigorous but still manageable for a capstone. The key is to explain that this is a cybernetic planning simulator, not a fully identified empirical macroeconomic model. The strength of the project is the control architecture: sensing, updating, constraint detection, escalation, and corrective allocation.