Closed KKobuszewski closed 1 year ago
There was a problem with proper including the last leftover. It's solved with additional call after the loop
""" for (int it=0; it<n; it++) { if (current_id != material_id[it]) { leftovers[current_id] = material_length[current_id] - sum; sum = 0.0; current_id += 1; } sum += state[it]; } // NOTE: Loop ends before counting last leftover // need to find last leftover leftovers[current_id] = material_length[current_id] - sum; """
test leftovers more carefully