Optimization with Pattern Search – A MATLAB Tutorial for beginners

Pattern search is a local optimization technique that can be applied on both constrained and unconstrained optimization problems. The constraints can be either linear or nonlinear. The algorithm works based on an adaptive mesh which is aligned with the coordinate directions.

In this tutorial, I show implementation of an optimization problem and solving it using Pattern Search in MATLAB. The given objective function is a simple function that helps a beginner user to understand the basic concept of optimization in MATLAB easier. The given objective function or fitness function has two input variable and one output. In the second part of the tutorial I show how to write a prameterized form of the objective function. I write a simple script to model the problem and solving the optimization problem using the ‘patternsearch’ function from MATLAB.

For a simple tutorial on optimization using Genetic Algorithm with single objective functions without constraints see this post.

For a simple tutorial on optimization using Genetic Algorithm with single objective functions with constraints see this post.

For a tutorial on multi-objective optimization using Genetic Algorithm see this post.

for a tutorial on Mixed-integer optimization problem using linear programming see this post.

Posted in Linux, Machine Learning, MATLAB, Optimization, programming, Robotics, Software, Ubuntu | Tagged , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , | Leave a comment

Mixed-Integer Linear Programming – A MATLAB Tutorial for Beginners

In this tutorial, I show implementation of a mixed-integer optimization problem using linear programming in MATLAB. The given objective function is a simple function that helps a beginner user to understand the basic concept of optimization in MATLAB easier. The given objective function or fitness function has two input variable and one output. One of the input variables can be only an integer, while the second one is a real number. The problem is also subject to a set of inequalities. I write a simple script to model the problem and solving the optimization problem using the ‘intlinprog’ function from MATLAB.

 


For a simple tutorial on optimization using Genetic Algorithm with single objective functions without constraints see this post.

For a simpler tutorial on optimization using Genetic Algorithm with single objective functions with constraints see this post.

For a tutorial on multi-objective optimization using Genetic Algorithm see this post.

Posted in Linux, Machine Learning, MATLAB, Optimization, programming, Robotics, Software, Ubuntu | Tagged , , , , , , , , , , , , , , , , , , , | Leave a comment

Multi-Objective Optimization using Genetic Algorithm – A MATLAB Tutorial

This is a video tutorial for beginners who like to learn how to use Genetic Algorithm in MATLAB for solving Multi objective optimization problems.

In this tutorial, I show implementation of a multi-objective optimization problem and optimize it using the built-in Genetic Algorithm in MATLAB. The given objective function is a simple function that helps a beginner user to understand the basic concept of optimization in MATLAB easier. The given objective function or fitness function has one input variable and two outputs. I write two separate functions one for the fitness function and one for the main algorithm. I plot the pareto-front that illustrates the obtained solutions in a proper way.

for a simple tutorial on non-constrained single objective optimization using Genetic Algorithm see this post.

for a simple tutorial on constrained single objective optimization using Genetic Algorithm see this post.

 

Posted in Linux, Machine Learning, MATLAB, Optimization, programming, Robotics, Software, Ubuntu | Tagged , , , , , , , , , , , , , , , , , , , , , , , , , , , , , | Leave a comment

Constrained Optimization using Genetic Algorithm – A MATLAB Tutorial

This is a video tutorial for beginners who like to learn how to use Genetic Algorithm in MATLAB for solving constrained single objective optimization problems.

In this tutorial, I show implementation of a constrained optimization problem and optimize it using the built-in Genetic Algorithm in MATLAB. The given objective function is subject to nonlinear inequalities and is bounded. The given objective function or fitness function is known as the ‘cam’ function. I write two separate functions one for the fitness function and one for the constraints. Then I write a main script to run the optimization process.

for a simple tutorial on non-constraint optimization using Genetic Algorithm see this post.

for a simple tutorial on multi-objective optimization using Genetic Algorithm see this post.

Posted in Linux, Machine Learning, MATLAB, Optimization, programming, Robotics, Software, Ubuntu | Tagged , , , , , , , , , , , , , , , , , , , , , , , , , , , , | Leave a comment

Single Objective Optimization using Genetic Algorithm in MATLAB

This is a video tutorial for beginners who like to learn how to use Genetic Algorithm in MATLAB for solving single objective optimization problems.

In this tutorial, I will show you how to optimize a single objective function using Genetic Algorithm. We use MATLAB and show the whole process in a very easy and understandable step-by-step process.

for a simple tutorial on constrained single-objective optimization using Genetic Algorithm see this post.

for a simple tutorial on multi-objective optimization using Genetic Algorithm see this post.

Posted in Linux, Machine Learning, MATLAB, Optimization, programming, Robotics, Software, Ubuntu | Tagged , , , , , , , , , , , , , , , , , , , , , , , | Leave a comment

Turn ON/OFF firewall in windows 10 through Command Prompt

When using Windows as your OS, sometimes you need to do things using Command prompt. Knowing a set of basic commands would be very helpful in this case. Here I denote a command that lets you adjust the firewall in Windows 10.

You need to use “netsh” command together with “advfirewall”. And we want to set the state of the firewall in the current profile ON or OFF. So the final command would be something like:

netsh advfirewall set currentprofile state on
netsg advfirewall set currentprofile status off

An important point is that you need to open the command prompt window as admin, otherwise the above-mention commands would not work.

Check out this video tutorial to learn more about this subject.

Posted in programming, Software | Tagged , , , , , , , , , , , , , , , , , | Leave a comment

Facing Connection Errors in Windows 10? Get a detailed report first

If you are a windows 10 user and facing any kind of connection problem, it would be a very good shot to take a look at what really is happening before doing anything:

1- You need to open a command prompt as administrator

2- run the following command:

> netsh wlan show wlanreport

3- when the command is done, you can go to the folder where the report is placed and take a look. It is really impressive and detailed report.

Generating report ... C:\ProgramData\Microsoft\Windows\WlanReport\wlan-report-latest.html
done
Posted in programming, Software | Tagged , , , , , , , , , , , , , , , , , , , , , , , | Leave a comment