Try to search your question here, if you can't find : Ask Any Question Now ?

# AMPL CreateProcess(".snopt.exe") failure! Error code 2

HomeCategory: stackoverflowAMPL CreateProcess(".snopt.exe") failure! Error code 2

I’m solving an svm problem with ampl (both primal and dual form).The model should be correct and indeed
it compiles without errors but I get the following error message:

CreateProcess(“.snopt.exe”) failure!
Error code 2.

these are my models:

primal form

``````param n;

param x{i in{1..n}, j in{1..2} };

param y{i in{1..n}};

var w{i in{1..2}};
var b;

# objective function

minimize obj: 1/2 * sum{i in{1..2}}( w[i]^2 );

subject to c1 {i in {1..n}}:  y[i] * ( sum{j in {1..2}} ( w[j] * x[i,j] ) + b ) >= 1;

``````

dual form:

``````reset;

param l;
param C := 10;

var lambda{1..l}>=0, <= C;
param x{i in{1..l}, j in{1..2} };
param y{i in{1..l}};

minimize obj : 1/2*sum{i in 1..l}lambda[i]*y[i]*sum{k in 1..2}x[i,k]*
sum{j in 1..l}lambda[j]*y[j]*x[j,k];

s.t.  vincolo1: sum{i in 1..l}lambda[i]*y[i]=0;
``````

and model.dat

``````param n:=10;
#param l:=10;

param x : 1 2  :=
1   -1  7
2   -2  5
3   2   5
4   -2  1
5   0   -1
6   -4  3
7   0   3
8   3   0
9   4   3
10  2   8;

param y :=
1   1
2   1
3   1
4   1
5   1
6   -1
7   -1
8   -1
9   -1
10  -1;
``````