In one embodiment, a method includes identifying at a network device, metrics associated with constraints of an optimization problem, receiving values for the metrics from a stream reasoner, obtaining an initial solution of the optimization problem from a linear programming solver based on the values of the metrics, and instructing the linear programming solver to calculate a new solution to the optimization problem when the stream reasoner indicates that the constraints of the optimization problem are violated. An apparatus and logic are also disclosed herein.