I’m planning to build a market simulator with heterogeneous agents for the purpose of experimenting with and tuning various execution strategies. Agents would be able to react to the order book, view shared private state, and execute scheduled algos. I’m curious whether anyone has done something similar or has any general thoughts on the structure and appropriatness of kdb.My first thought was to just structure the simulation like a production async system: each agent would be a separate kdb process and would communicate with a simulated execution venue via a ticker plant. I’d be able to reuse my production code with minimal modification, but I’m guessing I’d have problems as I sped up the simulation (target would be around 10,000x normal speed). Performance would be poor and event scheduling would break down. E.g., an aglo that periodically slept 100ms at normal speed couldn’t be made to reliably run while only sleeping 10us.So I’m thinking a coordinated, single-threaded approach will be needed where every agent could only send/receive events at a fixed interval. Each iteration might simulate a real 50ms window and agent ordering would be randomized. The downside to this approach is that production code couldn’t be used directly and I’d be limited by a minimum time-scale granularity. I also might still need to switch to a compiled language to get decent performance.Thoughts?