# MOQP.mod # Original AMPL coding by Sven Leyffer, Argonne National Laboratory # # A generic MOQP (matrices are upper case) # # minimize { x^T G_k x + g_k^T x , for k=1,...,p } # subj. to A^T x >= b # x >= 0 # # for data files, see below. # ------------------------------------------------------------ # ... problem dimensions & index sets param n >= 1, integer; # ... number of variables param m >= 1, integer; # ... number of constraints param p >= 1, integer; # ... number of objectives set N := 1..n; set M := 1..m; set P := 1..p; # ... problem data param G{P,N,N} default 0; # ... objective Hessian param g{P,N} default 0; # ... objective gradients param A{M,N} default 0; # ... constraint Jacobian param b{M} default 0; # ... lower bounds on A^T x var x{N} >= 0; # ... variables # ... objective functions minimize f{pp in P}: sum{i in N, j in N} G[pp,i,j] * x[i] * x[j] / 2 + sum{i in N} g[pp,i] * x[i]; subject to # ... linear constraints c{j in M}: sum{i in N} A[j,i]*x[i] >= b[j];