Metastasis is the major cause for cancer patients' death, and despite all the recent advances in cancer research it is still mostly incurable. Understanding the mechanisms that are involved in the migration of the cells in a complex environment is a key step towards successful anti-metastatic treatment. Using experimental data-based modeling, we focus on the fundamentals of metastatic invasion: motility, invasion, proliferation and metabolism, and study how they may be combined to maximize the cancer's ability to metastasize. The modeled cells' performance is measured by the number of cells that succeed in migration in a maze, which mimics the extracellular environment. We show that co-existence of different cell clones in the tumor, as often found in experiments, optimizes the invasive ability in a frequently-changing environment. We study the role of metabolism and stimulation by growth factors, and show that metabolism plays a crucial role in the metastatic process and should therefore be targeted for successful treatment.