The production flexibility required by the new industrial revolutions is largely based on heterogeneous Cyber-Physical Production Systems models that cooperate with each other to perform complex tasks. To accomplish tasks at an acceptable pace, CPPSs should be based on appropriate cooperation mechanisms. To this end a CPPS must be able to provide services in the form of functionalities to other CPPSs, and also to use functionalities of other CPPSs. The cooperation of two CPPS systems is done by co-simulating the two models that allow the partial or total access of the functionalities of one system, by the other system. Requests from one CPPS to another CPPS create connection moments of the two models that can only be performed in certain states of the two models. Also, the answers to these requests create connections between the two models in other subsequent states. Optimal aggregation of the behaviors of the two models, by co-simulation, is essential because otherwise it can lead to very long waiting times and can cause major problems if not done correctly. We will see in this paper that the behavior of such a simulation model can be represented by a category, and the co-simulation of two models can be defined by a monad determined by two adjoint functors between the simulation categories of the two models.