I am trying to solve an integer nonlinear problem like this: There are five providers (p1, p2, .. p5), at three locations (g, s, t), seeing patients with 2 different types of visits: office visits and video visits. For the next 10 business days, at each location, the demand for these two types of visits are: location g location s location t Office Visit 80 70 90 Video Visit 25 31 27 For each provider, they can have as many as 7 office visits, and 3 video visits per day. For each provider, they can work no more than 6 days within the next 10 business days. I am trying to see how to allocate these providers in these locations, to meet the demand most. Here are my codes, and I have 15 variables, represent the number of days for each provider to stay in one location for the next 10 days. For example, p1g means the number of days that provider p1 at location g. proc optmodel; var p1g<=6 >=0 , p2g<=6>=0, p3g<=6>=0, p4g<=6>=0, p5g<=6>=0 integer; var p1s<=6>=0, p2s<=6>=0, p3s<=6>=0 ,p4s<=6>=0, p5s<=6>=0 integer; var p1t<=6>=0, p2t<=6>=0, p3t<=6>=0, p4t<=6>=0, p5t<=6>=0 integer; /* declare objective */ impvar OfficeVisit=min(7*(p1g+p2g+p3g+p4g+p5g),80) +min(7*(p1s+p2s+p3s+p4s+p5s),70) +min(7*(p1t+p2t+p3t+p4t+p5t),90); impvar VideoVisit=min(3*(p1g+p2g+p3g+p4g+p5g),25) +min(3*(p1s+p2s+p3s+p4s+p5s),31) +min(3*(p1t+p2t+p3t+p4t+p5t),27); /*declare constraints*/ con p1g +p1s +p1t<=6; con p2g +p2s +p2t<=6; con p3g +p3s +p3t<=6; con p4g +p4s +p4t<=6; con p5g +p5s +p5t<=6; max bts = OfficeVisit + VideoVisit; solve ; print p1g p2g p3g p4g p5g p1s p2s p3s p4s p5s p1t p2t p3t p4t p5t; quit;
... View more