Difference between revisions of "Scilab---FOSSEE-Optimisation-Toolbox/C2/Unconstrained-Optimization-using-FOT/English"

From Script | Spoken-Tutorial
Jump to: navigation, search
(Created page with "'''Title of the script''': '''Unconstrained Optimisation using FOT''' '''Author: Siddharth Agarwal, Anandajith TS''' '''Keywords: FOSSEE Optimization Toolbox, Integer Uncons...")
 
Line 21: Line 21:
 
In this tutorial, we will learn how to:
 
In this tutorial, we will learn how to:
  
<ul>
+
*Use '''fot_fminunc''' and '''fot_intfminunc functions''' in '''Scilab'''
<li><blockquote><p>Use '''fot_fminunc''' and '''fot_intfminunc''' functions in '''Scilab'''</p></blockquote></li>
+
*Solve '''unconstrained optimisation''' problems using '''fot_fminunc and fot_intfminunc functions'''
<li><blockquote><p>Solve '''unconstrained optimisation''' problems using '''fot_fminunc and fot_intfminunc functions'''</p></blockquote></li></ul>
+
 
|-
 
|-
 
|
 
|
Line 32: Line 31:
 
To record this tutorial, I am using
 
To record this tutorial, I am using
  
<ul>
+
*'''Windows 10''' as the operating system
<li><blockquote><p>'''Windows 10''' as the operating system</p></blockquote></li>
+
*'''Scilab 6.1.0'''
<li><blockquote><p>'''Scilab 6.1.0'''</p></blockquote></li>
+
*'''FOSSEE Optimization Toolbox''' version '''0.4.1'''
<li><blockquote><p>'''FOSSEE Optimization Toolbox''' version '''0.4.1'''</p></blockquote></li></ul>
+
  
 
The process demonstrated in this tutorial is identical in '''Linux''' OS also
 
The process demonstrated in this tutorial is identical in '''Linux''' OS also
Line 51: Line 49:
 
To follow this tutorial, you should
 
To follow this tutorial, you should
  
<ul>
+
*Install '''FOSSEE Optimization Toolbox''' version 0.4.1 or above*Have basic understanding of Scilab and optimization theory
<li><blockquote><p>Install '''FOSSEE Optimization Toolbox''' version 0.4.1 or above</p></blockquote></li>
+
<li><blockquote><p>Have basic understanding of Scilab and optimization theory</p></blockquote></li></ul>
+
  
 
If not, for relevant tutorials please visit this site.
 
If not, for relevant tutorials please visit this site.
Line 62: Line 58:
 
'''Code Files'''
 
'''Code Files'''
 
|
 
|
<ul>
+
*The files used in this tutorial are have been provided in the '''Code files''' link
<li><blockquote><p>The files used in this tutorial <s>are</s> have been provided in the '''Code files''' link</p></blockquote></li>
+
*Please download and extract the files
<li><blockquote><p>Please download and extract the files</p></blockquote></li>
+
*Make a copy and then use them while practising
<li><blockquote><p>Make a copy and then use them while practising</p></blockquote></li></ul>
+
 
|-
 
|-
 
|
 
|
Line 71: Line 66:
  
 
'''What is the Unconstrained Optimisation problem?'''
 
'''What is the Unconstrained Optimisation problem?'''
|
+
|A '''function''' is nonlinear if it has a degree of two or more.
A function is nonlinear if it has a degree of two or more
+
  
'''An Unconstrained Optimisation Problem''' is a mathematical optimization model with:
+
'''An Unconstrained Optimisation Problem''' is a mathematical '''optimization model''' with:
  
<ul>
+
*'''Nonlinear''' objective function
<li><blockquote><p>'''Nonlinear''' objective function</p></blockquote></li>
+
*'''No constraints'''
<li><blockquote><p>'''No constraints'''</p></blockquote></li></ul>
+
 
|-
 
|-
 
|
 
|
Line 84: Line 77:
  
 
'''Mathematical Formulation'''
 
'''Mathematical Formulation'''
| A '''general form''' of the '''unconstrained optimization problem''' is as shown.
+
| A general form of the '''unconstrained optimization problem''' is as shown.
 
|-
 
|-
 
|
 
|
Line 95: Line 88:
 
In this example, we will learn how to:
 
In this example, we will learn how to:
  
<ul>
+
*Minimize the given '''function'''
<li><blockquote><p>Minimize the given function</p></blockquote></li>
+
*Note that the '''objective function''' is '''nonlinear'''
<li><blockquote><p>Note that the '''objective function''' is '''nonlinear'''</p></blockquote></li></ul>
+
 
|-
 
|-
 
|
 
|
  
|
+
|We will use the '''toolbox''' to solve this example.
We will use the toolbox to solve this example.
+
  
Make sure that the toolbox is already installed on Scilab.
+
Make sure that the '''toolbox''' is already '''installed''' on '''Scilab'''.
 
|-
 
|-
 
| Cursor on the Scilab console.
 
| Cursor on the Scilab console.
| Now open the '''Scilab console'''
+
| Now open the '''Scilab console'''.
 
|-
 
|-
 
| Type '''editor''' &gt;&gt; press '''Enter'''.
 
| Type '''editor''' &gt;&gt; press '''Enter'''.
 
|
 
|
In the '''Scilab console''' type '''editor''' and press '''Enter'''
+
In the '''Scilab console''' type '''editor''' and press '''Enter'''.
  
'''Editor''' window opens
+
'''Editor''' window opens.
 
|-
 
|-
 
|
 
|
Line 126: Line 117:
 
Point to the file.
 
Point to the file.
 
|
 
|
Click on '''Open''' button on the toolbar.
+
Click on '''Open''' button on the '''toolbar'''.
  
Go to the Downloads folder
+
Go to the '''Downloads''' folder.
  
 
Locate the file '''opt_fminunc.sce'''.
 
Locate the file '''opt_fminunc.sce'''.
Line 134: Line 125:
 
Then click the '''Open''' button.
 
Then click the '''Open''' button.
  
'''opt_fminunc.sce''' file opens in the '''editor'''
+
'''opt_fminunc.sce''' file opens in the '''editor'''.
 
|-
 
|-
 
| Show '''opt_fminunc.sce''' in scilab editor.
 
| Show '''opt_fminunc.sce''' in scilab editor.
| Now we will see the input arguments for '''fot_fminunc'''
+
| Now we will see the '''input arguments''' for '''fot_fminunc'''.
 
|-
 
|-
 
| Highlight '''‘f’'''
 
| Highlight '''‘f’'''
|
+
|'''f''' is an '''objective function'''
<ul>
+
<li><blockquote><p>'''f''' is an '''objective function'''</p></blockquote></li></ul>
+
 
|-
 
|-
 
| Highlight '''‘x0’'''
 
| Highlight '''‘x0’'''
|
+
|'''x0''' is a '''vector''' containing the starting values of the '''decision variables'''.
<ul>
+
<li><blockquote><p>'''x0''' is a vector containing the starting values of the decision variables.</p></blockquote></li></ul>
+
 
|-
 
|-
 
| Highlight ‘'''xopt,''' '''fopt''', '''exitflag, output, gradient, hessian’'''
 
| Highlight ‘'''xopt,''' '''fopt''', '''exitflag, output, gradient, hessian’'''
 
|
 
|
Now we will see the output arguments.
+
Now we will see the '''output arguments'''.
  
Output arguments are '''xopt,''' '''fopt''', '''exitflag, output, gradient, hessian'''
+
'''Output arguments''' are '''xopt, fopt, exitflag, output, gradient, hessian'''.
 
|-
 
|-
 
| Highlight '''‘xopt’'''
 
| Highlight '''‘xopt’'''
|
+
|'''xopt''' is the optimal value of '''x'''.
<ul>
+
<li><blockquote><p>'''xopt''' is the optimal value of '''x'''.</p></blockquote></li></ul>
+
 
|-
 
|-
 
| Highlight '''‘fopt’'''
 
| Highlight '''‘fopt’'''
|
+
|'''fopt''' is the optimal '''objective function''' value.
<ul>
+
<li><blockquote><p>'''fopt''' is the optimal objective function value'''.'''</p></blockquote></li></ul>
+
 
|-
 
|-
 
| Highlight '''‘exitflag’'''
 
| Highlight '''‘exitflag’'''
|
+
|'''exitflag''' is the status of '''execution'''.
<ul>
+
<li><blockquote><p>'''exitflag''' is the status of execution</p></blockquote></li></ul>
+
 
|-
 
|-
 
| Highlight '''‘Output’'''
 
| Highlight '''‘Output’'''
|
+
|'''Output''' is structure containing detailed information about the '''optimization'''.
<ul>
+
<li><blockquote><p>'''Output''' is a '''structure''' containing detailed information about the optimization.</p></blockquote></li></ul>
+
 
|-
 
|-
 
| Highlight '''‘Gradient’'''
 
| Highlight '''‘Gradient’'''
|
+
|'''Gradient''' is a '''vector''' containing the '''objective's gradient''' of the solution.
<blockquote>'''Gradient''' is a '''vector''' containing the '''objective's''' '''gradient''' of the solution
+
</blockquote>
+
 
|-
 
|-
 
| Highlight '''‘Hessian’'''
 
| Highlight '''‘Hessian’'''
|
+
|'''Hessian''' is a '''matrix''' containing the '''Lagrangian's hessian''' of the solution.
<blockquote>'''Hessian''' is a '''matrix''' containing the '''lagrangian's hessian''' of the solution
+
</blockquote>
+
 
|-
 
|-
 
|
 
|
Line 189: Line 164:
  
 
'''[xopt,fopt,exitflag,output,gradient,hessian]=fot_fminunc(f,x0)'''
 
'''[xopt,fopt,exitflag,output,gradient,hessian]=fot_fminunc(f,x0)'''
|
+
| Here we see the '''Scilab''' code to define and solve the example.
<ul>
+
 
<li><blockquote><p>Here we see the '''scilab''' code to define and solve the example.</p></blockquote></li>
+
We call the '''fot_fminunc function''' to solve the given problem.
<li><blockquote><p>We call the '''fot_fminunc function''' to solve the given '''problem'''.</p></blockquote></li>
+
<li></li></ul>
+
 
|-
 
|-
 
|
 
|
Line 202: Line 175:
 
Save the file by pressing '''Control''' and '''S''' keys simultaneously.
 
Save the file by pressing '''Control''' and '''S''' keys simultaneously.
  
To '''run''' the file, click on the '''Execute''' menu.
+
To '''run''' the file, click on the '''Execute menu'''.
  
Click on '''File with Echo''' from the drop down.
+
Click on '''File with Echo''' from the drop-down menu.
 
|-
 
|-
 
| Change the window to '''Scilab console.'''
 
| Change the window to '''Scilab console.'''
 
|
 
|
Switch to the Scilab '''console''' to see the output.
+
Switch to the '''Scilab console''' to see the '''output'''.
  
 
We see that it prints the
 
We see that it prints the
  
<ul>
+
*'''xopt''' value as 1,1,
<li><blockquote><p>'''xopt''' value as 1,1,</p></blockquote></li>
+
*'''fopt''' value as 1.466D-16,
<li><blockquote><p>'''fopt''' value as 1.466D-16,</p></blockquote></li>
+
*'''Output''' as the '''Optimal solution Found'''
<li><blockquote><p>'''Output as the Optimal solution Found'''</p></blockquote></li></ul>
+
 
|-
 
|-
 
|
 
|
Line 224: Line 196:
 
We will now look at '''integer nonlinear programming''' problems.
 
We will now look at '''integer nonlinear programming''' problems.
  
These are problems where some decision variables are constrained to be integers.
+
These are problems where some '''decision variables''' are constrained to be '''integers'''.
 
|-
 
|-
 
|
 
|
Line 230: Line 202:
  
 
'''Mathematical Formulation'''
 
'''Mathematical Formulation'''
| A '''general form''' of the '''unconstrained''' '''integer programming problem''' is as shown.
+
| A general form of the unconstrained '''integer programming''' problem is as shown.
 
|-
 
|-
 
|
 
|
Line 239: Line 211:
 
We will now solve this example to illustrate the use of '''fot_intfminunc.'''
 
We will now solve this example to illustrate the use of '''fot_intfminunc.'''
  
In this example, we will <s>demonstrate</s> learn how to:
+
In this example, we will learn how to:
  
<ul>
+
*Minimize the given '''function'''
<li><blockquote><p>Minimize the given function</p></blockquote></li>
+
*Note that the '''objective function''' is '''nonlinear.'''
<li><blockquote><p>Note that the '''objective function''' is '''nonlinear.'''</p></blockquote></li></ul>
+
  
 
Some of the '''decision variables''' are '''integers'''.
 
Some of the '''decision variables''' are '''integers'''.
Line 249: Line 220:
 
| Show '''opt_intfminunc.sce''' in '''scilab editor.'''
 
| Show '''opt_intfminunc.sce''' in '''scilab editor.'''
 
|
 
|
We will use the toolbox to solve this example.
+
We will use the '''toolbox''' to solve this example.
  
 
Open the '''Scilab console'''.
 
Open the '''Scilab console'''.
  
Type editor on the Scilab console and Press enter.
+
Type '''editor''' on the '''Scilab console''' and press '''Enter'''.
  
 
Open '''opt_intfminunc.sce''' in the '''Scilab editor.'''
 
Open '''opt_intfminunc.sce''' in the '''Scilab editor.'''
 
|-
 
|-
 
| Highlight '''‘f’'''
 
| Highlight '''‘f’'''
|
+
|'''f''' is the '''objective function'''.
<ul>
+
<li><blockquote><p>'''f''' is the '''objective function'''</p></blockquote></li>
+
<li></li></ul>
+
 
|-
 
|-
 
| Highlight '''‘x0’'''
 
| Highlight '''‘x0’'''
|
+
|'''x0''' is a '''vector''' containing the starting values of the '''decision variables'''.
<ul>
+
<li><blockquote><p>'''x0''' is a vector containing the starting values of the decision variables</p></blockquote></li></ul>
+
 
|-
 
|-
 
| Highlight '''‘intcon’'''
 
| Highlight '''‘intcon’'''
|
+
|'''intcon''' is a '''vector''' of the '''indices''' of the '''integer variables'''.
<blockquote>'''intcon''' is a '''vector''' of the '''indices''' of the integer variables
+
 
</blockquote>
+
 
|-
 
|-
 
| Highlight ‘'''xopt,''' '''fopt''', '''exitflag, output, gradient, hessian’'''
 
| Highlight ‘'''xopt,''' '''fopt''', '''exitflag, output, gradient, hessian’'''
 
|
 
|
Now we will see the output arguments.
+
Now we will see the '''output arguments'''.
  
<ul>
+
'''Output arguments''' are '''xopt,''' '''fopt''', '''exitflag, output, gradient, hessian'''
<li><blockquote><p>Output arguments are '''xopt,''' '''fopt''', '''exitflag, output, gradient, hessian'''</p></blockquote></li></ul>
+
 
|-
 
|-
 
| Highlight '''‘xopt’'''
 
| Highlight '''‘xopt’'''
|
+
|'''xopt''' is the optimal value of '''x'''.
<ul>
+
<li><blockquote><p>'''xopt''' is the optimal value of '''x'''.</p></blockquote></li></ul>
+
 
|-
 
|-
 
| Highlight '''‘fopt’'''
 
| Highlight '''‘fopt’'''
|
+
|'''fopt''' is the optimal '''objective function''' value.
<ul>
+
<li><blockquote><p>'''fopt''' is the optimal objective function value'''.'''</p></blockquote></li></ul>
+
 
|-
 
|-
 
| Highlight '''‘exitflag’'''
 
| Highlight '''‘exitflag’'''
|
+
|'''exitflag''' is the status of '''execution'''.
<ul>
+
<li><blockquote><p>'''exitflag''' is the status of execution</p></blockquote></li></ul>
+
 
|-
 
|-
 
| Highlight '''‘Gradient’'''
 
| Highlight '''‘Gradient’'''
|
+
|'''Gradient''' is a '''vector''' containing the '''objective's''' '''gradient''' of the solution
<blockquote>'''Gradient''' is a '''vector''' containing the '''objective's''' '''gradient''' of the solution
+
</blockquote>
+
 
|-
 
|-
 
| Highlight '''‘Hessian’'''
 
| Highlight '''‘Hessian’'''
|
+
|'''Hessian''' is a '''matrix''' containing the '''Lagrangian's hessian''' of the solution.
<blockquote>'''Hessian''' is a '''matrix''' containing the '''lagrangian's hessian''' of the solution
+
</blockquote>
+
 
|-
 
|-
 
|
 
|
Line 312: Line 266:
 
Save the file by pressing '''Control''' and '''S''' keys simultaneously.
 
Save the file by pressing '''Control''' and '''S''' keys simultaneously.
  
To '''run''' the file, click on the '''Execute''' menu.
+
To '''run''' the file, click on the '''Execute menu'''.
  
Click on '''File with Echo''' from the drop down.
+
Click on '''File with Echo''' from the drop-down.
 
|-
 
|-
 
| Change the window to '''Scilab console.'''
 
| Change the window to '''Scilab console.'''
 
|
 
|
Switch to the '''Scilab''' '''console''' to see the output.
+
Switch to the '''Scilab console''' to see the output.
  
 
We see that it prints the
 
We see that it prints the
  
<ul>
+
*'''xopt''' value as 1,1,
<li><blockquote><p>'''xopt''' value as 1,1,</p></blockquote></li>
+
*'''fopt''' value as 1.341D-19,
<li><blockquote><p>'''fopt''' value as 1.341D-19,</p></blockquote></li>
+
*'''Output''' as the '''Optimal solution Found'''
<li><blockquote><p>'''Output as the Optimal solution Found'''</p></blockquote></li></ul>
+
 
|-
 
|-
 
|
 
|
Line 336: Line 289:
 
In this tutorial, we have learnt to:
 
In this tutorial, we have learnt to:
  
<ul>
+
*Use '''fot_fminunc''' and '''fot_intfminunc functions''' of the '''FOSSEE Optimization Toolbox'''.
<li><blockquote><p>Use '''fot_fminunc''' and '''fot_intfminunc''' functions of the '''FOSSEE Optimization Toolbox'''.</p></blockquote></li>
+
*Solve unconstrained '''nonlinear programming''' examples in '''Scilab'''.
<li><blockquote><p>Solve unconstrained nonlinear programming examples in '''Scilab'''.</p></blockquote></li></ul>
+
 
|-
 
|-
 
|
 
|
Line 347: Line 299:
 
As an assignment, please do the following:
 
As an assignment, please do the following:
  
<ul>
+
*What will be the solution if we include the following constraint in the previous example.
<li><blockquote><p>What will be the solution if we include</p></blockquote></li></ul>
+
 
+
<blockquote>the following constraint in the previous
+
 
+
example:
+
</blockquote>
+
 
|-
 
|-
 
|
 
|
Line 360: Line 306:
 
'''Assignment'''
 
'''Assignment'''
 
|
 
|
<ul>
+
*The optimal value will be 2547.7231 and
<li><blockquote><p>The optimal value will be 2547.7231 and</p></blockquote></li>
+
*Optimal solution will be '''x one''' equal to 64.363297and '''x two''' equal to 50.720229
<li><blockquote><p>Optimal solution will be '''x one''' equal to 64.363297and '''x two''' equal to 50.720229</p></blockquote></li></ul>
+
 
|-
 
|-
 
|
 
|
Line 418: Line 363:
  
 
'''Thank you'''
 
'''Thank you'''
|
+
|This is Anandajith TS, FOSSEE intern 2021, IIT Bombay signing off.
<ul>
+
<li><blockquote><p>This is Anandajith TS, FOSSEE intern 2021, IIT Bombay signing off.</p></blockquote></li></ul>
+
  
<ul>
+
Thanks for joining.
<li><blockquote><p>Thanks for joining</p></blockquote></li></ul>
+
 
|}
 
|}

Revision as of 14:38, 5 November 2021

Title of the script: Unconstrained Optimisation using FOT

Author: Siddharth Agarwal, Anandajith TS

Keywords: FOSSEE Optimization Toolbox, Integer Unconstrained Optimisation, Unconstrained Optimisation, fminunc, intfminunc.

Visual Cue Narration

Show Slide 1

Title Slide

Welcome to the spoken tutorial on Unconstrained Optimisation using FOT.

Show Slide 2

Learning Objectives

In this tutorial, we will learn how to:

  • Use fot_fminunc and fot_intfminunc functions in Scilab
  • Solve unconstrained optimisation problems using fot_fminunc and fot_intfminunc functions

Show Slide 3

System Requirements

To record this tutorial, I am using

  • Windows 10 as the operating system
  • Scilab 6.1.0
  • FOSSEE Optimization Toolbox version 0.4.1

The process demonstrated in this tutorial is identical in Linux OS also

Only narration Annotations will be added to the tutorial if there are any differences.

Show Slide 4

Pre-requisites

https://spoken-tutorial.org

To follow this tutorial, you should

  • Install FOSSEE Optimization Toolbox version 0.4.1 or above*Have basic understanding of Scilab and optimization theory

If not, for relevant tutorials please visit this site.

Show slide

Code Files

  • The files used in this tutorial are have been provided in the Code files link
  • Please download and extract the files
  • Make a copy and then use them while practising

Slide 5

What is the Unconstrained Optimisation problem?

A function is nonlinear if it has a degree of two or more.

An Unconstrained Optimisation Problem is a mathematical optimization model with:

  • Nonlinear objective function
  • No constraints

Show Slide 6

Mathematical Formulation

A general form of the unconstrained optimization problem is as shown.

Show Slide 7

Example

We will now solve this example to illustrate the use of fot_fminunc

In this example, we will learn how to:

  • Minimize the given function
  • Note that the objective function is nonlinear
We will use the toolbox to solve this example.

Make sure that the toolbox is already installed on Scilab.

Cursor on the Scilab console. Now open the Scilab console.
Type editor >> press Enter.

In the Scilab console type editor and press Enter.

Editor window opens.

Click on Open button.

Go to the Downloads folder.

Locate the file opt_fminunc.sce.

Click the Open button.

Point to the file.

Click on Open button on the toolbar.

Go to the Downloads folder.

Locate the file opt_fminunc.sce.

Then click the Open button.

opt_fminunc.sce file opens in the editor.

Show opt_fminunc.sce in scilab editor. Now we will see the input arguments for fot_fminunc.
Highlight ‘f’ f is an objective function
Highlight ‘x0’ x0 is a vector containing the starting values of the decision variables.
Highlight ‘xopt, fopt, exitflag, output, gradient, hessian’

Now we will see the output arguments.

Output arguments are xopt, fopt, exitflag, output, gradient, hessian.

Highlight ‘xopt’ xopt is the optimal value of x.
Highlight ‘fopt’ fopt is the optimal objective function value.
Highlight ‘exitflag’ exitflag is the status of execution.
Highlight ‘Output’ Output is structure containing detailed information about the optimization.
Highlight ‘Gradient’ Gradient is a vector containing the objective's gradient of the solution.
Highlight ‘Hessian’ Hessian is a matrix containing the Lagrangian's hessian of the solution.

Highlight

[xopt,fopt,exitflag,output,gradient,hessian]=fot_fminunc(f,x0)

Here we see the Scilab code to define and solve the example.

We call the fot_fminunc function to solve the given problem.

Press CTRL + s

Click on execute button on scilab.

Save the file by pressing Control and S keys simultaneously.

To run the file, click on the Execute menu.

Click on File with Echo from the drop-down menu.

Change the window to Scilab console.

Switch to the Scilab console to see the output.

We see that it prints the

  • xopt value as 1,1,
  • fopt value as 1.466D-16,
  • Output as the Optimal solution Found

Show Slide

Integer Nonlinear Programming

We will now look at integer nonlinear programming problems.

These are problems where some decision variables are constrained to be integers.

Show Slide 6

Mathematical Formulation

A general form of the unconstrained integer programming problem is as shown.

Show Slide

Example

We will now solve this example to illustrate the use of fot_intfminunc.

In this example, we will learn how to:

  • Minimize the given function
  • Note that the objective function is nonlinear.

Some of the decision variables are integers.

Show opt_intfminunc.sce in scilab editor.

We will use the toolbox to solve this example.

Open the Scilab console.

Type editor on the Scilab console and press Enter.

Open opt_intfminunc.sce in the Scilab editor.

Highlight ‘f’ f is the objective function.
Highlight ‘x0’ x0 is a vector containing the starting values of the decision variables.
Highlight ‘intcon’ intcon is a vector of the indices of the integer variables.
Highlight ‘xopt, fopt, exitflag, output, gradient, hessian’

Now we will see the output arguments.

Output arguments are xopt, fopt, exitflag, output, gradient, hessian

Highlight ‘xopt’ xopt is the optimal value of x.
Highlight ‘fopt’ fopt is the optimal objective function value.
Highlight ‘exitflag’ exitflag is the status of execution.
Highlight ‘Gradient’ Gradient is a vector containing the objective's gradient of the solution
Highlight ‘Hessian’ Hessian is a matrix containing the Lagrangian's hessian of the solution.

Press CTRL + s

Click on execute button on scilab.

Save the file by pressing Control and S keys simultaneously.

To run the file, click on the Execute menu.

Click on File with Echo from the drop-down.

Change the window to Scilab console.

Switch to the Scilab console to see the output.

We see that it prints the

  • xopt value as 1,1,
  • fopt value as 1.341D-19,
  • Output as the Optimal solution Found

Show Slide

Summary

This brings us to the end of this tutorial. Let us summarise.

In this tutorial, we have learnt to:

  • Use fot_fminunc and fot_intfminunc functions of the FOSSEE Optimization Toolbox.
  • Solve unconstrained nonlinear programming examples in Scilab.

Show Slide

Assignment

As an assignment, please do the following:

  • What will be the solution if we include the following constraint in the previous example.

Show Slide

Assignment

  • The optimal value will be 2547.7231 and
  • Optimal solution will be x one equal to 64.363297and x two equal to 50.720229

Show Slide:

About Spoken Tutorial Project

The video at the following link summarises the Spoken Tutorial project.

Please download and watch it.

Show Slide:

Spoken Tutorial Workshops

The Spoken Tutorial Project Team conducts workshops and gives certificates.

For more details, please write to us

Show Slide:

Answers for THIS Spoken Tutorial

Please post your timed queries in this forum.
Show Slide: FOSSEE Forum Please post your general and technical queries on Scilab in this forum.

Show Slide:

Textbook Companion project

The FOSSEE team coordinates the Textbook Companion project.

We give Certificates and Honorarium to the contributors.

For more details, please visit this site.

Show Slide: Lab Migration

The FOSSEE team coordinates the Lab Migration project.

For more details, please visit this site.

Show Slide:

Acknowledgement

Spoken Tutorial and FOSSEE projects are funded by MoE, Government of India.

Show Slide :

Thank you

This is Anandajith TS, FOSSEE intern 2021, IIT Bombay signing off.

Thanks for joining.

Contributors and Content Editors

Anandajitht, Nancyvarkey, Nirmala Venkat