This script simulates assignable per-agent choices under a common probe/price vector and reconstructs each agent’s utility via Afriat's Theorem. Because each agent’s bundle is observed at every time step (probe–response pairs), agents are identified without label ambiguity.
-
Simulate data (generator):
Fort = 1..N, draw a probe vectora_tand solve a constrained nonlinear program that allocates resources acrossMagents, maximizing a weighted sum of known utility shapes (used only for simulation). Constraint:
[ \sum_{j=1}^M a_t^\top, b_{j,t} \le y_t. ] -
Reconstruct utilities (Afriat per agent):
For each agent ( j ), solve the Afriat LP to obtain ( {u_{j,t}, \lambda_{j,t}}{t=1}^N ) such that: [ u{j,t} \le u_{j,s} + \lambda_{j,s}, a_s^\top\big(b_{j,t} - b_{j,s}\big) - \phi_j \quad \forall s,t. ] This yields a piecewise-linear concave utility representation for that agent. -
Diagnostics & plots:
Prints the max Afriat violation per agent (should be ~≤ 0 up to tolerance) and plots Agent j Reconstructed Utility vs Agent j True Utility.
This script compares a coordinating regime (responses generated by optimizing a scalarized multi-objective utility under a linear budget) against a non-coordinating regime (random, noisy responses).
For each noise level it:
- Simulates probe vectors (a_t) and noisy responses (\beta_t).
- Builds the empirical CDF of a noise-driven statistic (M=\max_{t\neq s} a_t^\top(\varepsilon_t-\varepsilon_s)).
- Solves an Afriat-style LP to obtain (\Phi^*) (the minimal slack (\phi)).
- Reports the summary metric (1-\widehat F_\Psi(\Phi^*)) and aggregates over Monte Carlo runs.
Higher values of this metric indicate data that look more consistent with coordination at that noise level.
MATLAB code for simulating robust revealed preference (RP) utility reconstruction under noisy multi-agent decision data.
It implements both the classical Afriat inequalities and a distributionally robust extension (finite-reduction algorithm), and evaluates their predictive performance.
- Data generation: Synthetic agent responses are generated by solving multi-objective optimization problems under random probes.
- Noise model: Gaussian noise is added to observed responses at varying levels.
- Reconstruction methods:
- Classical Afriat (LP-based)
- Robust Afriat (finite-reduction)
- Evaluation: Reconstructed utilities are tested out-of-sample. Performance is measured via:
- Average prediction error
- Worst-case prediction error
- Outputs: Plots comparing classical vs. robust methods, and statistics across Monte Carlo runs.
Robust_rp.m– Main MATLAB script (run this file to reproduce experiments).- Helper functions are defined inline at the bottom of the script:
af_eval– Evaluates Afriat inequality violations.mcval,mcval2– Subproblem objectives for robust optimization.L1dist– Computes L1 distance between true and reconstructed utilities.RPcon3– Constraint generator for robust subproblem.