first non working pass at making tripoptimizer take a Trip model as an input