In this paper we present a general framework for simulating and optimizing the operational decisions in a supply chain network. We developed a supply chain network library for the simulation software AnyLogic (© XJ Technologies) and a linearized version as an optimization model implemented using XpressMP (© Dash Optimization). Aggregated results for the simulation experiments are fed into the optimization model. The solution of the optimization model is used to improve operational decision in the supply chain. In order to gain good results this process is repeated until a stable solution is reached. This approach enriches the simulation framework by a powerful tool to improve the supply chain by simultaneously optimizing a large number of possible decisions.