Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
N
NOS_public
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
1
Issues
1
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
TEACHING
NOS_public
Commits
08158557
Commit
08158557
authored
Jul 25, 2016
by
Gianluca Frison
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
added solution to ex01
parent
2f1dcd1c
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
68 additions
and
0 deletions
+68
-0
genrosm.mod
exercises/ex01/solutions/genrosm.mod
+30
-0
sol01.txt
exercises/ex01/solutions/sol01.txt
+38
-0
No files found.
exercises/ex01/solutions/genrosm.mod
0 → 100644
View file @
08158557
reset;
param n:=4;
var x{1..n} := 2, >= -2, <=2;
#var x{1..n} >= -2, <=2;
display x;
let x[1] := -1; #-1.0;
let x[2] := 1; # 0.5;
let x[3] := 1; # 0.4;
let x[4] := 1; # 0.3;
display x;
subject to
cons1: -400*(x[1]*x[2]-x[1]^3)-2+2*x[1] = 0;
cons{i in 2..n-1}: 200*(x[i]-x[i-1]^2)-400*(x[i+1]*x[i]-x[i]^3)-2+2*x[i] = 0;
consn: 200*(x[n]-x[n-1]^2) = 0;
#option solver conopt;
#option solver knitro;
#option solver loqo;
#option solver minos;
#option solver snopt;
option solver ipopt;
#option solver baron;
#option solver couenne;
solve;
display x;
exercises/ex01/solutions/sol01.txt
0 → 100644
View file @
08158557
|------------------|
| Solution of ex01 |
|------------------|
---
1.2
---
Starting on the y-axis (e.g. at (0,10)), the local solvers
- conopt
- knitro
- loqo
- minos
- snopt
- ipopt
can not find the global solution, and they end up with very large negative values of x.
On the other hand, the global solvers
- baron
- couenne
can find the global solution (3.0,0.5).
---
1.3
---
See beale_grad.mod
---
1.5
---
See genrosm.mod
Stationary points:
(1,1,1,1) -> global minimum
(-0.776,0.613,0.382,0.146) -> local minumum
(-0.656,0.443,0.204,0.042) -> saddle point
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment