(*Illustrative example of Networked Model in Optimisation*)
Remove["Global`*"]
model={m==x+y,n==3x^2-y^2};
eqns={Sin[m] Sin[2n],m^2+n^2≤3,-m≤0,-n≤0};
varsidentify[eqns_]:=Select[Union[Cases[eqns,x_Symbol,Infinity]],!NumericQ[#]&&!MatchQ[#,True||False]&];
vars=Complement[varsidentify[model],varsidentify[eqns]];
lenvars=Length[vars];
orig=FindMinimum[eqns/.(model/.{Equal->Rule}),vars]//Timing
modelext[vars1_]:=modelext[vars1]=Module[{subst=Thread[vars->vars1]},Join[subst,Flatten[NSolve[model/.subst,{m,n}]]]];
eqnsext=eqns/.{LessEqual->Subtract};
leneqns=Length[eqnsext];
varsopt=Table[ToExpression[ToString[vars[[i]]]<>"op"],{i,lenvars}];
varsoptvals=Thread[{varsopt,Table[1,{i,lenvars}]}];
Scan[(γf[#][vars1_]:=Module[{},eqnsext[[#]]/.modelext[vars1]]/;VectorQ[vars1,NumberQ])&,Range[leneqns]];
f0=Table[If[i==1,γf[i][varsopt],γf[i][varsopt]≤0],{i,1,leneqns}];
temp="";
result=Block[{j=0},FindMinimum[f0,varsoptvals,
StepMonitor:>(j++;(*Print[DownValues[modelext]];*)NotebookDelete[temp];temp=PrintTemporary[j];DownValues[modelext]=Last[DownValues[modelext]])
]]//Timing;
result[[2,2]]=Thread[vars->(varsopt/.result[[2,2]])];
Print[result];
Print["{ΔSecs, ΔResult, Δx, Δy} = ",
{result[[1]]-orig[[1]],result[[2,1]]-orig[[2,1]],(x/.result[[2,2]])-(x/.orig[[2,2]]),(y/.result[[2,2]])-(y/.orig[[2,2]])}]