In this paper we describe an approach to the problem of automated policy generation for mobile ad hoc networks. The automated policy generation problem is difficult in its own right. It becomes even more challenging when the context environment to consider is a mobile ad hoc network. We have designed an optimization-based, utility-driven approach aimed at generating optimal policies with respect to the given network objectives. The main novelty of this approach is in the combination of optimization heuristics and network simulation to solve the problem. We describe this approach, present the software architecture of our implementation, and illustrate the approach with a case study on automated generation of DiffServ-based QoS policies for a 50-node mobile ad hoc network.