Assignment2_solution - file/C|/Documents and Settings/mol23/Desktop/ORIE 3300_5300/assignments/ass2/ass2-sols/ass2-1 param N:=4 var xcfw i in 1.N j

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
file:///C|/Documents%20and%20Settings/mol23/Desktop/ORIE%203300_5300/assignments/ass2/ass2-sols/ass2-1.txt param N:=4; var x{ i in 1. .N, j in 1. .N, t in 1. .N} binary; #x[i,j,t]=1 if entry in row i column j is assigned to be value var v {i in 1. .N, j in 1. .N} integer; maximize total_number_assigned: sum {i in 1. .N, j in 1. .N, t in 1. .N} x[i,j,t]; subject to cell111: x[1,1,1]=1; subject to cell232: x[2,3,2]=1; subject to cell314: x[3,1,4]=1; subject to cell443: x[4,4,3]=1; subject to Values {i in 1. .N, j in 1. .N}: v[i,j] = sum {t in 1. .N} t*x[i,j,t]; subject to AssignCell {i in 1. .N, j in 1. .N}: sum {t in 1. .N} x[i,j,t]<=1; #each cell can be assigned at most one value subject to AssignRow {i in 1. .N, t in 1. .N}: sum {j in 1. .N} x[i,j,t]<=1; #each row's cells can have at most one of each value subject to AssignColumn {j in 1. .N, t in 1. .N}: sum {i in 1. .N} x[i,j,t]<=1; #each column's cells can have at most one of each value subject to AssignBox {a in {1,3}, b in {1,3}, t in 1. .N}: sum {i in {a,a+1}, j in {b,b+1}} x[i,j,t]<=1;
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 09/29/2011 for the course ORIE 5300 taught by Professor Todd during the Fall '08 term at Cornell University (Engineering School).

Page1 / 3

Assignment2_solution - file/C|/Documents and Settings/mol23/Desktop/ORIE 3300_5300/assignments/ass2/ass2-sols/ass2-1 param N:=4 var xcfw i in 1.N j

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online