optimization - CPlex coding logic -


the professor in charge of industrial engineering design course faced problem of assigning 28 students 8 projects. each student must assigned 1 project , each project group must have 3 or 4 students. students have been asked rank projects, 1 being best ranking , higher numbers representing lower rankings.

a) formulate opl model problem.

b) solve assignment problem following table of assignments:

      ed  ez  g   h1  h2  rb  sc allen   1   3   4   7   7   5   2   6 black   6   4   2   5   5   7   1   3 chung   6   2   3   1   1   7   5   4 clark   7   6   1   2   2   3   5   4 conners 7   6   1   3   3   4   5   2 cumming 6   7   4   2   2   3   5   1 demming 2   5   4   6   6   1   3   7 eng     4   7   2   1   1   6   3   5 farmer  7   6   5   2   2   1   3   4 forest  6   7   2   5   5   1   3   4 goodman 7   6   2   4   4   5   1   3 harris  4   7   5   3   3   1   2   6 holmes  6   7   4   2   2   3   5   1 johnson 2   2   4   6   6   5   3   1 knorr   7   4   1   2   2   5   6   3 manheim 4   7   2   1   1   3   6   5 morris  7   5   4   6   6   3   1   2 nathan  4   7   5   6   6   3   1   2 neuman  7   5   4   6   6   3   1   2 patrick 1   7   5   4   4   2   3   6 rollins 6   2   3   1   1   7   5   4 schuman 4   7   3   5   5   1   2   6 silver  4   7   3   1   1   2   5   6 stein   6   4   2   5   5   7   1   3 stock   5   2   1   6   6   7   4   3 truman  6   3   2   7   7   5   1   4 wolman  6   7   4   2   2   3   5   1 young   1   3   4   7   7   6   2   5 

how many students assigned second or third choice?

c) of projects harder others reach without car. thus, desirable @ least number of students assigned each project must have car; numbers vary project follows:

a   ed  ez  g   h1  h2  rb  sc 1   0   0   2   2   2   1   1 

the students have cars chung, demming, eng, holmes, manheim, morris, nathan, patrick, rollins , young.

modify model add car constraint , solve problem again. how many more students before must assigned second or third choices?

i coded file a) & b) getting stuck @ c). can pls logic? ampl wil suffice

let c_i indicator matrix (input): c_i = 1 if student i has car , 0 otherwise. i'll assume have following decision variables:

x_ij = 1 if student assigned project j; 0 otherwise 

then c) constraint can me modeled follows

sum_i c_i * x_ij >= b_j    j 

where b_j

 j     ed  ez  g   h1  h2  rb  sc  b_j 1   0   0   2   2   2   1   1 

Comments

Popular posts from this blog

javascript - jQuery: Add class depending on URL in the best way -

caching - How to check if a url path exists in the service worker cache -

Redirect to a HTTPS version using .htaccess -