I have a list of customers and each of them can be "activated" in four different ways:
n= 1000
df = pd.DataFrame(list(range(0,n)), columns = ['Customer_ID'])
df['A'] = np.random.randint(2, size=n)
df['B'] = np.random.randint(2, size=n)
df['C'] = np.random.randint(2, size=n)
each customer can be activated either on "A" or on "B" or on "C" and only if the Boolean related to the type of activation is equal to 1.
In input i have the count of the final activations. es:
Target_A = 500
Target_B = 250
Target_C = 250
The random values in code are an input for the optimizer and represent the possibility or not to activate the client in that way. How can I associate the client with only one of those in order to respect the final targets? How can I minimize the distance between the count of real activation and the input data?
Do you have any tested examples? I think this might work but not sure: