I am new to optimization techniques and have a doubt in my approach.
Consider I have an agent which tries to optimize on 3 variables C1,x11,x12 to minimize power. I have 60 such agents which constitute a system. All these agents can be grouped into one category, and C1 as common variable to all of them. So agent2 optimizes on C1,,x21,x22. Agent 3 on C1,x31,x32 and so on...
I have tried optimizing in a combined approach where my optimizer optimizes on (C1,x11,x12,x21,x22,x31,x32...) If the number of agents are less it is feasible but as the number of agents increase, if becomes computationally expensive and not feasible.
If I try to optimize each agent indiviually, each of these agents give different C1 , which is a common variable to all the agents. But since, C1 is a common variable to all the agents , all the agents should co-ordinate and have a common value.
Can someone help with how to takle his problem. Which is a better approach for my use case.
I am currently using scipy differential evolution algorithm Code for combined approach
from scipy import optimize
bounds = [(15,18),(500,1500),(20,50),(500,1500),(20,50),(500,1500),(20,50),(500,1500),(20,50),(500,1500),(20,50),(500,1500),(20,50) ......]
arguments = [25,25000,24,32500,25,32500,24,22000,23.5,24000,25,42000,25,32500 ....]
start = time.process_time()
res = optimize.differential_evolution(objective,bounds,args=arguments,disp=False)
print('Time taken:' + str(time.process_time() - start))
print('Optimized x values:' + str(res.x))
print('Optimized Fun Value:' + str(res.fun))
code for individual approach
start = time.process_time()
for i in range(0,61):
arguments = (agr1[i],arg2[i],agent_models[i])
res = optimize.differential_evolution(optimization_distributed,bounds,args=arguments,disp=False)
print('Optimized x values:' + str(res.x))
print('Optimized fun_val:' + str(res.fun))
print('-----------------------------------------------------------------')
print('Time taken:' + str(time.process_time() - start))
I'm open to change my technique and strategy for better results. Thanks
Ask asked in comments:
I have a function f1=f1(c1,x11,x12)
to be minimized for values of c1,x11,x12
which can vary in a definite bounds,subject to g1(c1,x11,x12) < 0
.
like wise I have multipe functions `, f2,f3...f60 .
f2 can be represented as f2(c1,x21,x22) to be minimized for values of c1,x21,x22 which can vary in a definite bounds,subject to g2(c1,x21,x22) < 0.
f3 can be represented as f3(c1,x31,x32) to be minimized for values of c1,x31,x32 which can vary in a definite bounds,subject to g3(c1,x31,x32) < 0.
So here if we see c1 is comman variable to all the functions.
like wise f4,f5...f60, with constraints as g4,g5,g6..
My end objective is minimize summation of f1,f2,f3...f60.
i.e
min f1(c1,x11,x12) + f2(c1,x21,x22) + f3(c1,x31,x32) + ... + f60(c1,x601,x602)
s.t. g1(c1,x11,x12) < 0
, g2(c1,x21,x22) < 0
,g3(c1,x31,x32) < 0
......
,g601(c1,x601,x602) < 0