Shift dynamics modeling for optimizing slip control in a continuously variable transmission