Difference between revisions of "Scilab/C4/Optimization-Using-Karmarkar-Functions/English-timed"

From Script | Spoken-Tutorial
Jump to: navigation, search
Line 11: Line 11:
 
|-
 
|-
 
| 00:02
 
| 00:02
| Welcome to the spoken tutorial on '''Optimization of Linear Functions with Linear Constraints Using Scilab'''
+
| Welcome to the spoken tutorial on '''Optimization of Linear Functions with Linear Constraints Using Scilab'''.
  
 
|-
 
|-
 
| 00:10
 
| 00:10
| In this tutorial, We will learn  
+
| In this tutorial, We will learn:
  
 
|-
 
|-
Line 23: Line 23:
 
|-
 
|-
 
|00:15
 
|00:15
|and How to use Scilab function '''karmarkar''' for optimization.  
+
|and how to use '''Scilab function karmarkar''', for optimization.  
  
 
|-
 
|-
Line 69: Line 69:
 
|00:58
 
|00:58
  
|The Scilab function '''Karmarkar''' is used for  
+
|The '''Scilab function karmarkar''' is used for  
  
 
|-
 
|-
Line 91: Line 91:
 
|01:10
 
|01:10
  
|| We will solve the following example using '''Karmarkar''' function:  
+
|| We will solve the following example using '''karmarkar''' function:  
  
 
|-
 
|-
Line 101: Line 101:
 
|-
 
|-
 
|01:19
 
|01:19
|for  '''two 'x' one plus 'x' two plus 'x' three  less than or equal to two.'''  
+
|for: '''two 'x' one plus 'x' two plus 'x' three  less than or equal to two.'''  
 
   
 
   
 
|-
 
|-
Line 122: Line 122:
  
 
| 01:42
 
| 01:42
|Note that all the functions objective functions as well as constraints are linear.  
+
|Note that all the functions, objective functions as well as constraints, are linear.  
  
 
|-
 
|-
Line 128: Line 128:
 
|01:49
 
|01:49
  
||Before we solve the given problem go to '''scilab console''' and type:  
+
||Before we solve the given problem, go to '''scilab console''' and type:  
 
|-
 
|-
  
Line 139: Line 139:
 
|01:57
 
|01:57
  
| and '''press Enter.'''  
+
| and press '''Enter.'''  
  
 
|-
 
|-
Line 149: Line 149:
 
|-
 
|-
 
| 02:03
 
| 02:03
|The argument explanation, description and some examples in the '''help browser.'''  
+
|The argument explanation, description and some examples in the '''Help Browser.'''  
  
 
|-
 
|-
Line 161: Line 161:
 
|-
 
|-
 
| 02:19
 
| 02:19
|Out put arguments are ''' 'x' opt, 'f' opt, exitflag, iter, 'y' opt '''
+
|Output arguments are ''' 'x' opt, 'f' opt, exitflag, iter, 'y' opt '''.
  
 
|-
 
|-
Line 177: Line 177:
 
|-
 
|-
 
|02:41
 
|02:41
|''' 'iter' ''': Is the number of iterations required to reach ''' 'x' opt.'''
+
|''' 'iter' ''': is the number of iterations required to reach ''' 'x' opt.'''
  
 
|-
 
|-
Line 192: Line 192:
  
 
| 02:53
 
| 02:53
||Input arguments are ''' 'Aeq' 'beq' 'c' 'x' zero 'rtolf 'gam' 'maxiter' 'outfun' 'A' 'b' 'lb' and 'ub' '''
+
||Input arguments are ''' 'Aeq' 'beq' 'c' 'x zero' 'rtolf 'gam' 'maxiter' 'outfun' 'A' 'b' 'lb' and 'ub' '''
  
 
|-
 
|-
Line 203: Line 203:
  
 
| 03:12
 
| 03:12
| ''' 'beq' '''  :is the right hand side of the linear '''equality''' constraints.  
+
| ''' 'beq' '''  :is the right hand side of the linear '''equality''' constraint.  
  
 
|-
 
|-
Line 209: Line 209:
 
| 03:17
 
| 03:17
  
|''' 'c' ''' : is the '''Linear objective function''' co-efficients of ''' 'x'. '''
+
|''' 'c' ''' : is the '''Linear objective function''' coefficients of ''' 'x'. '''
  
 
|-
 
|-
Line 233: Line 233:
 
| 03:36
 
| 03:36
  
|''' 'maxiter' ''' : is the ''' Maximum''' number of iterations after which the output is returned.  
+
|''' 'maxiter' ''' : is the ''' maximum''' number of iterations after which the output is returned.  
  
 
|-
 
|-
Line 239: Line 239:
 
| 03:43
 
| 03:43
  
|''' 'outfun' ''' : is the additional user-defined output functions .
+
|''' 'outfun' ''' : is the additional user-defined output function.
  
 
|-
 
|-
Line 263: Line 263:
 
| 03:58
 
| 03:58
  
||''' 'ub'''' are the '''Upper bounds'''  of ''' 'x'. '''
+
||''' 'ub'''' are the '''upper bound'''  of ''' 'x'. '''
  
 
|-
 
|-
Line 269: Line 269:
 
| 04:02
 
| 04:02
  
||Now, we can now solve the given example in Scilab using ''' karmarkar''' function.  
+
||Now, we can solve the given example in Scilab using '''karmarkar''' function.  
  
 
|-
 
|-
Line 281: Line 281:
 
| 04:11
 
| 04:11
  
|'A' is equals to open square bracket, two <space> one <space> one <semicolon> one <space> two <space> three <semicolon> two <space> two <space> one, close the square bracket.
+
|'A' is equals to open square bracket, two <space> one <space> one <semicolon> one <space> two <space> three <semicolon> two <space> two <space> one, close the square bracket  
  
 
|-
 
|-
Line 287: Line 287:
 
|04:26
 
|04:26
  
|And press Enter.  
+
|and press Enter.  
  
 
|-
 
|-
Line 293: Line 293:
 
| 04:28
 
| 04:28
  
|similarly type, small 'b' equals to open square bracket, two <semicolon>five <semicolon> six, close the square bracket.  
+
|similarly type: small 'b' equals to open square bracket, two <semicolon> five <semicolon> six, close the square bracket.  
  
 
|-
 
|-
Line 299: Line 299:
 
| 04:38
 
| 04:38
  
| And press '''Enter'''.
+
| and press '''Enter'''.
  
 
|-
 
|-
Line 305: Line 305:
 
| 04:41
 
| 04:41
  
| Type 'c' equals to open square bracket, minus three <semicolon> minus one <semicolon> minus three, close the square bracket.  
+
| Type: 'c' equals to open square bracket, minus three <semicolon> minus one <semicolon> minus three, close the square bracket.  
  
 
|-
 
|-
Line 311: Line 311:
 
| 04:53
 
| 04:53
  
|And press ''' Enter'''.
+
|and press ''' Enter'''.
  
 
|-
 
|-
 
| 04:55
 
| 04:55
| Type 'lb' equals to open square bracket, zero <semicolon> zero <semicolon> zero, close the square bracket.  
+
| Type: 'lb' equals to open square bracket, zero <semicolon> zero <semicolon> zero, close the square bracket.  
  
 
|-
 
|-
 
| 05:05
 
| 05:05
|And press '''Enter'''.
+
|and press '''Enter'''.
  
 
|-
 
|-
Line 325: Line 325:
 
| 05:07
 
| 05:07
  
|Now clear the '''Scilab console''' using '''clc''' command.
+
|Now clear the console using '''clc''' command.
  
 
|-
 
|-
Line 331: Line 331:
 
| 05:12
 
| 05:12
  
| Type ''' open square bracket, 'x' opt <comma> 'f' opt <comma> 'exitflag' <comma> iter, close the square bracket equals to karmarkar open parenthesis, open square bracket, close the square bracket <comma> open square bracket, close the square bracket <comma> 'c' <comma> open square bracket, close the square bracket <comma> open square bracket, close the square bracket <comma> open square bracket, close the square bracket <comma> open square bracket, close the square bracket <comma> open square bracket, close the square bracket <comma> capital 'A' <comma> 'small b' <comma> 'lb', close the round bracket. '''
+
| Type: '''open square bracket, 'x' opt <comma> 'f' opt <comma> 'exitflag' <comma> iter, close the square bracket equals to karmarkar open parenthesis, open square bracket, close the square bracket <comma> open square bracket, close the square bracket <comma> 'c' <comma> open square bracket, close the square bracket <comma> open square bracket, close the square bracket <comma> open square bracket, close the square bracket <comma> open square bracket, close the square bracket <comma> open square bracket, close the square bracket <comma> capital 'A' <comma> 'small b' <comma> 'lb', close the round bracket.'''
  
 
|-
 
|-
Line 337: Line 337:
 
| 06:09
 
| 06:09
  
| And Press '''Enter'''.
+
| and Press '''Enter'''.
  
 
|-
 
|-
Line 343: Line 343:
 
| 06:11
 
| 06:11
  
| Press Enter to continue the Display.
+
| Press Enter to continue the display.
  
 
|-
 
|-
Line 355: Line 355:
 
| 06:18
 
| 06:18
  
| where '''xopt''' is the ''' optimal solution''' to the problem,  
+
| where '''xopt''' is the ''' optimum solution''' to the problem,  
  
 
|-
 
|-
Line 361: Line 361:
 
| 06:23
 
| 06:23
  
|'''fopt'''  is the value of the objective function calculated at optimum solution x is equal to '''xopt'''
+
|'''fopt'''  is the value of the objective function, calculated at optimum solution x is equal to '''xopt'''
  
 
|-
 
|-
Line 367: Line 367:
 
| 06:32
 
| 06:32
  
|and number of iteration required to reach the optimum solution ''' xopt is 70'''.  
+
|and number of iteration required to reach the optimum solution '''xopt''' is '''70'''.  
  
 
|-
 
|-
Line 391: Line 391:
 
| 06:53
 
| 06:53
  
|What is ''' Optimization?'''  
+
|What is ''' optimization?'''  
  
 
|-
 
|-
Line 397: Line 397:
 
| 06:55
 
| 06:55
  
|Use of Scilab function '''Karmarkar''' in optimization to solve linear problems.   
+
|Use of '''Scilab function karmarkar''' in optimization to solve linear problems.   
  
 
|-
 
|-
Line 412: Line 412:
 
| 07:10
 
| 07:10
  
| It summarises the Spoken Tutorial project.  
+
| It summarizes the Spoken Tutorial project.  
  
 
|-
 
|-
Line 418: Line 418:
 
|07:14
 
|07:14
  
||If you do not have good bandwidth, you can download and watch it  
+
||If you do not have good bandwidth, you can download and watch it.
  
 
|-
 
|-
Line 430: Line 430:
 
|07:20
 
|07:20
  
||Conducts workshops using spoken tutorials  
+
||Conducts workshops using spoken tutorials.
  
 
|-
 
|-

Revision as of 17:20, 2 March 2015

Time Narration
00:01 Dear Friends,
00:02 Welcome to the spoken tutorial on Optimization of Linear Functions with Linear Constraints Using Scilab.
00:10 In this tutorial, We will learn:
00:12 what is meant by Optimization?
00:15 and how to use Scilab function karmarkar, for optimization.
00:20 Optimization means
00:22 minimize or maximize a given objective function
00:26 which is also called as Cost function sometimes,
00:30 by varying the decision variables.
00:33 The decision variables are varied subject to the predefined constraints.
00:38 These constraints are also in the form of some functions of the variables.
00:44 Optimization is extensively used in majority of the engineering as well as non-engineering fields like:
00:52 Economics
00:54 Control Theory and
00:56 Operations & Research.
00:58 The Scilab function karmarkar is used for
01:01 optimizing the linear objective function,
01:05 subject to linear constraints
01:07 on the decision variables.
01:10 We will solve the following example using karmarkar function:
01:14 Minimize minus three 'x' one minus 'x' two minus three 'x' three
01:19 for: two 'x' one plus 'x' two plus 'x' three less than or equal to two.
01:26 'x' one plus two 'x' two plus three 'x' three less than or equal to five.
01:32 two 'x' one plus two 'x' two plus 'x' three less than or equal to six.
01:36 where 'x' one 'x' two 'x' three are all greater than or equal to zero
01:42 Note that all the functions, objective functions as well as constraints, are linear.
01:49 Before we solve the given problem, go to scilab console and type:
01:54 help karmarkar
01:57 and press Enter.
01:59 You can see the calling sequence of the argument.
02:03 The argument explanation, description and some examples in the Help Browser.
02:12 Close the Help Browser .
02:14 We will summarize the input and output arguments here.
02:19 Output arguments are 'x' opt, 'f' opt, exitflag, iter, 'y' opt .
02:25 'x' opt: is the optimum solution .
02:28 'f' opt: is the objective function value at optimum solution
02:33 'exitflag' : is the status of execution, it helps in identifying if the algorithm is converging or not.
02:41 'iter' : is the number of iterations required to reach 'x' opt.
02:46 'y' opt : is the structure containing the dual solution.
02:49 This gives the Lagrange multipliers.
02:53 Input arguments are 'Aeq' 'beq' 'c' 'x zero' 'rtolf 'gam' 'maxiter' 'outfun' 'A' 'b' 'lb' and 'ub'
03:09 'Aeq'  : is the Matrix in the linear equality constraints.
03:12 'beq'  :is the right hand side of the linear equality constraint.
03:17 'c'  : is the Linear objective function coefficients of 'x'.
03:21 'x' zero : is the Initial guess .
03:25 rtolf : is Relative tolerance on 'f' of 'x' is equals to 'c' transpose multiplied by 'x'.
03:34 'gam'  : is the Scaling factor.
03:36 'maxiter'  : is the maximum number of iterations after which the output is returned.
03:43 'outfun'  : is the additional user-defined output function.
03:47 'A' : is the Matrix of linear inequality constraints
03:51 'b' : is the right hand side of the linear inequality constraints.
03:55 'lb' : is the lowerbound of 'x'.
03:58 'ub' are the upper bound of 'x'.
04:02 Now, we can solve the given example in Scilab using karmarkar function.
04:07 Go to the scilab console and type:
04:11 'A' is equals to open square bracket, two <space> one <space> one <semicolon> one <space> two <space> three <semicolon> two <space> two <space> one, close the square bracket
04:26 and press Enter.
04:28 similarly type: small 'b' equals to open square bracket, two <semicolon> five <semicolon> six, close the square bracket.
04:38 and press Enter.
04:41 Type: 'c' equals to open square bracket, minus three <semicolon> minus one <semicolon> minus three, close the square bracket.
04:53 and press Enter.
04:55 Type: 'lb' equals to open square bracket, zero <semicolon> zero <semicolon> zero, close the square bracket.
05:05 and press Enter.
05:07 Now clear the console using clc command.
05:12 Type: open square bracket, 'x' opt <comma> 'f' opt <comma> 'exitflag' <comma> iter, close the square bracket equals to karmarkar open parenthesis, open square bracket, close the square bracket <comma> open square bracket, close the square bracket <comma> 'c' <comma> open square bracket, close the square bracket <comma> open square bracket, close the square bracket <comma> open square bracket, close the square bracket <comma> open square bracket, close the square bracket <comma> open square bracket, close the square bracket <comma> capital 'A' <comma> 'small b' <comma> 'lb', close the round bracket.
06:09 and Press Enter.
06:11 Press Enter to continue the display.
06:14 This will give the output as shown on the screen
06:18 where xopt is the optimum solution to the problem,
06:23 fopt is the value of the objective function, calculated at optimum solution x is equal to xopt
06:32 and number of iteration required to reach the optimum solution xopt is 70.
06:39 Please note that: it is mandatory to specify the input arguments in the same order
06:46 in which they have been listed above, while calling the function.
06:51 In this tutorial, we learned:
06:53 What is optimization?
06:55 Use of Scilab function karmarkar in optimization to solve linear problems.
07:01 To contact the scilab team, please write to contact@scilab.in
07:08 Watch the video available at the following link.
07:10 It summarizes the Spoken Tutorial project.
07:14 If you do not have good bandwidth, you can download and watch it.
07:18 The spoken tutorial project Team:
07:20 Conducts workshops using spoken tutorials.
07:23 Gives certificates to those who pass an online test.
07:27 For more details, please write to contact@spoken-tutorial.org.
07:34 Spoken Tutorial Project is a part of the Talk to a Teacher project.
07:37 It is supported by the National Mission on Eduction through ICT, MHRD, Government of India.
07:44 More information on this mission is available at spoken-tutorial.org/NMEICT-Intro.
07:53 This is Anuradha Amrutkar from IIT Bombay, signing off.
07:57 Thank you for joining. Good Bye.

Contributors and Content Editors

Gaurav, PoojaMoolya, Sandhya.np14