First script for optimising the weights for the tawSolver.