package solver

// Set the workload by setting solver.row1s
func (solver *Solver) setWorkload(agents []int) {
	var start int = 0
	var finish int = 0
	for key, value := range agents {
		if key == solver.Controller.Part-1 {
			finish = start + value
			break
		} else {
			start += value
		}
	}

	// Set the shortened set of instructions
	solver.row1s = solver.row1s[start:finish]

	// Recalculate how much we need to grind through
	solver.Iter = uint64(len(solver.row1s)) * uint64(len(solver.row2s)) * uint64(len(solver.row3s)) * uint64(len(solver.row4s)) * uint64(len(solver.row5s)) * uint64(len(solver.row6s)) * uint64(len(solver.row7s)) * uint64(len(solver.row8s)) * uint64(len(solver.row9s))
}
