Skip to content

Instantly share code, notes, and snippets.

@madeleineudell madeleineudell/model.nl
Last active Dec 18, 2015

Embed
What would you like to do?
solver data from AmplNLSolver#26
g3 1 1 0
10 1 1 1 0 0
0 1
0 0
0 10 0
0 0 0 1
0 0 0 0 0
10 10
0 0
0 0 0 0 0
C0
n0
O0 0
o54
10
o3
n1
o0
n1
o44
o16
v0
o3
n1
o0
n1
o44
o16
v1
o3
n1
o0
n1
o44
o16
v2
o3
n1
o0
n1
o44
o16
v3
o3
n1
o0
n1
o44
o16
v4
o3
n1
o0
n1
o44
o16
v5
o3
n1
o0
n1
o44
o16
v6
o3
n1
o0
n1
o44
o16
v7
o3
n1
o0
n1
o44
o16
v8
o3
n1
o0
n1
o44
o16
v9
d1
0 0
x10
0 0.0
1 0.0
2 0.0
3 0.0
4 0.0
5 0.0
6 0.0
7 0.0
8 0.0
9 0.0
r
1 4.0
b
0 -10.0 10.0
0 -10.0 10.0
0 -10.0 10.0
0 -10.0 10.0
0 -10.0 10.0
0 -10.0 10.0
0 -10.0 10.0
0 -10.0 10.0
0 -10.0 10.0
0 -10.0 10.0
k9
1
2
3
4
5
6
7
8
9
J0 10
0 1.0
1 1.0
2 1.0
3 1.0
4 1.0
5 1.0
6 1.0
7 1.0
8 1.0
9 1.0
G0 10
0 0.0
1 0.0
2 0.0
3 0.0
4 0.0
5 0.0
6 0.0
7 0.0
8 0.0
9 0.0
user interrupt
Options
3
1
1
0
1
0
1
1
-0.06308413878522948
using JuMP, AmplNLWriter, MathProgBase
srand(4)
nvar = 10
solver=AmplNLSolver("couenne")
m = Model(solver=solver)
@defVar(m, -10 <= x[i=1:nvar] <= 10)
@setNLObjective(m, Min, sum{1/(1+exp(-x[i])), i=1:nvar})
@addConstraint(m, sum{x[i], i=1:nvar} <= .4*nvar)
@assert(solve(m) == :Optimal)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.