The following code solves correctly using the Ipopt.jl
Ipopt interface, but returns an error “bad line xxx of yyy.nl file” when I try to use the AmplNLWriter.jl
interface (both using Ipopt and Ipopt_jll).
Other “basic” models using the AmplNLWriter interface seem to work fine (so does ] test AmplNLWriter
) so I can’t really point out what is the problem. Should I fill a bug report ? In which repo? AmplNLWriter.jl
?
using Pkg
Pkg.activate(temp=true)
Pkg.add(["JuMP","Ipopt","AmplNLWriter","Ipopt_jll"])
using JuMP
using Ipopt
using AmplNLWriter, Ipopt_jll
function solveEquilibriumWithoutTrade(
ampl = false,
const_d = [50.0 100.0; 100.0 10.0; 200.0 200.0; 200.0 200.0; 40.0 10.0],
ϵ_d = [-0.8 0.4; 0.3 0.15; 0.0 0.0; 0.0 0.0; 0.0 0.0;;; 0.3 0.15; -0.8 0.4; 0.0 0.0; 0.0 0.0; 0.0 0.0;;; 0.6 0.3; 0.0 0.0; -0.8 0.4; 0.4 0.2; 0.4 0.2;;; 0.0 0.0; 0.6 0.15; 0.4 0.2; -0.8 0.4; 0.4 0.2;;; 0.3 0.15; 0.3 0.15; 0.4 0.2; 0.4 0.2; -0.8 0.4;;;; 0.4 -0.8; 0.15 0.3; 0.0 0.0; 0.0 0.0; 0.0 0.0;;; 0.15 0.3; 0.4 -0.8; 0.0 0.0; 0.0 0.0; 0.0 0.0;;; 0.3 0.6; 0.0 0.0; 0.4 -0.8; 0.2 0.4; 0.2 0.4;;; 0.0 0.0; 0.15 0.6; 0.2 0.4; 0.4 -0.8; 0.2 0.4;;; 0.15 0.3; 0.15 0.3; 0.2 0.4; 0.2 0.4; 0.4 -0.8],
d0 = [72.0 100.0; 100.0 100.0; 50.0 50.0; 50.0 50.0; 10.0 10.0],
const_s = [100.0 100.0; 100.0 100.0; 200.0 200.0; 200.0 200.0; 10.0 10.0],
ϵ_s = [0.8 0.0; 0.0 0.0; -0.6 -0.3; 0.0 0.0; -0.6 -0.3;;; 0.0 0.0; 0.8 0.0; 0.0 0.0; -0.6 -0.3; -0.6 -0.3;;; 0.0 0.0; 0.0 0.0; 0.8 0.0; 0.0 0.0; 0.0 0.0;;; 0.0 0.0; 0.0 0.0; 0.0 0.0; 0.8 0.0; 0.0 0.0;;; 0.0 0.0; 0.0 0.0; 0.0 0.0; 0.0 0.0; 0.8 0.0;;;; 0.0 0.8; 0.0 0.0; -0.3 -0.6; 0.0 0.0; -0.3 -0.6;;; 0.0 0.0; 0.0 0.0; 0.0 0.0; -0.3 -0.6; -0.3 -0.6;;; 0.0 0.0; 0.0 0.0; 0.0 0.8; 0.0 0.0; 0.0 0.0;;; 0.0 0.0; 0.0 0.0; 0.0 0.0; 0.0 0.8; 0.0 0.0;;; 0.0 0.0; 0.0 0.0; 0.0 0.0; 0.0 0.0; 0.0 0.8],
s0 = [72.0 100.0; 100.0 100.0; 50.0 50.0; 50.0 50.0; 10.0 10.0],
pr0 = [0.64 10.0; 10.0 10.0; 30.0 30.0; 30.0 30.0; 100.0 100.0];
)
(np, nr) = size(ϵ_d)
# *** Model declaration ***
if(ampl)
m = Model(() -> AmplNLWriter.Optimizer(Ipopt_jll.amplexe))
else
m = Model(optimizer_with_attributes(Ipopt.Optimizer))
end
# *** Variables declaration ***
@variable(m, d[p = 1:np, r = 1:nr] >= 0, start=d0[p,r]) # Demand quantity
@variable(m, s[p = 1:np, r = 1:nr] >= 0, start=s0[p,r]) # Supply quantity
@variable(m, pr[p = 1:np, r = 1:nr] >= 0, start=pr0[p,r]) # Price
# *** Constraints declaration (and definition) ***
@NLconstraint(m, demand[p in 1:np, r in 1:nr], d[p,r] == const_d[p,r] * prod(pr[in_p,in_r]^ ϵ_d[p,r,in_p,in_r] for in_p in 1:np, in_r in 1:nr if ϵ_d[p,r,in_p,in_r] != 0.0 ) )
@NLconstraint(m, supply[p in 1:np, r in 1:nr], s[p,r] == const_s[p,r] * prod(pr[in_p,in_r]^ ϵ_s[p,r,in_p,in_r] for in_p in 1:np, in_r in 1:nr if ϵ_s[p,r,in_p,in_r] != 0.0) )
# *** Objective function ***
@NLobjective(m, Min,
sum((d[p,r] - s[p,r])^2 for p in 1:np, r in 1:nr)
)
# *** Print human-readable version of the model ***
print(m)
# *** Solve the model ***
optimize!(m)
status = termination_status(m)
end
solveEquilibriumWithoutTrade()
solveEquilibriumWithoutTrade(true)
Output
julia>
Min (d[1,1] - s[1,1]) ^ 2.0 + (d[1,2] - s[1,2]) ^ 2.0 + (d[2,1] - s[2,1]) ^ 2.0 + (d[2,2] - s[2,2]) ^ 2.0 + (d[3,1] - s[3,1]) ^ 2.0 + (d[3,2] - s[3,2]) ^ 2.0 + (d[4,1] - s[4,1]) ^ 2.0 + (d[4,2] - s[4,2]) ^ 2.0 + (d[5,1] - s[5,1]) ^ 2.0 + (d[5,2] - s[5,2]) ^ 2.0
Subject to
d[1,1] ≥ 0.0
d[2,1] ≥ 0.0
d[3,1] ≥ 0.0
d[4,1] ≥ 0.0
d[5,1] ≥ 0.0
d[1,2] ≥ 0.0
d[2,2] ≥ 0.0
d[3,2] ≥ 0.0
d[4,2] ≥ 0.0
d[5,2] ≥ 0.0
s[1,1] ≥ 0.0
s[2,1] ≥ 0.0
s[3,1] ≥ 0.0
s[4,1] ≥ 0.0
s[5,1] ≥ 0.0
s[1,2] ≥ 0.0
s[2,2] ≥ 0.0
s[3,2] ≥ 0.0
s[4,2] ≥ 0.0
s[5,2] ≥ 0.0
pr[1,1] ≥ 0.0
pr[2,1] ≥ 0.0
pr[3,1] ≥ 0.0
pr[4,1] ≥ 0.0
pr[5,1] ≥ 0.0
pr[1,2] ≥ 0.0
pr[2,2] ≥ 0.0
pr[3,2] ≥ 0.0
pr[4,2] ≥ 0.0
pr[5,2] ≥ 0.0
d[1,1] - 50.0 * (pr[1,1] ^ -0.8 * pr[1,2] ^ 0.4 * pr[2,1] ^ 0.3 * pr[2,2] ^ 0.15 * pr[3,1] ^ 0.6 * pr[3,2] ^ 0.3 * pr[5,1] ^ 0.3 * pr[5,2] ^ 0.15) = 0
d[2,1] - 100.0 * (pr[1,1] ^ 0.3 *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^ 0.2 * pr[4,2] ^ 0.4 * pr[5,1] ^ 0.4 * pr[5,2] ^ -0.8) = 0
s[1,1] - 100.0 * (*)(pr[1,1] ^ 0.8) = 0
s[2,1] - 100.0 * (*)(pr[2,1] ^ 0.8) = 0
s[3,1] - 200.0 * (pr[1,1] ^ -0.6 * pr[1,2] ^ -0.3 * pr[3,1] ^ 0.8) = 0
s[4,1] - 200.0 * (pr[2,1] ^ -0.6 * pr[2,2] ^ -0.3 * pr[4,1] ^ 0.8) = 0
s[5,1] - 10.0 * (pr[1,1] ^ -0.6 * pr[1,2] ^ -0.3 * pr[2,1] ^ -0.6 * pr[2,2] ^ -0.3 * pr[5,1] ^ 0.8) = 0
s[1,2] - 100.0 * (*)(pr[1,2] ^ 0.8) = 0
s[2,2] - 100.0 * 1 = 0
s[3,2] - 200.0 * (pr[1,1] ^ -0.3 * pr[1,2] ^ -0.6 * pr[3,2] ^ 0.8) = 0
s[4,2] - 200.0 * (pr[2,1] ^ -0.3 * pr[2,2] ^ -0.6 * pr[4,2] ^ 0.8) = 0
s[5,2] - 10.0 * (pr[1,1] ^ -0.3 * pr[1,2] ^ -0.6 * pr[2,1] ^ -0.3 * pr[2,2] ^ -0.6 * pr[5,2] ^ 0.8) = 0
This is Ipopt version 3.14.4, running with linear solver MUMPS 5.4.1.
Number of nonzeros in equality constraint Jacobian...: 113
Number of nonzeros in inequality constraint Jacobian.: 0
Number of nonzeros in Lagrangian Hessian.............: 357
Total number of variables............................: 30
variables with only lower bounds: 30
variables with lower and upper bounds: 0
variables with only upper bounds: 0
Total number of equality constraints.................: 20
Total number of inequality constraints...............: 0
inequality constraints with only lower bounds: 0
inequality constraints with lower and upper bounds: 0
inequality constraints with only upper bounds: 0
iter objective inf_pr inf_du lg(mu) ||d|| lg(rg) alpha_du alpha_pr ls
0 0.0000000e+00 8.57e+04 1.64e+00 -1.0 0.00e+00 - 0.00e+00 0.00e+00 0
1 5.6883018e+03 5.77e+04 1.49e+03 -1.0 8.33e+02 - 4.65e-02 3.06e-01h 1
2 8.5432068e+03 7.69e+04 9.37e+05 -1.0 3.00e+03 - 6.71e-03 4.61e-01h 1
3 1.8415793e+03 6.39e+03 1.07e+05 -1.0 1.60e+03 - 2.43e-02 1.00e+00f 1
4 1.5214364e+03 3.23e+03 2.28e+06 -1.0 2.83e+03 - 4.51e-01 7.19e-01f 1
5 3.4340351e+04 3.09e+03 1.25e+06 -1.0 1.56e+03 - 6.12e-02 7.59e-02H 1
6 3.3455172e+04 2.93e+03 1.20e+06 -1.0 1.04e+03 -2.0 9.15e-02 2.31e-02F 1
7 5.7251670e+04 6.90e+02 2.06e+05 -1.0 3.20e+03 - 3.53e-02 2.15e-01h 1
8 4.3274463e+04 5.90e+02 2.71e+05 -1.0 3.45e+02 - 7.10e-03 1.40e-01f 1
9 4.2736841e+04 5.87e+02 2.69e+05 -1.0 4.17e+02 - 1.27e-02 6.07e-03f 1
iter objective inf_pr inf_du lg(mu) ||d|| lg(rg) alpha_du alpha_pr ls
10 4.7888081e+04 2.12e+02 4.11e+05 -1.0 5.26e+02 - 7.17e-03 9.70e-02H 1
11 4.7387800e+04 2.35e+02 3.99e+05 -1.0 3.22e+03 - 3.43e-04 1.18e-02f 3
12 5.7495079e+04 2.02e+02 3.63e+05 -1.0 1.92e+02 0.2 1.13e-01 1.07e-01H 1
13 6.3041232e+04 1.56e+02 3.22e+05 -1.0 3.15e+02 -0.2 8.73e-05 2.48e-01h 2
14 8.8386892e+04 1.52e+02 3.03e+05 -1.0 4.85e+02 0.2 1.02e-01 7.14e-02h 3
15 2.8374415e+05 2.53e+02 2.81e+05 -1.0 1.04e+02 0.6 2.38e-01 5.59e-01H 1
16 2.5168364e+05 3.29e+02 3.65e+06 -1.0 1.19e+02 1.0 9.02e-02 1.00e+00f 1
17 1.8480724e+05 2.03e+02 2.37e+06 -1.0 5.13e+01 1.5 6.57e-01 1.00e+00f 1
18 1.4235193e+05 2.31e+02 2.25e+06 -1.0 2.20e+03 1.0 5.26e-02 4.71e-02f 2
19 1.3903370e+05 2.36e+02 2.19e+06 -1.0 9.13e+03 1.4 1.81e-02 7.47e-03f 2
iter objective inf_pr inf_du lg(mu) ||d|| lg(rg) alpha_du alpha_pr ls
20 1.4073316e+05 2.27e+02 2.10e+06 -1.0 3.75e+02 1.8 4.45e-01 4.59e-02h 3
21 1.7651054e+05 1.10e+02 2.27e+06 -1.0 7.74e+01 2.3 1.00e+00 1.00e+00h 1
22 1.8668105e+05 2.33e+01 3.24e+06 -1.0 3.58e+01 2.7 6.18e-01 1.00e+00h 1
23 1.7740758e+05 6.86e-01 3.11e+05 -1.0 1.68e+01 2.2 1.00e+00 1.00e+00f 1
24 1.5983850e+05 2.08e-01 2.86e+04 -1.0 9.56e+00 1.7 1.00e+00 1.00e+00f 1
25 1.1768725e+05 1.62e+00 1.19e+03 -1.0 2.60e+01 1.3 1.00e+00 1.00e+00f 1
26 5.5212240e+04 9.08e+00 5.48e+03 -1.0 5.75e+01 0.8 1.00e+00 1.00e+00f 1
27 1.3433566e+04 2.38e+01 5.40e+03 -1.0 8.27e+01 0.3 1.00e+00 1.00e+00f 1
28 9.0730301e+03 7.58e+01 4.79e+03 -1.0 1.14e+03 - 1.53e-01 9.70e-02f 2
29 1.4996331e+02 5.41e+01 7.44e+03 -1.0 1.69e+02 - 1.00e+00 1.00e+00f 1
iter objective inf_pr inf_du lg(mu) ||d|| lg(rg) alpha_du alpha_pr ls
30 6.7247379e+01 3.11e+01 7.46e+02 -1.0 3.68e+01 - 1.00e+00 1.00e+00f 1
31 1.7651371e-01 2.21e-01 7.11e+01 -1.0 9.40e+00 - 7.13e-01 1.00e+00f 1
32 2.7549528e-05 5.44e-03 5.38e-01 -1.0 2.08e-01 - 1.00e+00 1.00e+00h 1
33 9.0578900e-07 3.71e-07 1.01e-04 -1.7 5.58e-03 - 1.00e+00 1.00e+00h 1
34 5.1314470e-11 6.07e-09 3.72e-06 -3.8 1.81e-03 - 1.00e+00 1.00e+00h 1
35 7.7065711e-15 3.41e-13 2.27e-10 -5.7 1.36e-05 - 1.00e+00 1.00e+00h 1
36 1.4218476e-20 3.41e-13 9.56e-14 -8.6 1.68e-07 - 1.00e+00 1.00e+00h 1
Number of Iterations....: 36
(scaled) (unscaled)
Objective...............: 1.4218475719377978e-20 1.4218475719377978e-20
Dual infeasibility......: 9.5634958457802712e-14 9.5634958457802712e-14
Constraint violation....: 2.0436591416786226e-13 3.4106051316484809e-13
Variable bound violation: 0.0000000000000000e+00 0.0000000000000000e+00
Complementarity.........: 2.5059052064168116e-09 2.5059052064168116e-09
Overall NLP error.......: 2.5059052064168116e-09 2.5059052064168116e-09
Number of objective function evaluations = 69
Number of objective gradient evaluations = 37
Number of equality constraint evaluations = 69
Number of inequality constraint evaluations = 0
Number of equality constraint Jacobian evaluations = 37
Number of inequality constraint Jacobian evaluations = 0
Number of Lagrangian Hessian evaluations = 36
Total seconds in IPOPT = 0.071
EXIT: Optimal Solution Found.
Min (d[1,1] - s[1,1]) ^ 2.0 + (d[1,2] - s[1,2]) ^ 2.0 + (d[2,1] - s[2,1]) ^ 2.0 + (d[2,2] - s[2,2]) ^ 2.0 + (d[3,1] - s[3,1]) ^ 2.0 + (d[3,2] - s[3,2]) ^ 2.0 + (d[4,1] - s[4,1]) ^ 2.0 + (d[4,2] - s[4,2]) ^ 2.0 + (d[5,1] - s[5,1]) ^ 2.0 + (d[5,2] - s[5,2]) ^ 2.0
Subject to
d[1,1] ≥ 0.0
d[2,1] ≥ 0.0
d[3,1] ≥ 0.0
d[4,1] ≥ 0.0
d[5,1] ≥ 0.0
d[1,2] ≥ 0.0
d[2,2] ≥ 0.0
d[3,2] ≥ 0.0
d[4,2] ≥ 0.0
d[5,2] ≥ 0.0
s[1,1] ≥ 0.0
s[2,1] ≥ 0.0
s[3,1] ≥ 0.0
s[4,1] ≥ 0.0
s[5,1] ≥ 0.0
s[1,2] ≥ 0.0
s[2,2] ≥ 0.0
s[3,2] ≥ 0.0
s[4,2] ≥ 0.0
s[5,2] ≥ 0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annot open .nl file
terminate called after throwing an instance of 'Ipopt::TNLP::INVALID_TNLP'