Reputation: 1
I have a dataset like this, and I have to make an optimization model. (I've been trying to use scipy.optimize in python) the objective function goes like this:
(variable for row 1)(row1['KPI 1']+row1['KPI 2']+row1['KPI 3']) + (variable for row 2)(row2['KPI 1']+row2['KPI 2']+row2['KPI 3']) + (variable for row 3)*(row3['KPI 1']+row3['KPI 2']+row3['KPI 3']) + ... and so on until the last row.
but the problem is, the practical dataset that will be used for this, will have at least 200 rows and this has to be made ready for any dataset that might have a different number of rows. so I have to come up with a way to make the variables get created automatically to match the number of rows.
I already tried this way.
x = []
x = [2 for i in range(len(data1))]
And I think it can be used to create variables but in the end it doesn't work with the minimize function.
I cannot find a single source on the internet that shows how to make variables get created automatically with scipy.optimize. is it not possible with scipy? if not, suggest me another method where it's possible.
Upvotes: 0
Views: 36