Coupling of QSP and ABM modules during simulation. (A) A group of species from the tumor compartment (Set A) including cancer cells, effector T cells (active and exhausted) and regulatory T cells (Tregs) are partially represented with the ABM tumor module. The fraction of tumor tracked in the QSP module is wQSP, and that weight is applied to the initial condition of these species and their transmigration into the tumor compartment. The other 1 − wQSP of the tumor compartment is represented by the ABM module (A1 and A2). The rest of the species (set AC) are fully accounted for by the QSP module, the partially weighted QSP is referred to here as QSP_w. (B) Cell counts in the ABM modules are scaled up to account for 1 − wQSP of the tumor when their contribution to the QSP is calculated during the simulation, depending on the number of ROIs chosen and the fraction of each tumor region in the whole-tumor volume. ki could vary in time when the tumor changes in size, shape or undergoes resection during treatment. (C) Flow of control during simulations. At the beginning of each time step, some ABM variables are updated from the QSP module, including central compartment concentration of Teff, Treg and anti-PD-1 agent. Then, the ABM module is simulated over time interval dt, followed by the simulation of QSP_w. At the end of the time step, relevant QSP variables in set AC are updated according to ABM simulation results.