-
Notifications
You must be signed in to change notification settings - Fork 0
/
run-lp-bb.sh
executable file
·40 lines (27 loc) · 1.96 KB
/
run-lp-bb.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
for filename in `ls in/*.G | sort -V` ; do
name=${filename##*/}
modifiedName=${name//.G/}
if [ "$modifiedName" != "fractionalGraph" ]
then
#LPFilePath="in/strengthedModelAfterRootRelaxation.lp"
initMembershipFilePath="in/bestSolution_""$modifiedName"".txt"
# ===============================================================================
# Vertex pair formulation F_v(G)
# ===============================================================================
outFolderName="out/""$modifiedName""-vertex"
mkdir -p $outFolderName
LPFilePath="in/strengthedModel_vertex.lp"
# with redundant triangle inequalities
#ant -DinFile="in/""$name" -DoutDir="$outFolderName" -DformulationType="vertex" -DenumAll=false -Dcp=false -DinitMembershipFilePath="$initMembershipFilePath" -DLPFilePath="$LPFilePath" -DnbThread=4 -Dverbose=true -Dtilim=60 run
# with redundant triangle inequalities
ant -DinFile="in/""$name" -DoutDir="$outFolderName" -DformulationType="vertex" -DenumAll=false -Dcp=false -DinitMembershipFilePath="$initMembershipFilePath" -DLPFilePath="$LPFilePath" -DnbThread=4 -Dverbose=true -Dtilim=60 run
# ===============================================================================
# Edge formulation F_e(G)
# ===============================================================================
# ===============================================================================
outFolderName="out/""$modifiedName""-edge"
mkdir -p $outFolderName
LPFilePath="in/strengthedModel_edge.lp"
ant -DinFile="in/""$name" -DoutDir="$outFolderName" -DformulationType="edge" -DenumAll=false -Dcp=false -DlazyCB=true -DuserCutCB=false -DinitMembershipFilePath="$initMembershipFilePath" -DLPFilePath="$LPFilePath" -DnbThread=4 -Dverbose=true -Dtilim=60 run
fi
done