Please, how to make the first two decision variables unrestricted in sign variables? proc iml; P=2 ; n=3 ; nruns=5; B= {1,1}; X1= { 2.148910293 -1.756195507 -0.562194351 ? ? }; x2={ 0.558425545 -0.0446071 -3.180084241 }; Xt1 = t(x1); xt2=t(x2); nx=xt1 || xt2; Do j=1 to nruns; E1= 1#normal(repeat(-1,n-1)); E2=3#NORMAL(REPEAT(-1,1)); E=E1//E2; nY=nx* B+E; ? ? ? start linprog( names, obj, maxormin, coef, rel, rhs, activity); bound=1.0e10; m=nrow(coef); n=ncol(coef); /* Convert to maximization */ if upcase(maxormin)='MIN' then o=-1; else o=1; /* Build logical variables */ rev=(rhs<0); adj=(-1*rev)+^ rev; ge =(( rel = '>=' ) & ^rev) | (( rel = '<=' ) & rev); eq=(rel='='); if max(ge)=1 then do; sr=I(m); logicals=-sr[,loc(ge)]||I(m); artobj=repeat(0,1,ncol(logicals)-m)|(eq+ge)`; end; else do; logicals=I(m); artobj=eq`; end; nl=ncol(logicals); nv=n+nl+2; ? /* Build coef matrix */ a=((o*obj)||repeat(0,1,nl)||{ -1 0 })// (repeat(0,1,n)||-artobj||{ 0 -1 })// ((adj#coef)||logicals||repeat(0,m,2)); /* rhs, lower bounds, and basis */ b={0,0}//(adj#rhs); L=repeat(0,1,nv-2)||-bound||-bound; basis=nv-(0:nv-1); /* Phase 1 - primal feasibility */ call lp(rc,x,y,a,b,nv,,l,basis); print ( { ' ', '**********Primal infeasible problem************', ' ', '*********Numerically unstable problem**********', '*********Singular basis encountered************', '*******Solution is numerically unstable********', '***Subroutine could not obtain enough memory***', '**********Number of iterations exceeded********' }[rc+1]); if x[nv] ^=0 then do; print '**********Primal infeasible problem************'; stop; end; if rc>0 then stop; /* phase 2 - dual feasibility */ u=repeat(.,1,nv-2)||{ . 0 }; L=repeat(0,1,nv-2)||-bound||0; call lp(rc,x,y,a,b,nv-1,u,l,basis); /* Report the solution */ print ( { '*************Solution is optimal***************', '*********Numerically unstable problem**********', '**************Unbounded problem****************', '*******Solution is numerically unstable********', '*********Singular basis encountered************', '*******Solution is numerically unstable********', '***Subroutine could not obtain enough memory***', '**********Number of iterations exceeded********' }[rc+1]); value=o*x [nv-1]; print ,'Objective Value ' value; activity= x [1:n] ; print ,'Decision Variables ' activity[r=names]; lhs=coef*x[1:n]; dual=y[3:m+2]; print ,'Constraints ' lhs rel rhs dual l, '***********************************************'; finish; names={'product 1' 'product 2' 'product 3' 'product 4' 'product5' 'product6' 'product7' 'product8'}; profit={ 0 0 1 1 1 1 1 1}; tech=nx||I(3) || -I(3) ; time=ny; rel={ '=', '=', '=' }; run linprog(names,profit,'min',tech,rel,time,products); end; run; quit;