Skip to content

Using Particle Swarm Optimization Algorithm to find the maximize solution of the following problem Maximize𝑓(π‘₯,𝑦)=βˆ’π‘₯𝑠𝑖𝑛(4π‘₯)βˆ’1.1𝑦𝑠𝑖𝑛(2𝑦)+1 8≀x≀10; 10≀y≀13; x+y≀22 Expect to get maximum 23.0063 at (x,y)=(9.039,11.802)

Notifications You must be signed in to change notification settings

jasonma1127/ParticleSwarmOptimization

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

6 Commits
Β 
Β 
Β 
Β 

Repository files navigation

ParticleSwarmOptimization

EXAMPLE CODE:

def Problem5(inPut):
    x = inPut[0]
    y = inPut[1]
    return -x * math.sin(4 * x)-1.1*y*math.sin(2*y)+1

def Constrain(inPut):
    x = inPut[0]
    y = inPut[1]
    return (x + y <= 22)

ParticleSwarmOptimization(8, 10, 10, 13, 3, 0.5, 1, 2, 2, 10, Problem5, Constrain).doRun()

About

Using Particle Swarm Optimization Algorithm to find the maximize solution of the following problem Maximize𝑓(π‘₯,𝑦)=βˆ’π‘₯𝑠𝑖𝑛(4π‘₯)βˆ’1.1𝑦𝑠𝑖𝑛(2𝑦)+1 8≀x≀10; 10≀y≀13; x+y≀22 Expect to get maximum 23.0063 at (x,y)=(9.039,11.802)

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages