moved optimisation library from pubsim