Difference between revisions of "Non-linear programming"
Jump to navigation
Jump to search
Kevin Dunn (talk | contribs) |
Kevin Dunn (talk | contribs) |
||
Line 70: | Line 70: | ||
| align="left" colspan="1"| | | align="left" colspan="1"| | ||
[https://docs.google.com/document/d/1NozRUYfdIw2RLnU0DExOzF-RH-mx5VbjgQU35zxKLCU Handout from class] | [https://docs.google.com/document/d/1NozRUYfdIw2RLnU0DExOzF-RH-mx5VbjgQU35zxKLCU Handout from class] | ||
| [ | | [http://learnche.mcmaster.ca/media/2015-4G3-Class-05A.mp4 Video] | ||
|align="left" colspan="1"| | |align="left" colspan="1"| | ||
|- | |- | ||
Line 81: | Line 81: | ||
| align="left" colspan="1"| | | align="left" colspan="1"| | ||
[https://docs.google.com/document/d/10oe_laMhtPl5roJGa3C44YlsSvdbHvUAjt6uRMf9q4k Handout from class] | [https://docs.google.com/document/d/10oe_laMhtPl5roJGa3C44YlsSvdbHvUAjt6uRMf9q4k Handout from class] | ||
| [ | | [http://learnche.mcmaster.ca/media/2015-4G3-Class-06A.mp4 Video] | ||
|align="left" colspan="1"| | |align="left" colspan="1"| | ||
|- | |- | ||
Line 92: | Line 92: | ||
| align="left" colspan="1"| | | align="left" colspan="1"| | ||
[https://docs.google.com/document/d/1h9qLQbzeeqtQjf3l9Rmwx-5UKZF-ac2ZqMioupda8cs Handout from class] | [https://docs.google.com/document/d/1h9qLQbzeeqtQjf3l9Rmwx-5UKZF-ac2ZqMioupda8cs Handout from class] | ||
| [ | | [http://learnche.mcmaster.ca/media/2015-4G3-Class-06B.mp4 Video] | ||
|align="left" colspan="1"| | |align="left" colspan="1"| | ||
|- | |- | ||
Line 108: | Line 108: | ||
| align="left" colspan="1"| | | align="left" colspan="1"| | ||
[https://docs.google.com/document/d/1vg7ffZUjSSmh1pL1EgeCGJtQnCSC652UWaBanfmqXr0 Handout from class] | [https://docs.google.com/document/d/1vg7ffZUjSSmh1pL1EgeCGJtQnCSC652UWaBanfmqXr0 Handout from class] | ||
| [ | | [http://learnche.mcmaster.ca/media/2015-4G3-Class-08A.mp4 Video] | ||
|align="left" colspan="1"| | |align="left" colspan="1"| | ||
|- | |- | ||
Line 119: | Line 119: | ||
| align="left" colspan="1"| | | align="left" colspan="1"| | ||
[https://docs.google.com/document/d/1tISkFj7nYa3RV7G8LF4S_nD7dMzb7_ATwY0z4gslDT0 Handout from class] | [https://docs.google.com/document/d/1tISkFj7nYa3RV7G8LF4S_nD7dMzb7_ATwY0z4gslDT0 Handout from class] | ||
| [ | | [http://learnche.mcmaster.ca/media/2015-4G3-Class-08B.mp4 Video] | ||
|align="left" colspan="1"| | |align="left" colspan="1"| | ||
Code used in class (see below) | Code used in class (see below) | ||
Line 130: | Line 130: | ||
| align="left" colspan="1"| | | align="left" colspan="1"| | ||
[https://docs.google.com/document/d/1tHekhHdPWEPhPm_lGVP5cws_2-NsTw_6JpVhhLSlgmo Handout from class] | [https://docs.google.com/document/d/1tHekhHdPWEPhPm_lGVP5cws_2-NsTw_6JpVhhLSlgmo Handout from class] | ||
|[ | |[http://learnche.mcmaster.ca/media/2015-4G3-Class-09A.mp4 Video] | ||
|align="left" colspan="1"| | |align="left" colspan="1"| | ||
|- | |- | ||
Line 139: | Line 139: | ||
| align="left" colspan="1"| | | align="left" colspan="1"| | ||
[[Media:Guest-lecture-4G3-2015.pdf |Handout from class]] | [[Media:Guest-lecture-4G3-2015.pdf |Handout from class]] | ||
| | |http://learnche.mcmaster.ca/media/2015-4G3-Class-09B.mp4 Video] | ||
|align="left" colspan="1"| | |align="left" colspan="1"| | ||
|- | |- | ||
Line 149: | Line 149: | ||
| align="left" colspan="1"| | | align="left" colspan="1"| | ||
[https://docs.google.com/document/d/1tHekhHdPWEPhPm_lGVP5cws_2-NsTw_6JpVhhLSlgmo Handout from class] (continued with handout 09A) | [https://docs.google.com/document/d/1tHekhHdPWEPhPm_lGVP5cws_2-NsTw_6JpVhhLSlgmo Handout from class] (continued with handout 09A) | ||
| [ | | [http://learnche.mcmaster.ca/media/2015-4G3-Class-10A.mp4 Video] | ||
|align="left" colspan="1"| | |align="left" colspan="1"| | ||
|- | |- | ||
Line 159: | Line 159: | ||
| align="left" colspan="1"| | | align="left" colspan="1"| | ||
[https://docs.google.com/document/d/14F-MRq34UNR52Wg2JL9MalYfVZIOHjYCTkRa9tgGQ7g/edit?usp=sharing Handout from class] | [https://docs.google.com/document/d/14F-MRq34UNR52Wg2JL9MalYfVZIOHjYCTkRa9tgGQ7g/edit?usp=sharing Handout from class] | ||
| [ | | [http://learnche.mcmaster.ca/media/2015-4G3-Class-10BA.mp4 Video] | ||
|align="left" colspan="1"| | |align="left" colspan="1"| | ||
|- | |- | ||
Line 169: | Line 169: | ||
| align="left" colspan="1"| | | align="left" colspan="1"| | ||
[https://docs.google.com/document/d/1QdpFX1wgiCfNXgEJz9r6j85k4vXXfwbDPo9weKuCFR0/edit?usp=sharing Handout from class] | [https://docs.google.com/document/d/1QdpFX1wgiCfNXgEJz9r6j85k4vXXfwbDPo9weKuCFR0/edit?usp=sharing Handout from class] | ||
| [ | | [http://learnche.mcmaster.ca/media/2015-4G3-Class-11A.mp4 Video] | ||
|align="left" colspan="1"| | |align="left" colspan="1"| | ||
|} | |} |
Revision as of 20:16, 3 January 2017
Class date(s): | 04 February 2015 | ||||
| |||||
| |||||
| |||||
| |||||
| |||||
| |||||
| |||||
| |||||
| |||||
| |||||
Resources
Scroll down, if necessary, to see the resources.
Date | Class number | Topic | Slides/handouts for class | Video file | References and Notes |
---|---|---|---|---|---|
04 February | 05A |
|
Video | ||
09 February | 06A |
|
Video | ||
11 February | 06B |
|
Video | ||
16 to 27 February | 07 |
Reading week break and midterm | |||
02 March | 08A |
|
Video | ||
04 March | 08B |
|
Video |
Code used in class (see below) | |
09 March | 09A |
|
Video | ||
11 March | 09B |
Guest lecture |
http://learnche.mcmaster.ca/media/2015-4G3-Class-09B.mp4 Video] | ||
16 March | 10A |
|
Handout from class (continued with handout 09A) |
Video | |
18 March | 10B |
|
Video | ||
23 March | 11A |
|
Video |
Taking full Newton's steps to solve the class example
clear all;
close all;
clc;
[X1,X2] = meshgrid(-0.5:0.1:6, 0:0.01:9);
Z = func(X1,X2);
contour(X1, X2, Z)
hold on
grid on
x = [1,3]';
plot(x(1), x(2), 'o')
text(x(1)+0.2, x(2), '0')
for k = 1:10
slope = -first_deriv(x)
step = hessian(x)\slope; % Solves the Ax=b problem, as x = A\b
x = x + step;
plot(x(1), x(2), '*')
text(x(1)+0.1, x(2), num2str(k))
end
func.m
function y = func(x1,x2)
y = 4.*x1.*x2 - 5.*(x1-2).^4 - 3.*(x2-5).^4;
first_deriv.m
function y = first_deriv(x)
y = [4*x(2) - 20*(x(1)-2)^3;
4*x(1) - 12*(x(2)-5)^3];
hessian.m
function y = hessian(x)
y = [-60*(x(1)-2)^2, 4;
4, -36*(x(2)-5)^2];