Commit d618b40f authored by Gianluca Frison's avatar Gianluca Frison
Browse files

added solution to 2.1 2.2

parent c10581f2
var x1 := 0;
var x2 := 1;
s.t. eq1: x1 + x1*x2 + x2^2 = 0;
s.t. eq2: x1^2 - 2*x1 + x2^2 = 0;
#option solver snopt;
#option solver minos;
#option solver ipopt;
option solver knitro;
#option minos_options "outlev=2";
option knitro_options "outlev=2 feastol=0";
display x1, x2;
param n := 10;
var x{i in 1..n} := 1/n;
#var x{i in 1..n} := 1/n*(-1)^i;
s.t. eq{i in 1..n} : n - sum{j in 1..n} cos(x[j]) + i*(1-cos(x[i])) - sin(x[i]) = 0;
option solver knitro;
option knitro_options "outlev=2 feastol=0 multistart=1";
display x;
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment