Sir i have a MATLAB code for stablitily of cart pole problem which uses fuzzy but I have to combine it with GA. How can I link GA toolbox within that code?
I have to modify the code so as to not receive values without decimals Wer can I find the right syntax for coding Is there a textbook Is there any particular language I can use the syntax of
sir actually my problem is about getting relationship between z=f(x,y) and parameters as a,b,c,d,e,f......... i am having input values of x,y and z so i need to calibrate parameter values that by using genetic algorithm. are you having material regarding my objective????
+narayana raju I don't have a video on Genetic Algorithms but the book chapter and online course on Design Optimization apmonitor.com/me575/index.php/Main/GeneticAlgorithms does have some material on that topic.
Thank you sir for this tutorial i have question about how to use any optimization algorithm used in welding input by get the best optimization parameter can you help me sir
+Adamu Halilu, I don't have particular info on PSO but the optimization course does give info on optimization methods such as simulated annealing and genetic algorithms. See apmonitor.com/me575
APM doesn't support loops but does support vectors and arrays such as apmonitor.com/wiki/index.php/Main/Arrays Here is an example of looping in MATLAB (or Python): apmonitor.com/me575/index.php/Main/ParallelComputing
Hiii Sir, I want to use genetic algorithm for Transmission Network Expansion Planning, I will be using Genetic Algorithm to obtain optimal expansion plan satisfying a certain set of constraints. I want to know that, how can I form initial population for GA ( initial population will be candidate expansion plans) . In what format do i need to input these initial population ?
+Yuvraj Puri I don't have a video on Genetic Algorithms but the book chapter and online course on Design Optimization apmonitor.com/me575/index.php/Main/GeneticAlgorithms does have some material on that topic.
Hello Sir, I am trying to solve an optimization problem to minimize a cost function for different hours of a day. It is basically a electrical engineering problem. Base on specific load in different hours I have to schedule battery and generator power on that specific time i.e. in which hour how much battery power and generator power we need that will be decided by the optimization toolbox (Matlab). My objective function is consist with battery power and generator power. Is it possible to run the same model for different hours in a single optimization? If yes may be I have to use for-loop. Could you please tell me how can I use for-loop in a model like yours? Thank You
+Md Habib Ullah You should be able to use arrays (vectors, matrices, etc). There is additional information here: apmonitor.com/wiki/index.php/Main/Arrays There is Dynamic Optimization information here: apmonitor.com/do and a paper that deals with a similar problem here: www.sciencedirect.com/science/article/pii/S030626191500402X
I don't have anything in particular on this application. However, below is a link to an article that may give you more guidance: www.researchgate.net/profile/John_Candelo2/publication/271849393_Location_and_Size_of_Distributed_Generation_to_Reduce_Power_Losses_using_a_Bat-inspired_Algorithm/links/54d4d2790cf25013d029faba.pdf Best regards, John Hedengren
I tried my own optimization example and tried to solve using the APMonitor website. When solving, it gives me the error: *** error in syntax of function string: Blank Equation. Any ideas what could be causing this or where I could start looking to fix it?
+Blair Osiowy nevermind, I got it to work. In the video, when you were defining your Variables, it appears that weight was left blank. I filled my weight in with the correct formula there and everything worked fine.
Prof. John, Do you have Variable Projection Algorithm for solving Separable Nonlinear TLS problem in the form r(y,z)=F(z)y-g(z) This problem from (Ake Bjõrck: Numerical Methods for Least Squares Problems- (1996), equation 9.4.2, page 351) Thank you
I don't have that particular algorithm but there may be something that you'll find useful to solve a TLS problem here: www.mathworks.com/discovery/nonlinear-regression.html or here: apmonitor.com/che263/index.php/Main/MatlabDataRegression
Yes, you'll need to have a model first for the optimization. This will likely be a dynamic optimization problem. You can find models for vibration analysis in many papers or on Mathworks File Exchange: www.mathworks.com/matlabcentral/fileexchange/index?utf8=%E2%9C%93&term=vibration
I don't have particular experience with optimization of wireless sensor networks. However, you may find some useful information in this book chapter about designing Genetic Algorithms: apmonitor.com/me575/index.php/Main/GeneticAlgorithms
+Borana Kullolli There are some nice review articles on this including www.sciencedirect.com/science/article/pii/S1002007109001683 and some good presentations online like peer.berkeley.edu/events/annual_meeting/2001annualmtg/presentations/pestana.pdf. If you are applying this knowledge to optimization then you'll need a mathematical description of the system (www.sciencedirect.com/science/article/pii/S0307904X00000068), including trade-offs between design variables. If you can write and solve the equations then you can use optimization methods to improve the design.
How i can use genetic algorithm in mri images for tumour detection.I need soome example codes Where i can get it? Please reply me soon.I am doing my final year project in this.
+Harish kumar .sankar This article (ieeexplore.ieee.org/xpl/articleDetails.jsp?tp=&arnumber=6804437) has some information - I'd suggest reading papers such as this and possibly seeing what the authors have provided online.
Hello, Prof. Do you have a tutorial on parameters of regression? For example, I have an equation of the type y = a + b / x + c ln x. I need to get a, b and c. How would one code for one objective function f = sum ((y exp - y calc) / y exp) ^ 2 for a dataset of 200 points? thank you
+narayana raju Here are some videos to solve the nonlinear problem above in Excel (apmonitor.com/che263/index.php/Main/ExcelDataRegression), Python (apmonitor.com/che263/index.php/Main/PythonDataRegression), and MATLAB (apmonitor.com/che263/index.php/Main/MatlabDataRegression). I used the example from Carlos in the videos.
You can edit the .apm file with any text editor. If you would like syntax highlighting for your model please download the extensions for Notepad++ or gEdit here: apmonitor.com/wiki/index.php/Main/SyntaxHighlighting
+Sandeep Nagarkoti do you already have an optimization model that relates your design variables to your objectives? This is the first step. Once you have a model, you can use optimization methods such as fmincon or APMonitor to find an optimal design. There is additional information on optimization algorithms here: apmonitor.com/me575 and apmonitor.com/do
APMonitor.com I have posted this question in this link please check it out and guide me accordingly thank you..... www.researchgate.net/post/How_to_optimize_a_2D_truss_frame_subjected_to_Free_VIBRATION#5736d520615e279612495a81
+Sandeep Nagarkoti It appears that you already have an initial model in Excel. Maybe you should try the Excel Solver for the optimization. There is a tutorial on the Excel Solver here: apmonitor.com/che263/index.php/Main/ExcelSolver. If you want to solve it with APM MATLAB or APM Python, then you'd need to convert your equations and objective function to simulate and solve it. apmonitor.com/wiki/index.php/Main/MATLAB
APMonitor.com Thanks for answering...I saw the excel tutorial about NLP in which you have got some equations ready but in my case of truss optimization under free vibration i don't even know how to form equations for objective functions and constraints, so if you or your friends have done this kind of problem before or know any reference material then please do share it with me, Thanks for your cooperation.
+Sandeep Nagarkoti There were some course projects that were similar to yours that may inspire your application. 1. Concrete beam: apmonitor.com/me575/uploads/Main/2013_Concrete_Beam.pdf 2. Compliant knee simulator: apmonitor.com/me575/uploads/Main/2013_Knee_Simulator.pdf 3. Others?: apmonitor.com/me575/index.php/Main/ApplicationProject
I went through the video adding all the lines of code etc. when I then try to run the program I get the "Reference to Non-Existent Field 'x'" error. What went wrong? Also when I removed x I had the same issue with the "Height" in the line right after. How do you leave the space between the Height and the ' symbol?
+LacSpore There may be an error in either your model file or else script. Could you do the following? (1) Download the source files from apmonitor.com/me575/index.php/Main/TwoBarTruss, specifically the zipped folder apmonitor.com/me575/uploads/Main/twobar_apm_matlab.zip (2) Use a program like diff or ExamDiff to observe the differences between your script and the solution file.
+APMonitor.com ok I have now downloaded the required files mentioned above. It works when I use this particular problem but let's say I need to change the variables to solve another optimisation problem. I've changed the data in the apm file and altered the solutions that are to be shown in the script, but I get an error saying that the server did not find a resource to match this request. Is it because there might be to many variables in respect to the formulae given to find solutions or is there a deeper issue?
LacSpore No, there isn't a deeper issue. You may still have an error in your model file. In the MATLAB console you can see any error messages if you will display the output with commands such as: output = apm(server,app,'solve') disp(output) Could you let me know what is displayed at the terminal?
+APMonitor.com I inserted those commands into the command window and I get the error that "Model file does not exist: 129.215.230.49..." In the "APM" file I created I essentially just replaced the values needed for my problem and the equations. In the actual script I erased all the functions setting up the graphs etc. and the application name and the name of the model file with the name of my new APM file. The displayed solutions were also alter to accommodated the new model.
+LacSpore Okay, then you probably just have a model error. Can you send me the files you are using: support@apmonitor.com or post to the user group: apmonitor@googlegroups.com
I haven't programmed that approach. However, here is a reference that may help: iaiest.com/dl/journals/8-%20IAJ%20of%20Innovative%20Research/v2-i10-oct2015/paper2.pdf You can also look at other optimization methods such as Genetic Algorithms, Simulated Annealing, and Particle Swarm Optimization. Here is an online Optimization textbook and course on design optimization: apmonitor.com/me575/index.php/Main/BookChapters
Thank you very much for this tutorial sir. I have 2 questions, please. I am modeling a wood floor and studying the diaphragm effect of this floor. I did a numerical model and would like to calibrate it either with free vibration tests or the global measured stiffness. Do you think is it possible ? If yes could you please suggest some reading/examples ? Best regards !
Do you have the equations for the diaphragm effect of the floor? As long as you have a mathematical relationship between the design variables and the desired outcomes, it should be possible to optimize the best design variables. Additional optimization course content is available at apmonitor.com/me575
Thank you for your reply ! I have 2 informations : The global stiffness of the floor and the free vibration result (frequencies and mode shapes). So I would like use one of them to calibrate the model.
Good evening Sir, I am not sure if I understood well your question, but I have made experimental tests. I get frequencies and modal shapes from free vibration tests and also I get the rigidity using an actuator (applying a load to this floor). I have to calibrate the numerical model using one of these informations. The problem with me I do not know from what I can start the calibration. If you can help I will be gratful. Regards !
There are two basic types of models: empirical (from data) and fundamental (from momentum balances or other fundamental correlations). It sounds like you don't know the correlations that govern your process so I'd recommend that you start with an empirical model. If you have system dynamics (such as vibration) and want to model the time-varying system then you can use system identification such as apmonitor.com/do/index.php/Main/ModelIdentification. If your correlations are static (don't vary with time) then you should try linear or nonlinear regression such as shown here: apmonitor.com/che263/index.php/Main/PythonDataRegression (Python), apmonitor.com/che263/index.php/Main/ExcelDataRegression (Excel), or apmonitor.com/che263/index.php/Main/MatlabDataRegression (MATLAB).
+Ray Maver Here are some videos on that topic: ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-_Ja2I2Sz4XA.html You can also see our latest work on large-scale energy storage here: www.sciencedirect.com/science/article/pii/S0098135415001179
Hello Professor John, Thank you for this good channel. I have an optimization problem in the form: objective function = ||Hb-d|| + (transpose(b)*X*b+transpose(x)*b) + C where: X: constant matrix x: constant vector C: constant value ||...|| : a norm b: unknowns vector H: is a matrix whose elements consist of linear functions of some elements of b vector, such that Hb vecor consists of nonlinear functions in the form a*c (where a, c are elements of b vector). - I have the analytical Jacobian of Hb. - The problem is solved by Levenberg-Marquardt Algorithm combined with Active-Set Method. - I don not know which MATLAB key-word can solve it.
Here is a contribution File Exchange: www.mathworks.com/matlabcentral/fileexchange/16063-lmfsolve-m--levenberg-marquardt-fletcher-algorithm-for-nonlinear-least-squares-problems The fmincon optimizer may also be able to solve your problem: www.mathworks.com/help/optim/ug/fmincon.html Here are a few tutorials: apmonitor.com/che263/index.php/Main/MatlabOptimization
+Omar Al-amoodi PID tuning is typically accomplished with tuning rules (such as IMC, ITAE, etc) after you obtain a First order plus dead-time (FOPDT) model of the dynamic response between the controller output (manipulated variable) and the output (controlled variable). There is additional information on how to do this on the process control website at apmonitor.com/che436. If you really want to use a genetic algorithm, there is information here: apmonitor.com/me575/index.php/Main/GeneticAlgorithms. You would need to formulate an objective function with terms such as rise time, overshoot ratio, settling time, etc and then use the GA to select your PID tuning parameters to give the best response.
+APMonitor.com I truly appreciate your reply. But is there any tutorial or something that shows how to perform the PID tuning using Genetic Algorithm optimization toolbox (GAOT)? or even codes?
We had a recent presentation on Stochastic Optimal Control for Gas Networks. ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-JYni77V1Nt8.html Another application (in APMonitor) is stochastic programming to handle uncertainty in capacity planning optimization: apm.byu.edu/prism/index.php/Members/JoseMojica (See Jose's profile for Thesis and Conference Papers). Vector notation is available in APMonitor to code stochastic programming problems: apmonitor.com/wiki/index.php/Main/Arrays
Hello sir it was really an outstanding and as some of us mentioned it was very simplified also, sir i try this model and run perfectly but when am using the same technique to optimize the plate girder section which has slightly more variable as well equations it doesn't work can you tell what will be the reason or any substitute technique to optimize the plate girder
Sachin Mahant Sachin, I'd recommend that you post your problem to the APMonitor user's group at groups.google.com/forum/#!forum/apmonitor It is hard to tell what may be wrong. There should also be a message that returns to your MATLAB (or Python) command window telling you where the error in your model is located. There are some ideas from other projects here: apmonitor.com/me575/index.php/Main/ApplicationProject such as this concrete beam: apmonitor.com/me575/uploads/Main/2013_Concrete_Beam.pdf
APMonitor.com Basically am trying to optimize plate girder section which is nothing but the I section made up of two horizontal plate (flange) and one vertical plate (web) now these plates dimensions have certain range as per the IS code and there are some constraints like stress constraint e.g. allowable stress > actual stress, and some deflection constraints and some dimension constraints, and the there are four variables which is nothing but the dimensions of plate girder, and there are some constants. i have mention below my problem statement ! Plate Girder engineering design problem Model Constants ! declare fixed values that never change pi = 3.14159 Fy = 250000 End Constants Parameters ! declare model parameters ! parameters can be changed by the user or with ! input data but not by the optimizer length = 30 Dlength = 0.025 density = 7850 M1 = 2890 M2 = 1040 M3 = 2530 End Parameters Variables ! declare variables and initial guesses ! variable can be changed by the optimizer weight Tf = 0.03, >=0.02, =0.3, =length/18, =0.01,
This video is was produced for a mechanical engineering and civil engineering course in design optimization. Please visit apmonitor.com/me575 for additional ME content.
هبة هبة Here is a link to a linear programming version of the solver: www.mathworks.com/matlabcentral/fileexchange/49595-linear-programming-with-nonlinear-programming-solvers/
Sir this is indeed a wonderfully explained video. Can you please help out on solving a multi-objective optimization problem where we have conflicting objectives like one needs to be maximized and other needs to be minimized subject to some control factors. Can you please help me on how to solve such problem using Optimization App of MATLAB R2014a?
gaurav kumar There are several methods to solve multi-objective optimization problems. If CPU time is not a concern then a Genetic Algorithm can be a flexible method to address multi-objective problems. Additional information on GAs is given on the course web-site: apmonitor.com/me575/index.php/Main/GeneticAlgorithms Look for the information on Pareto frontiers. If your application is convex or you only need a local minimum then you can also implement multi-objective optimization in an application similar to this video. Just include multiple minimize or maximize statements in your model. You'll need to apply weighting factors to show which ones are more important. Yet another option (my favorite) is to use an l1-norm objective for prioritization of objectives. See the following paper for additional information on including multiple objectives with dead-bands for acceptable regions. These multiple objectives can be ranked so that the optimizer will attempt to satisfy the highest priority items first.
Raji, that sounds like an interesting optimization problem. I think we'd be interested in knowing more about what you are thinking for the problem if you are willing to share some of the details.
Our group (apm.byu.edu/prism) typically works on supply side management with deterministic nonlinear programming methods. I don't have any code examples dealing with demand side management and heuristic optimization. The Pecan Street project at UT Austin is working on demand side optimization. There may be some interesting results that you can also find there.