#f = revf.gaussian_diff_multimodal4_positive_max #test_function_shape(f, -r, r,dim) #dim =2 lb = [0 for i in range(dim)] ub = [r for i in range(dim)] # alh = SwarmPackagePy.z_bfoa_general_v1_max(100, f, lb, ub, 2, 100, 8, 8, 4, 12, 0.1, 0.25, 0.1, 0.2, 0.1, 10, 100, 0.03, 'none', 'none', 'false', 'discrete','max') #alh = SwarmPackagePy.z_bfoa_general_v1_max(100, f, lb, ub, dim, 100, 8, 8, 4, 12, 0.1, 0.25, 0.1, 0.2, 0.1, 10, 100, 0.03, 'none', 'none', 'false', 'discrete','max') #alh = SwarmPackagePy.z_bfoa_general_v1_max(100, f, lb, ub, dim, 100, 8, 16, 4, 12, 0.1, 0.25, 0.1, 0.2, 0.1, 10, 100, 0.03, 'none', 'none', 'false', 'discrete','max') alh = SwarmPackagePy.z_bfoa_general_v1_max(100, f, lb, ub, dim, 100, 16, 16, 4, 12, 0.1, 0.25, 0.1, 0.2, 0.1, 10, 100, 0.03, 'none', 'none', 'false', 'discrete', 'max') print('Maximum Revenue : ', revf.MaxRev) print('Optimum Allocation : ', revf.OptAlloc) #print('Max Revenue : ',revf.OptAlloc) fits = alh._get_jfits() plt.plot(fits, 'b', label='J-fit') jcclist = alh._get_jcclist() plt.plot(jcclist, 'r', label='J-cc') jarlist = alh._get_jarlist() plt.plot(jarlist, 'g', label='J-ar')
#NICE WOW #alh = SwarmPackagePy.z_bfoa_general_v1(100, f, lb, ub, 2, 100, 8, 8, 4, 12, 0.1, 0.25, 0.1, 0.2, 0.1, 10, 100, 0.03, 'none', 'swarm2', 'false', search_type='discrete') #WOW BEST SO FAR - CELLULAR AUTOMATUM #alh = SwarmPackagePy.z_bfoa_general_v1(100, f, lb, ub, 2, 100, 8, 8, 4, 12, 0.1, 0.25, 0.1, 0.2, 0.1, 10, 100, 0.03, 'none', 'none', 'false', search_type='discrete') #GOOD BUT NOT VERY MUCH. BEST VALUE VARY #alh = SwarmPackagePy.z_bfoa_general_v1(100, f, lb, ub, 2, 100, 8, 8, 4, 12, 0.1, 0.25, 0.1, 0.2, 0.1, 10, 100, 0.03, 'none', 'swarm1', 'false', search_type='discrete') #alh = SwarmPackagePy.z_bfoa_general_v1(100, f, lb, ub, 2, 100, 8, 8, 4, 12, 0.1, 0.25, 0.1, 0.2, 0.1, 10, 100, 0.03, 'none', 'swarm2', 'false', search_type='discrete') #alh = SwarmPackagePy.z_bfoa_general_v1_max(100, f, lb, ub, 2, 100, 8, 8, 4, 12, 0.1, 0.25, 0.1, 0.2, 0.1, 10, 100, 0.03, 'none', 'swarm1', 'false', 'discrete','max') #alh = SwarmPackagePy.z_bfoa_general_v1_max(100, f, lb, ub, 2, 100, 8, 8, 4, 12, 0.1, 0.25, 0.1, 0.2, 0.1, 10, 100, 0.03, 'none', 'none', 'false', 'discrete','max') alh = SwarmPackagePy.z_bfoa_general_v1_max(100, f, lb, ub, 2, 100, 8, 8, 4, 12, 0.1, 0.25, 0.1, 0.2, 0.1, 10, 100, 0.03, 'adaptive1', 'swarm2', 'false', 'continuous', 'min') #TEST CASES ######################################################################## #DAMN WORSE - Lets change SOme Parametr Nc = 4 ''' n =100 #50 r = 20 lamda = 100 f = tf.gaussian_diff_multimodal_positive dim =2 alh = SwarmPackagePy.z_bfoa(100, f, -r, r, 2, 100, 8, 8, 12, 12, 0.1, 0.25, 0.1, 0.2, 0.1, 10, 100, 0.03, 'none', 'swarm1', 'false') '''