Langford's Problem - Amsterdam Optimization Modeling Group
Langford's Problem - Amsterdam Optimization Modeling Group
Langford's Problem - Amsterdam Optimization Modeling Group
You also want an ePaper? Increase the reach of your titles
YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.
6 ERWIN KALVELAGEN<br />
parameter solution(n,m) /<br />
n3.m1 1<br />
n4.m1 2<br />
n7.m1 3<br />
n9.m1 4<br />
n3.m2 5<br />
n6.m1 6<br />
n4.m2 7<br />
n8.m1 8<br />
n3.m3 9<br />
n5.m1 10<br />
n7.m2 11<br />
n4.m3 12<br />
n6.m2 13<br />
n9.m2 14<br />
n2.m1 15<br />
n5.m2 16<br />
n8.m2 17<br />
n2.m2 18<br />
n7.m3 19<br />
n6.m3 20<br />
n2.m3 21<br />
n5.m3 22<br />
n1.m1 23<br />
n9.m3 24<br />
n1.m2 25<br />
n8.m3 26<br />
n1.m3 27<br />
/;<br />
x.fx(n,m) = solution(n,m);<br />
$offtext<br />
x.prior(n,m) = 2*card(n) - 2*ord(n);<br />
delta.prior(n,m,nn,mm) = 2*card(n)-ord(n)-ord(nn);<br />
*<br />
* write Cplex option file<br />
*<br />
file opt /cplex.opt/;<br />
putclose opt ’mipemphasis 1’/;<br />
model langford /all/;<br />
*<br />
* turn on option file reading and usage of priorities<br />
*<br />
langford.prioropt=1;<br />
langford.optfile=1;<br />
*<br />
* select Cplex as MIP solver<br />
*<br />
*option mip=cplex;<br />
option iterlim=1000000;<br />
solve langford minimizing dummy using mip;<br />
display x.l;<br />
The results with Cplex 7.5 are displayed in table 1. In this case the model with<br />
more variables and equations performs better than the smaller model. This is not<br />
unusual in integer programming: it is difficult to predict performance based on the<br />
size of the model.<br />
In [2] a constraint programming approach to solve this problem is discussed.