Air-gun arrays can be encoded by firing individual air guns sequentially over a range of time. This marine source encoding is shown to be particularly beneficial for simultaneous source separation, which can exploit the orthogonality of the encoding sequences to improve the source separation. We have developed a method to design encoding sequences for air-gun arrays having minimized crosscorrelation and optimized autocorrelation properties. By varying the firing times of the individual air-gun subelements, different encoding sequences are constructed using a simulated annealing approach so that their orthogonality properties are optimized. These optimized sequences are then used for time-dithered simultaneous source encoding. Realistic synthetic data examples show a significant improvement of simultaneous source separation. We have also determined the robustness of the method for take-off angle variations and possible errors in sequence estimation.