Particle Swarm Optimization (PSO) for Constrained Optimization Problems

  Рет қаралды 16,871

Solving Optimization Problems

Solving Optimization Problems

Күн бұрын

Пікірлер: 83
@vivekpetrolhead
@vivekpetrolhead 3 жыл бұрын
Great work!! Thanks for including the code. Really helpful.
@SolvingOptimizationProblems
@SolvingOptimizationProblems 3 жыл бұрын
Glad it helped! Thank you for watching.
@yanviegas8614
@yanviegas8614 4 жыл бұрын
awesome work and presentation, sir! thanks for that! please, make a video about the ant colony algorithm in python either!
@SolvingOptimizationProblems
@SolvingOptimizationProblems 4 жыл бұрын
Great suggestion! Sure, I will. Thanks for watching.
@davijame6780
@davijame6780 4 жыл бұрын
Great PSO code in python. Do you have this kind of code in matlab? Thanks
@SolvingOptimizationProblems
@SolvingOptimizationProblems 4 жыл бұрын
Yes, I have that kind of codes on my channel. Thanks for your interest!
@poncho135poncho
@poncho135poncho 4 жыл бұрын
Thank you for this video, I really like it. Do you know how to work with discrete variables in PSO?
@SolvingOptimizationProblems
@SolvingOptimizationProblems 4 жыл бұрын
For discrete optimization, we need to modify the PSO code - the easiest way is to round up the continuous variables, check and repair.
@TheJoedoido
@TheJoedoido 4 жыл бұрын
Thank you for the explanation! Could you make the code available in Python? Because there is no link in the description.
@SolvingOptimizationProblems
@SolvingOptimizationProblems 4 жыл бұрын
Thanks for watching. The python code will be available very soon.
@SolvingOptimizationProblems
@SolvingOptimizationProblems 4 жыл бұрын
Hello, now it is available for downloading. Thanks for your interest.
@alielectricalelectronicsan2092
@alielectricalelectronicsan2092 4 жыл бұрын
@@SolvingOptimizationProblems Respected sir. I am having the same problem which is consist on both linear and nonlinear constrains The example is also available in the google and its code is also availabe. I work 2 ,or 3 days on it .i implementing the code in matlab but the code is start but pause option is stuk for long time . This is some same like your question values as in you video. I can mail to you this prolem .in to your email addres . Sir the only two persons are in youtube who are properly help the students the first one is you.and the second one is Ap -moniter .com How provide the reply fastly .So Can you provide me some help related my this problem which is having with like your problem. I hope you must help us . Thanks again .may you live long , And god pless you , for your a lot of Knowledge that you spread in the people .with having good skills in optimization problems. Kindly provide some help. Thanks 😊.
@SolvingOptimizationProblems
@SolvingOptimizationProblems 4 жыл бұрын
Hello Hassan, I suggest you to remove the constraints to simplify the problem and make sure it running properly. And then add one constraint at a time to build up the algorithm. The easiest way to handle the constraints is to use penalty function. I hope this can help.
@NasirUddin-im2zb
@NasirUddin-im2zb 4 жыл бұрын
thank you very much sir
@SolvingOptimizationProblems
@SolvingOptimizationProblems 4 жыл бұрын
Most welcome!
@王楷惟-v7h
@王楷惟-v7h 4 жыл бұрын
thank you very much!
@SolvingOptimizationProblems
@SolvingOptimizationProblems 4 жыл бұрын
You're welcome!
@jeffreyeiyike2358
@jeffreyeiyike2358 2 жыл бұрын
Good day, please do you have the matlab or python code for ant colony with inequality constraints and bounds just like the PSO example
@SolvingOptimizationProblems
@SolvingOptimizationProblems 2 жыл бұрын
Hello, currently No. Many thanks for your great suggestions!
@jeffreyeiyike2358
@jeffreyeiyike2358 2 жыл бұрын
@@SolvingOptimizationProblems what about the matlab code for the PSO. I am struggling with the constraint part
@donghoonkim4798
@donghoonkim4798 4 жыл бұрын
Thank you for AMAZING explanations! Your channel is super helpful to me. Huge thanks to you!
@SolvingOptimizationProblems
@SolvingOptimizationProblems 4 жыл бұрын
Happy to hear that!
@rabindraneupane7901
@rabindraneupane7901 4 жыл бұрын
Thank you for this amazing content. I was wondering if you would be able to make a video for solving a multi-objective constrained optimization problem using particle swarm optimization in python.
@SolvingOptimizationProblems
@SolvingOptimizationProblems 4 жыл бұрын
Great suggestion! I will try.
@Moneniux
@Moneniux 4 жыл бұрын
Hi, great video. It would be nice if you made a video of genetic algorithms and tabu search in matlab. Thanks in advance for your contributions.
@SolvingOptimizationProblems
@SolvingOptimizationProblems 4 жыл бұрын
Many thanks for your suggestion for the next videos. I really appreciate that.
@nurulnadiah2580
@nurulnadiah2580 4 жыл бұрын
Hi Dr. Thank for this valueable video. It would be nice if you made a video of MOSPO using Python?
@SolvingOptimizationProblems
@SolvingOptimizationProblems 4 жыл бұрын
Great suggestion! I will try it as soon as possible. Thank you!
@nurulnadiah2580
@nurulnadiah2580 4 жыл бұрын
@@SolvingOptimizationProblems Thank you Dr. Hope to see from you soon since nowadays multi-objective optimization also a hard and challenging problems in industry and academician part. Thank you so much for every effort to share your knowledge here.
@SolvingOptimizationProblems
@SolvingOptimizationProblems 4 жыл бұрын
Yes, totally agree with you that multi-objective optimization is very interesting research topic.
@Tr0rn3
@Tr0rn3 4 жыл бұрын
As a novice in Optimization I would like to thank you for your video which greatly helps me in my research. Can you help me on one last point? If I don't want to find the minimum of my function which is 0.7 but I want to converge to 1 and then stop. What should I change in the code?
@SolvingOptimizationProblems
@SolvingOptimizationProblems 4 жыл бұрын
In that case, in each iteration, check the best fitness value - if it is close to 1, use "break" function to jump out of the loop to stop PSO.
@Tr0rn3
@Tr0rn3 4 жыл бұрын
@@SolvingOptimizationProblems Thank you for your solution, but my program stops for values between 0.9 and 1. What is the impact of the parameters w, c1 and c2 on my convergence speed?
@SolvingOptimizationProblems
@SolvingOptimizationProblems 4 жыл бұрын
It's up to you to set the condition to stop. The principle is the same. For the impact of w, c1 and c2, it is hard to say in general. Just run the PSO with different parameters and see
@Tr0rn3
@Tr0rn3 4 жыл бұрын
@@SolvingOptimizationProblems Thank you for your help. Since last week I have made good progress on my project but I am facing a new difficulty. I have added to your code an ML classification model to privilege certain directions (6D) contrary to others. For this I integrate my classification program when I initialize my point to make sure it's good. Then I also integrate it in the update velocity loop to make sure that the new position value is correct. When I launch my code sometimes everything goes well and other times I get stuck in a loop to choose the right update velocity value. Is there a way when you are stuck in the loop to delete the point and go to another one? Or is there another type of optimization program that would be more suitable to handle a 6D opti + a classification?
@SolvingOptimizationProblems
@SolvingOptimizationProblems 4 жыл бұрын
For this, I suggest to use my multi-start genetic algorithm.
@yogesh6553
@yogesh6553 4 жыл бұрын
Sir , i tried to solve two nonlinear constraints with the code. But Not getting the approximate result as the published ones. Result variance is large. Please help me out.
@SolvingOptimizationProblems
@SolvingOptimizationProblems 4 жыл бұрын
To solve different problems, we need to customize the PSO parameters and penalty cost to maximize its performance.
@houriatlm2425
@houriatlm2425 4 жыл бұрын
Hi, great video. , thank you for your contributions. It would be nice if you made a video of MOSPO. I need it
@SolvingOptimizationProblems
@SolvingOptimizationProblems 4 жыл бұрын
Noted. Thanks for your suggestion. Will try
@pratyushanand7429
@pratyushanand7429 4 жыл бұрын
Levenberg-Marquardt algorithm with nonlinear objective function on Matlab...please show
@SolvingOptimizationProblems
@SolvingOptimizationProblems 4 жыл бұрын
Many thanks for your suggestions. Will try as soon as possible.
@AbdenourMENAA
@AbdenourMENAA 2 жыл бұрын
thank u
@SolvingOptimizationProblems
@SolvingOptimizationProblems 2 жыл бұрын
You're welcome! Good luck .
@AbdenourMENAA
@AbdenourMENAA 2 жыл бұрын
@@SolvingOptimizationProblems hello, i need a example how i introduce a constraint optimisation problèlem in a pso or aco method .
@SolvingOptimizationProblems
@SolvingOptimizationProblems 2 жыл бұрын
Noted. Thanks for your suggestions!
@aminamani8867
@aminamani8867 4 жыл бұрын
so tnx sir for your great and really amazing clips. will be great if you solve some multi-objective problems in python with NSGA or other algorithms too and some examples with more complex and different types of constrains to we can learn how they(different math symbols and constraints type) should be implement in python and some examples of cross dock and scheduling problems. again tnx.
@SolvingOptimizationProblems
@SolvingOptimizationProblems 4 жыл бұрын
Many thanks for your great suggestion. Really appreciate that! I will try my best!
@ADA_asukadigital_academy
@ADA_asukadigital_academy 3 жыл бұрын
thanks a lot very nice video ,can you possible make video constrained optimization using PSO in MATLAB
@SolvingOptimizationProblems
@SolvingOptimizationProblems 3 жыл бұрын
Many thanks for the good suggestion!
@madhumohan9233
@madhumohan9233 4 жыл бұрын
thank u sir explaining PSO code. sir i got one error in this code i can not able to rectify this error .please help me . i got error like 'NoneType' object has no attribute 'plot'.
@SolvingOptimizationProblems
@SolvingOptimizationProblems 4 жыл бұрын
Did you import all libraries? If yes, maybe that happens because you don't use Pycharm.
@zedzad3279
@zedzad3279 3 жыл бұрын
Thank you a lot Sir, please can you solve the optimization constraints (both linear and non linear ) problem with Matlab language and use the Hybrid fmincon function inside the PSO . please
@SolvingOptimizationProblems
@SolvingOptimizationProblems 3 жыл бұрын
Interesting question! Yes, it is possible.
@zedzad3279
@zedzad3279 3 жыл бұрын
@@SolvingOptimizationProblems Thank you sir , please I hope that with more than 6 variables in the objective function. s.t. non-linear constraints and linear too , with fmincon function using Matlab code
@SolvingOptimizationProblems
@SolvingOptimizationProblems 3 жыл бұрын
Yes, it can be solved by fmincon solver. I already have some videos on how to use fmincon solver. Hope these videos can help. Good luck!
@aminamani8867
@aminamani8867 4 жыл бұрын
very tnx about making these videos. if we had a binary variable how we could define it in pso code in python?
@SolvingOptimizationProblems
@SolvingOptimizationProblems 4 жыл бұрын
I never test it with binary variables. Maybe, PSO does not work well with binary variables, compared to other algorithms. I'm not sure. Maybe I'm wrong.
@aminamani8867
@aminamani8867 4 жыл бұрын
@@SolvingOptimizationProblems my question is how we implement different type of constraint in python for example equations with sum on variables with multiple indexes or binary variables and other complex constraints its great if you teach us these things too.tnx
@준-m4t
@준-m4t 4 жыл бұрын
@@aminamani8867 It's almost the same problem as me now.. I want to solve it..
@SolvingOptimizationProblems
@SolvingOptimizationProblems 4 жыл бұрын
To handle the constraints, we can use penalty functions, check-and-repair method, and others
@ashikhasan9082
@ashikhasan9082 2 жыл бұрын
The link of the python code is not working. Please provide the code to me
@SolvingOptimizationProblems
@SolvingOptimizationProblems 2 жыл бұрын
Thanks, I have checked it and it is still working ...
@kaziahad8960
@kaziahad8960 4 жыл бұрын
I want to solve a problem where my input is a (24,1) matrix.Can i solve this with this code?How can i define bound then?
@SolvingOptimizationProblems
@SolvingOptimizationProblems 4 жыл бұрын
Hi, yes, you can use this PSO code with some modification. Bonds depend on the problem. If you don't have bounds, just set them very large. for example: from -99999999 to 99999999
@kaziahad8960
@kaziahad8960 4 жыл бұрын
@@SolvingOptimizationProblems I have bounds but i don't understand that should i specify bound for every point of the matrix.
@SolvingOptimizationProblems
@SolvingOptimizationProblems 4 жыл бұрын
Bound represents the max and min values of each variable.
@kaziahad8960
@kaziahad8960 4 жыл бұрын
@@SolvingOptimizationProblems Thanks for your reply. It's really helpful for people like me who are new to this area.
@SolvingOptimizationProblems
@SolvingOptimizationProblems 4 жыл бұрын
Thanks for watching! Good luck with your study and research.
@IrfanKhan-oh7kb
@IrfanKhan-oh7kb 3 жыл бұрын
Is MATLAB code for PSO available ?
@SolvingOptimizationProblems
@SolvingOptimizationProblems 3 жыл бұрын
Yes, check my blog in the description
@cboniefbr
@cboniefbr 4 жыл бұрын
I would like to so ant colony optimization in python
@SolvingOptimizationProblems
@SolvingOptimizationProblems 4 жыл бұрын
Many thanks for the suggestion. I will try it as soon as possible
@pandamusic6055
@pandamusic6055 4 жыл бұрын
Who came here JUST to listen the music? I love first song the most.
@SolvingOptimizationProblems
@SolvingOptimizationProblems 4 жыл бұрын
I love that music too! Thank you
@dmm6730
@dmm6730 4 жыл бұрын
It'a great explanations of PSO. Can you help to format Objective function have sent to you.
@SolvingOptimizationProblems
@SolvingOptimizationProblems 4 жыл бұрын
I will try it as soon as possible.
@준-m4t
@준-m4t 4 жыл бұрын
The video is so helpful. Thank you. I have one question. Can you find the optimal point that satisfies the constraint when there are multiple variables and multiple equations at the same time, not an equation with two variables? For example, when the variable is from x1 to x10, y1 = 0.1(x1) + ... +3(x10) y2 = 0.5(x1)+ ... +15.5(x10) y3 = 1.3(x1)+ ... + 2.9(x10) Assuming that there is a relation like this (the coefficient in front of the variable is arbitrary) When y1 wants to maximize, y2 wants to minimize and y3 wants to maximize, I don't know how to define the previous variable. The whole equation is summarized by me. But in that code, I put the equation in the fitness part. There is a problem in the part you are trying to replace. Do you understand?
@SolvingOptimizationProblems
@SolvingOptimizationProblems 4 жыл бұрын
Yes, it is possible to solve that multi objective optimization problem but we have to modify the PSO code.
@nvertitizian3626
@nvertitizian3626 3 жыл бұрын
It's really a great video, it looks like it will help me a lot in my research, can I get your email to ask you some questions and benefit from your experience?
@SolvingOptimizationProblems
@SolvingOptimizationProblems 3 жыл бұрын
Thanks for watching!
@StayStudywithMonikaSharma
@StayStudywithMonikaSharma Жыл бұрын
god afternoon sir,this program is showing error-list out of range
@SolvingOptimizationProblems
@SolvingOptimizationProblems Жыл бұрын
I think there was some mistakes in your program. Check the program carefully
Genetic Algorithm Solver in Matlab vs Multi-Start Genetic Algorithm (Performance Comparison)
24:44
Learn Particle Swarm Optimization (PSO) in 20 minutes
19:08
Ali Mirjalili
Рет қаралды 319 М.
Quando A Diferença De Altura É Muito Grande 😲😂
00:12
Mari Maria
Рет қаралды 45 МЛН
So Cute 🥰 who is better?
00:15
dednahype
Рет қаралды 19 МЛН
Леон киллер и Оля Полякова 😹
00:42
Канал Смеха
Рет қаралды 4,7 МЛН
Try this prank with your friends 😂 @karina-kola
00:18
Andrey Grechka
Рет қаралды 9 МЛН
Particle Swarm Optimization in Python | Interactive PSO
20:37
Constrained Optimization: Intuition behind the Lagrangian
10:49
How to Solve Constrained Optimization Problems Using Matlab
9:29
Solving Optimization Problems
Рет қаралды 6 М.
Multiobjective optimization
5:49
OpenMDAO
Рет қаралды 11 М.
Ant colony optimization algorithm
19:21
Simulife Hub
Рет қаралды 76 М.
AI Is Making You An Illiterate Programmer
27:22
ThePrimeTime
Рет қаралды 237 М.
Quando A Diferença De Altura É Muito Grande 😲😂
00:12
Mari Maria
Рет қаралды 45 МЛН