Weighted Bipartite Matching

W={{5,1,2,2},{1,0,5,3},{2,1,2,1},{1,1,2,3}};W//MatrixForm

Flatten[Array[x,{4,4}]]

f0=Sum[Sum[x[i,j]W[[i,j]],{i,1,4}],{j,1,4}]

nonnegx=Flatten[Table[x[i,j]≥0,{i,1,4},{j,1,4}]]

oneagentpertask=Table[Sum[x[i,j],{i,1,4}]==1,{j,1,4}]

onetaskperagent=Table[Sum[x[i,j],{j,1,4}]==1,{i,1,4}]

Minimize[{f0,nonnegx,oneagentpertask,onetaskperagent},Flatten[Array[x,{4,4}]]]