make traveling salesman solver's api more flexible