$title Test of NLP -> MCP via JAMS (EMP16,SEQ=601) $onText This was giving JAMS trouble since dL_dt and dL_dz are constant. Contributors: Steve Dirkse & Michael Ferris, February 2013 $offText variables z, t, obj; positive variables t; equations defobj; defobj.. obj =e= z + 2*t; model simp /defobj/; z.fx = 1; t.up = 2; file empinfo / 'empinfo.txt' /; putclose empinfo 'modeltype mcp'; file jamsopt / 'jams.opt' /; putclose jamsopt 'EMPInfoFile empinfo.txt' / 'fileName mcpTmpScalar.gms' / 'dict dict.txt' /; simp.optfile = 1; solve simp using emp min obj; abort$[abs(z.l-1) > 1e-7] 'bad z.l, should be 1', z.l; abort$[abs(t.l) > 1e-7] 'bad t.l, should be 0', t.l; abort$[abs(obj.l-1) > 1e-7] 'bad obj.l, should be 1', obj.l; abort$[abs(z.m-1) > 1e-7] 'bad z.m, should be 1', z.m; abort$[abs(t.m-2) > 1e-7] 'bad t.m, should be 2', t.m; abort$[abs(obj.m) > 1e-7] 'bad obj.m, should be 0', obj.m; abort$[abs(defobj.m-1) > 1e-7] 'bad defobj.m, should be 1', defobj.m; solve simp using emp max obj; abort$[abs(z.l-1) > 1e-7] 'bad z.l, should be 1', z.l; abort$[abs(t.l-2) > 1e-7] 'bad t.l, should be 2', t.l; abort$[abs(obj.l-5) > 1e-7] 'bad obj.l, should be 5', obj.l; abort$[abs(z.m-1) > 1e-7] 'bad z.m, should be 1', z.m; abort$[abs(t.m-2) > 1e-7] 'bad t.m, should be 2', t.m; abort$[abs(obj.m) > 1e-7] 'bad obj.m, should be 0', obj.m; abort$[abs(defobj.m-1) > 1e-7] 'bad defobj.m, should be 1', defobj.m; execute 'rm mcpTmpScalar*.* dict.txt empinfo.txt jams.opt';