mirror of
				https://github.com/ejeanboris/MDAF.git
				synced 2025-10-31 05:28:14 +00:00 
			
		
		
		
	urgency
This commit is contained in:
		| @@ -1,2 +1,12 @@ | ||||
| def main(args): | ||||
|     ''' | ||||
|  | ||||
|     :param args: list of floats | ||||
|     :return: float | ||||
|      | ||||
|  | ||||
| 	 | ||||
| 	''' | ||||
|     return 100*(args[1]-0.01*args[0]**2+1)+0.01*(args[0]+10)**2 | ||||
|  | ||||
|     return 0 | ||||
|   | ||||
							
								
								
									
										8
									
								
								SourceCode/TestFunctions/Keane.py
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										8
									
								
								SourceCode/TestFunctions/Keane.py
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,8 @@ | ||||
| #Import math library | ||||
| import math | ||||
|  | ||||
|  | ||||
| def main(args): | ||||
|     for x in args: | ||||
|         if(x<0 | x>10): return 0 | ||||
|     return (math.sin(args[0]-args[1])**2*math.sin(args[0]+args[1])**2)/(math.sqrt(args[0]**2+args[1]**2)) | ||||
							
								
								
									
										8
									
								
								SourceCode/TestFunctions/Leon.py
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										8
									
								
								SourceCode/TestFunctions/Leon.py
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,8 @@ | ||||
| #Import math library | ||||
|  | ||||
|  | ||||
| def main(args): | ||||
|     for x in args: | ||||
|         if x < -1.2 or x > 1.2: | ||||
|             return 0 | ||||
|     return (100*(args[1]-args[0])**2)+(1-args[0])**2 | ||||
							
								
								
									
										18
									
								
								SourceCode/TestFunctions/Matyas.py
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										18
									
								
								SourceCode/TestFunctions/Matyas.py
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,18 @@ | ||||
|  | ||||
| def main(args): | ||||
|     """ | ||||
|     >>> main([0,1]) | ||||
|     0.26 | ||||
|  | ||||
|     :param args: list of floats | ||||
|     :return: float | ||||
|  | ||||
|     """ | ||||
|     for x in args: | ||||
|         if x < -10 or x > 10: | ||||
|             return 0 | ||||
|     return (0.26*(args[0]**2+args[1]**2))-(0.48*args[0]*args[1]) | ||||
|  | ||||
| if __name__ == "__main__": | ||||
|     import doctest | ||||
|     doctest.testmod() | ||||
							
								
								
									
										16
									
								
								SourceCode/TestFunctions/McCormick.py
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										16
									
								
								SourceCode/TestFunctions/McCormick.py
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,16 @@ | ||||
| import math | ||||
| def main(args): | ||||
|     """ | ||||
|     >>>main([-0.547, -1.547]) | ||||
|     0 | ||||
|  | ||||
|     :param args: | ||||
|     :return: | ||||
|     """ | ||||
|     for args[0] in args: | ||||
|         if args[0] < -1.5 or args[0] > 4: | ||||
|             return 0 | ||||
|         if args[1] < -3 or args[1] > 3: | ||||
|             return 0 | ||||
|     return math.sin(args[0]+args[1])+(args[0]-args[1])**2-(3*args[0]/2)+(5*args[1/2])+1 | ||||
|  | ||||
							
								
								
									
										16
									
								
								SourceCode/TestFunctions/Miele_Cantrell.py
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										16
									
								
								SourceCode/TestFunctions/Miele_Cantrell.py
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,16 @@ | ||||
| import math | ||||
|  | ||||
|  | ||||
| def main(args): | ||||
|     """ | ||||
|     >>>main([0, 1, 1, 1]) | ||||
|     0 | ||||
|     :param args: | ||||
|     :return: | ||||
|     """ | ||||
|     for x in args: | ||||
|         if x < -1 or x > 1: | ||||
|             return 0 | ||||
|     return (math.exp(-args[0])-args[1])**4+(100*(args[1]-args[2])**6)+(math.tan(args[2]-args[3]))**4+args[0]**8 | ||||
|  | ||||
|  | ||||
| @@ -1 +0,0 @@ | ||||
|   | ||||
		Reference in New Issue
	
	Block a user