Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ethernetdan/05ca4e952c106237be976a49f382e9fb to your computer and use it in GitHub Desktop.
Save ethernetdan/05ca4e952c106237be976a49f382e9fb to your computer and use it in GitHub Desktop.
Test Matrix
1. Create [][]*Variant the size of the number of scenarios.
1. Sort scenarios by number of variants
2. Descending from highest variant, iterate through each scenario (greedy)
a. Create []*Variant array (size of number of variants)
b. Iterate through each variant:
i. Iterate through machines, attempting to add variant constrained by:
a) scenarios are mutually exclusive
b) scenario exclusion list
ii. Create machine if no acceptable machine can be found.
iii. Add pointer to variant to []*Variant array for scenario
3. Iterate through [][]*Variant:
a. Shuffle values of []*Variant
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment