Commit 21bab8d7 authored by Jonathan Shahen's avatar Jonathan Shahen
Browse files

-1 migration added for ILP; SUM Information Leakage added for ILP; Global...

-1 migration added for ILP; SUM Information Leakage added for ILP; Global setting and user settings file parameter added to switch between SUM and MAX; add testing project for ILP
parent 1ae65db0
<?xml version="1.0" encoding="ASCII"?><project>
<version>1.0</version>
<configs>
<config category="opl" default="false" name="ilp_sum">
<ref name="ilp_sum.mod" type="model">
</ref>
<ref name="ilpData.dat" type="data">
</ref>
</config>
<config category="opl" default="false" name="ilpNoMigration">
<ref name="ilpNoMigration.mod" type="model">
</ref>
<ref name="ilpDataNoMig.dat" type="data">
</ref>
</config>
<config category="opl" default="true" name="ilpNoMigration_sum">
<ref name="ilpNoMigration_sum.mod" type="model">
</ref>
<ref name="ilpDataNoMig.dat" type="data">
</ref>
</config>
<config category="opl" default="false" name="ilp_max">
<ref name="ilp.mod" type="model">
</ref>
<ref name="ilpData.dat" type="data">
</ref>
</config>
</configs>
</project>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>TestData</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
</buildSpec>
<natures>
<nature>ilog.odms.ide.core.opl.project.nature</nature>
</natures>
</projectDescription>
/*********************************************
* OPL 12.6.1.0 Model
* Author: jonathan
* Creation Date: May 17, 2016 at 12:26:31 PM
*********************************************/
int numMachines=...;
range Machines=1..numMachines;
int numClients=...;
range Clients=1..numClients;
//int numVMs=...;
int migrationBudget=...;
int vmsPerClient[Clients]=...;
int machineCapacity[Machines]=...;
// Sum of previous Information Leakage ClinetToClient
int L[Clients,Clients]=...;
// Sum of Client VMs per Machine
int p0[Machines,Clients]=...;
int r=...;
int t=ftoi(ceil(lg(r)));
int dMaxVal=ftoi(pow(2,2*t-1)-1);
range tRange=0..t;
range zRange=0..t-1;
// NEW Placement of the Sum of Client VMs per Machine
dvar int p1[Machines,Clients] in 0..r;
// Variables to fix the quadratic variable from old reduction
dvar int p[Machines,Clients,tRange] in 0..1;
dvar int e[Clients,Clients,Machines,tRange,tRange] in 0..1;
dvar int d[Clients,Clients,Machines,zRange] in 0..dMaxVal;
minimize
max(c0, c1 in Clients: c0 != c1) (L[c0,c1] + sum(k in Machines, z in zRange) (d[c0,c1,k,z]) );
subject to {
// p1 represented as a value from p's bit form
forall(i in Clients, k in Machines)
p1[k,i] == sum(l in tRange) (pow(2,l) * p[k,i,l]);
// Bitwise AND for all pairs in p1
forall(k in Machines, c0 in Clients, c1 in Clients, u in tRange, v in tRange)
0 <= p[k,c0,u] + p[k,c1,v] - (2 * e[c0,c1,k,u,v]) <= 1;
// Setting up values for d
forall(k in Machines, c0 in Clients, c1 in Clients, z in zRange)
d[c0,c1,k,z] == sum(l in zRange) (pow(2,z+l) *e[c0,c1,k,l,z]);
// Capacity of servers respected
forall(k in Machines)
machineCapacity[k] >= sum(i in Clients) (p1[k,i]);
// Sum of clients in p1 should equal the number of vms of that client
forall(i in Clients)
vmsPerClient[i] == sum(k in Machines) (p1[k,i]);
// Migration budget
2 * migrationBudget >= sum(i in Clients, k in Machines) ( abs(p1[k,i] - p0[k,i]) );
};
\ No newline at end of file
/* Created by Vagabond.reduction.ilp.WriteILPFile */
r=10;
numMachines=10;
numClients=5;
migrationBudget=3;
vmsPerClient=[10,10,10,10,10];
machineCapacity=[10,10,10,10,10,10,10,10,10,10];
// Client ID 1 x Client ID 2 ==> Information Leakage from Client ID 1 to Client ID 2 over the past X epochs
L=[
[0,10,10,10,10]
[10,0,10,10,10]
[10,10,0,10,10]
[10,10,10,0,10]
[10,10,10,10,0]
];
// Machine ID x Client ID ==> Sum of VMs on Machine ID that belong to Client ID
p0=[
[1,1,1,1,1]
[1,1,1,1,1]
[1,1,1,1,1]
[1,1,1,1,1]
[1,1,1,1,1]
[1,1,1,1,1]
[1,1,1,1,1]
[1,1,1,1,1]
[1,1,1,1,1]
[1,1,1,1,1]
];
/* Created by Vagabond.reduction.ilp.WriteILPFile */
r=10;
numMachines=10;
numClients=5;
//migrationBudget=3;
vmsPerClient=[10,10,10,10,10];
machineCapacity=[10,10,10,10,10,10,10,10,10,10];
// Client ID 1 x Client ID 2 ==> Information Leakage from Client ID 1 to Client ID 2 over the past X epochs
L=[
[0,10,10,10,10]
[10,0,10,10,10]
[10,10,0,10,10]
[10,10,10,0,10]
[10,10,10,10,0]
];
// Machine ID x Client ID ==> Sum of VMs on Machine ID that belong to Client ID
p0=[
[1,1,1,1,1]
[1,1,1,1,1]
[1,1,1,1,1]
[1,1,1,1,1]
[1,1,1,1,1]
[1,1,1,1,1]
[1,1,1,1,1]
[1,1,1,1,1]
[1,1,1,1,1]
[1,1,1,1,1]
];
/*********************************************
* OPL 12.6.1.0 Model
* Author: jonathan
* Creation Date: May 17, 2016 at 12:26:31 PM
*********************************************/
int numMachines=...;
range Machines=1..numMachines;
int numClients=...;
range Clients=1..numClients;
//int numVMs=...;
//int migrationBudget=...;
int vmsPerClient[Clients]=...;
int machineCapacity[Machines]=...;
// Sum of previous Information Leakage ClinetToClient
int L[Clients,Clients]=...;
// Sum of Client VMs per Machine
int p0[Machines,Clients]=...;
int r=...;
int t=ftoi(ceil(lg(r)));
int dMaxVal=ftoi(pow(2,2*t-1)-1);
range tRange=0..t;
range zRange=0..t-1;
// NEW Placement of the Sum of Client VMs per Machine
dvar int p1[Machines,Clients] in 0..r;
// Variables to fix the quadratic variable from old reduction
dvar int p[Machines,Clients,tRange] in 0..1;
dvar int e[Clients,Clients,Machines,tRange,tRange] in 0..1;
dvar int d[Clients,Clients,Machines,zRange] in 0..dMaxVal;
minimize
max(c0, c1 in Clients: c0 != c1) (L[c0,c1] + sum(k in Machines, z in zRange) (d[c0,c1,k,z]) );
subject to {
// p1 represented as a value from p's bit form
forall(i in Clients, k in Machines)
p1[k,i] == sum(l in tRange) (pow(2,l) * p[k,i,l]);
// Bitwise AND for all pairs in p1
forall(k in Machines, c0 in Clients, c1 in Clients, u in tRange, v in tRange)
0 <= p[k,c0,u] + p[k,c1,v] - (2 * e[c0,c1,k,u,v]) <= 1;
// Setting up values for d
forall(k in Machines, c0 in Clients, c1 in Clients, z in zRange)
d[c0,c1,k,z] == sum(l in zRange) (pow(2,z+l) *e[c0,c1,k,l,z]);
// Capacity of servers respected
forall(k in Machines)
machineCapacity[k] >= sum(i in Clients) (p1[k,i]);
// Sum of clients in p1 should equal the number of vms of that client
forall(i in Clients)
vmsPerClient[i] == sum(k in Machines) (p1[k,i]);
// Migration budget
//2 * migrationBudget >= sum(i in Clients, k in Machines) ( abs(p1[k,i] - p0[k,i]) );
};
\ No newline at end of file
/*********************************************
* OPL 12.6.1.0 Model
* Author: jonathan
* Creation Date: May 17, 2016 at 12:26:31 PM
*********************************************/
int numMachines=...;
range Machines=1..numMachines;
int numClients=...;
range Clients=1..numClients;
//int numVMs=...;
//int migrationBudget=...;
int vmsPerClient[Clients]=...;
int machineCapacity[Machines]=...;
// Sum of previous Information Leakage ClinetToClient
int L[Clients,Clients]=...;
// Sum of Client VMs per Machine
int p0[Machines,Clients]=...;
int r=...;
int t=ftoi(ceil(lg(r)));
int dMaxVal=ftoi(pow(2,2*t-1)-1);
range tRange=0..t;
range zRange=0..t-1;
// NEW Placement of the Sum of Client VMs per Machine
dvar int p1[Machines,Clients] in 0..r;
// Variables to fix the quadratic variable from old reduction
dvar int p[Machines,Clients,tRange] in 0..1;
dvar int e[Clients,Clients,Machines,tRange,tRange] in 0..1;
dvar int d[Clients,Clients,Machines,zRange] in 0..dMaxVal;
minimize
sum(c0, c1 in Clients: c0 != c1) (L[c0,c1] + sum(k in Machines, z in zRange) (d[c0,c1,k,z]) );
subject to {
// p1 represented as a value from p's bit form
forall(i in Clients, k in Machines)
p1[k,i] == sum(l in tRange) (pow(2,l) * p[k,i,l]);
// Bitwise AND for all pairs in p1
forall(k in Machines, c0 in Clients, c1 in Clients, u in tRange, v in tRange)
0 <= p[k,c0,u] + p[k,c1,v] - (2 * e[c0,c1,k,u,v]) <= 1;
// Setting up values for d
forall(k in Machines, c0 in Clients, c1 in Clients, z in zRange)
d[c0,c1,k,z] == sum(l in zRange) (pow(2,z+l) *e[c0,c1,k,l,z]);
// Capacity of servers respected
forall(k in Machines)
machineCapacity[k] >= sum(i in Clients) (p1[k,i]);
// Sum of clients in p1 should equal the number of vms of that client
forall(i in Clients)
vmsPerClient[i] == sum(k in Machines) (p1[k,i]);
// Migration budget
//2 * migrationBudget >= sum(i in Clients, k in Machines) ( abs(p1[k,i] - p0[k,i]) );
};
\ No newline at end of file
/*********************************************
* OPL 12.6.1.0 Model
* Author: jonathan
* Creation Date: May 17, 2016 at 12:26:31 PM
*********************************************/
int numMachines=...;
range Machines=1..numMachines;
int numClients=...;
range Clients=1..numClients;
//int numVMs=...;
int migrationBudget=...;
int vmsPerClient[Clients]=...;
int machineCapacity[Machines]=...;
// Sum of previous Information Leakage ClinetToClient
int L[Clients,Clients]=...;
// Sum of Client VMs per Machine
int p0[Machines,Clients]=...;
int r=...;
int t=ftoi(ceil(lg(r)));
int dMaxVal=ftoi(pow(2,2*t-1)-1);
range tRange=0..t;
range zRange=0..t-1;
// NEW Placement of the Sum of Client VMs per Machine
dvar int p1[Machines,Clients] in 0..r;
// Variables to fix the quadratic variable from old reduction
dvar int p[Machines,Clients,tRange] in 0..1;
dvar int e[Clients,Clients,Machines,tRange,tRange] in 0..1;
dvar int d[Clients,Clients,Machines,zRange] in 0..dMaxVal;
minimize
sum(c0, c1 in Clients: c0 != c1) (L[c0,c1] + sum(k in Machines, z in zRange) (d[c0,c1,k,z]) );
subject to {
// p1 represented as a value from p's bit form
forall(i in Clients, k in Machines)
p1[k,i] == sum(l in tRange) (pow(2,l) * p[k,i,l]);
// Bitwise AND for all pairs in p1
forall(k in Machines, c0 in Clients, c1 in Clients, u in tRange, v in tRange)
0 <= p[k,c0,u] + p[k,c1,v] - (2 * e[c0,c1,k,u,v]) <= 1;
// Setting up values for d
forall(k in Machines, c0 in Clients, c1 in Clients, z in zRange)
d[c0,c1,k,z] == sum(l in zRange) (pow(2,z+l) *e[c0,c1,k,l,z]);
// Capacity of servers respected
forall(k in Machines)
machineCapacity[k] >= sum(i in Clients) (p1[k,i]);
// Sum of clients in p1 should equal the number of vms of that client
forall(i in Clients)
vmsPerClient[i] == sum(k in Machines) (p1[k,i]);
// Migration budget
2 * migrationBudget >= sum(i in Clients, k in Machines) ( abs(p1[k,i] - p0[k,i]) );
};
\ No newline at end of file
/*********************************************
* OPL 12.6.1.0 Model
* Author: jonathan
* Creation Date: May 17, 2016 at 12:26:31 PM
*********************************************/
int numMachines=...;
range Machines=1..numMachines;
int numClients=...;
range Clients=1..numClients;
//int numVMs=...;
//int migrationBudget=...;
int vmsPerClient[Clients]=...;
int machineCapacity[Machines]=...;
// Sum of previous Information Leakage ClinetToClient
int L[Clients,Clients]=...;
// Sum of Client VMs per Machine
int p0[Machines,Clients]=...;
int r=...;
int t=ftoi(ceil(lg(r)));
int dMaxVal=ftoi(pow(2,2*t-1)-1);
range tRange=0..t;
range zRange=0..t-1;
// NEW Placement of the Sum of Client VMs per Machine
dvar int p1[Machines,Clients] in 0..r;
// Variables to fix the quadratic variable from old reduction
dvar int p[Machines,Clients,tRange] in 0..1;
dvar int e[Clients,Clients,Machines,tRange,tRange] in 0..1;
dvar int d[Clients,Clients,Machines,zRange] in 0..dMaxVal;
minimize
max(c0, c1 in Clients: c0 != c1) (L[c0,c1] + sum(k in Machines, z in zRange) (d[c0,c1,k,z]) );
subject to {
// p1 represented as a value from p's bit form
forall(i in Clients, k in Machines)
p1[k,i] == sum(l in tRange) (pow(2,l) * p[k,i,l]);
// Bitwise AND for all pairs in p1
forall(k in Machines, c0 in Clients, c1 in Clients, u in tRange, v in tRange)
0 <= p[k,c0,u] + p[k,c1,v] - (2 * e[c0,c1,k,u,v]) <= 1;
// Setting up values for d
forall(k in Machines, c0 in Clients, c1 in Clients, z in zRange)
d[c0,c1,k,z] == sum(l in zRange) (pow(2,z+l) *e[c0,c1,k,l,z]);
// Capacity of servers respected
forall(k in Machines)
machineCapacity[k] >= sum(i in Clients) (p1[k,i]);
// Sum of clients in p1 should equal the number of vms of that client
forall(i in Clients)
vmsPerClient[i] == sum(k in Machines) (p1[k,i]);
// Migration budget
//2 * migrationBudget >= sum(i in Clients, k in Machines) ( abs(p1[k,i] - p0[k,i]) );
};
\ No newline at end of file
/*********************************************
* OPL 12.6.1.0 Model
* Author: jonathan
* Creation Date: May 17, 2016 at 12:26:31 PM
*********************************************/
int numMachines=...;
range Machines=1..numMachines;
int numClients=...;
range Clients=1..numClients;
//int numVMs=...;
//int migrationBudget=...;
int vmsPerClient[Clients]=...;
int machineCapacity[Machines]=...;
// Sum of previous Information Leakage ClinetToClient
int L[Clients,Clients]=...;
// Sum of Client VMs per Machine
int p0[Machines,Clients]=...;
int r=...;
int t=ftoi(ceil(lg(r)));
int dMaxVal=ftoi(pow(2,2*t-1)-1);
range tRange=0..t;
range zRange=0..t-1;
// NEW Placement of the Sum of Client VMs per Machine
dvar int p1[Machines,Clients] in 0..r;
// Variables to fix the quadratic variable from old reduction
dvar int p[Machines,Clients,tRange] in 0..1;
dvar int e[Clients,Clients,Machines,tRange,tRange] in 0..1;
dvar int d[Clients,Clients,Machines,zRange] in 0..dMaxVal;
minimize
sum(c0, c1 in Clients: c0 != c1) (L[c0,c1] + sum(k in Machines, z in zRange) (d[c0,c1,k,z]) );
subject to {
// p1 represented as a value from p's bit form
forall(i in Clients, k in Machines)
p1[k,i] == sum(l in tRange) (pow(2,l) * p[k,i,l]);
// Bitwise AND for all pairs in p1
forall(k in Machines, c0 in Clients, c1 in Clients, u in tRange, v in tRange)
0 <= p[k,c0,u] + p[k,c1,v] - (2 * e[c0,c1,k,u,v]) <= 1;
// Setting up values for d
forall(k in Machines, c0 in Clients, c1 in Clients, z in zRange)
d[c0,c1,k,z] == sum(l in zRange) (pow(2,z+l) *e[c0,c1,k,l,z]);
// Capacity of servers respected
forall(k in Machines)
machineCapacity[k] >= sum(i in Clients) (p1[k,i]);
// Sum of clients in p1 should equal the number of vms of that client
forall(i in Clients)
vmsPerClient[i] == sum(k in Machines) (p1[k,i]);
// Migration budget
//2 * migrationBudget >= sum(i in Clients, k in Machines) ( abs(p1[k,i] - p0[k,i]) );
};
\ No newline at end of file
/*********************************************
* OPL 12.6.1.0 Model
* Author: jonathan
* Creation Date: May 17, 2016 at 12:26:31 PM
*********************************************/
int numMachines=...;
range Machines=1..numMachines;
int numClients=...;
range Clients=1..numClients;
//int numVMs=...;
int migrationBudget=...;
int vmsPerClient[Clients]=...;
int machineCapacity[Machines]=...;
// Sum of previous Information Leakage ClinetToClient
int L[Clients,Clients]=...;
// Sum of Client VMs per Machine
int p0[Machines,Clients]=...;
int r=...;
int t=ftoi(ceil(lg(r)));
int dMaxVal=ftoi(pow(2,2*t-1)-1);
range tRange=0..t;
range zRange=0..t-1;
// NEW Placement of the Sum of Client VMs per Machine
dvar int p1[Machines,Clients] in 0..r;
// Variables to fix the quadratic variable from old reduction
dvar int p[Machines,Clients,tRange] in 0..1;
dvar int e[Clients,Clients,Machines,tRange,tRange] in 0..1;
dvar int d[Clients,Clients,Machines,zRange] in 0..dMaxVal;
minimize
sum(c0, c1 in Clients: c0 != c1) (L[c0,c1] + sum(k in Machines, z in zRange) (d[c0,c1,k,z]) );
subject to {
// p1 represented as a value from p's bit form
forall(i in Clients, k in Machines)
p1[k,i] == sum(l in tRange) (pow(2,l) * p[k,i,l]);
// Bitwise AND for all pairs in p1
forall(k in Machines, c0 in Clients, c1 in Clients, u in tRange, v in tRange)
0 <= p[k,c0,u] + p[k,c1,v] - (2 * e[c0,c1,k,u,v]) <= 1;
// Setting up values for d
forall(k in Machines, c0 in Clients, c1 in Clients, z in zRange)
d[c0,c1,k,z] == sum(l in zRange) (pow(2,z+l) *e[c0,c1,k,l,z]);
// Capacity of servers respected
forall(k in Machines)
machineCapacity[k] >= sum(i in Clients) (p1[k,i]);
// Sum of clients in p1 should equal the number of vms of that client
forall(i in Clients)
vmsPerClient[i] == sum(k in Machines) (p1[k,i]);
// Migration budget
2 * migrationBudget >= sum(i in Clients, k in Machines) ( abs(p1[k,i] - p0[k,i]) );
};
\ No newline at end of file
...@@ -92,7 +92,6 @@ public class VagabondCUI { ...@@ -92,7 +92,6 @@ public class VagabondCUI {
public static void printCommonCommands() { public static void printCommonCommands() {
System.out.println("\n\n--- Common Commands ---"); System.out.println("\n\n--- Common Commands ---");
System.out.println("-loglevel verbose -settings tests/simpletest.properties !exit");
System.out.println("-loglevel verbose -settings tests/simpletestILP-Random.properties !exit"); System.out.println("-loglevel verbose -settings tests/simpletestILP-Random.properties !exit");
System.out.println("-loglevel verbose -settings tests/simpletestILP-NomadSubOptimal.properties !exit"); System.out.println("-loglevel verbose -settings tests/simpletestILP-NomadSubOptimal.properties !exit");
System.out.println("-loglevel verbose -settings tests/equalSpread_10.properties !exit"); System.out.println("-loglevel verbose -settings tests/equalSpread_10.properties !exit");
...@@ -100,8 +99,12 @@ public class VagabondCUI { ...@@ -100,8 +99,12 @@ public class VagabondCUI {
System.out.println("-loglevel verbose -settings tests/simpletestILP-NomadSubOptimal.properties !exit"); System.out.println("-loglevel verbose -settings tests/simpletestILP-NomadSubOptimal.properties !exit");
System.out.println("-noplacementmaps -loglevel verbose " System.out.println("-noplacementmaps -loglevel verbose "
+ "-settings tests/simpletestILP-NomadSubOptimal.properties !exit"); + "-settings tests/simpletestILP-NomadSubOptimal.properties !exit");
System.out.println("-loglevel verbose -settings tests/simpletestILPNoMigrationBudget.properties !exit");
System.out.println("-loglevel verbose -settings tests/simpletestILPLargeTestNoMig.properties !exit");
System.out.println(""); System.out.println("");
System.out.println("-loglevel verbose -settings tests/simpletestCNF.properties !exit"); System.out.println("-loglevel verbose -settings tests/simpletestCNF.properties !exit");
System.out.println("-loglevel verbose -settings tests/simpletestCNFNoMigrationBudget.properties !exit");
System.out.println("");
System.out.println("-loglevel verbose -settings tests/simpletestNomad.properties !exit"); System.out.println("-loglevel verbose -settings tests/simpletestNomad.properties !exit");
System.out.println("-loglevel verbose -settings tests/simpletestNomadNoMigrationBudget.properties !exit"); System.out.println("-loglevel verbose -settings tests/simpletestNomadNoMigrationBudget.properties !exit");
System.out.println(""); System.out.println("");
......
...@@ -467,6 +467,11 @@ public class VagabondInstance { ...@@ -467,6 +467,11 @@ public class VagabondInstance {
settings.fillInEmptySpots = ConvertBooleanWithException.convert(value); settings.fillInEmptySpots = ConvertBooleanWithException.convert(value);
} }
value = prop.getProperty(VagabondOptionString.MAXORSUM.toString(), null);
if (value != null) {
settings.minimizeMaxClientToClientInfoLeak = ConvertBooleanWithException.convert(value);
}
value = prop.getProperty(VagabondOptionString.RANDOMSEED.toString(), null); value = prop.getProperty(VagabondOptionString.RANDOMSEED.toString(), null);
if (value != null) { if (value != null) {
settings.randomSeed = Integer.valueOf(value); settings.randomSeed = Integer.valueOf(value);
......
...@@ -130,6 +130,12 @@ public enum VagabondOptionString { ...@@ -130,6 +130,12 @@ public enum VagabondOptionString {
* @vagabond.category Settings File Property * @vagabond.category Settings File Property
*/ */
MIGRATIONBUDGET("migrationBudget"), MIGRATIONBUDGET("migrationBudget"),
/**
* [Settings File Property] Determines if the ILP or CNF SAT reductions will take into account the Max
* Client-To-Client Information Leakage (true), or the Sum/Total Client-To-Client Information Leakage (false).
* @vagabond.category Settings File Property
*/
MAXORSUM("maxCCIL"),
/** /**
* [Settings File Property] This is an optional setting for controlling the random number generator * [Settings File Property] This is an optional setting for controlling the random number generator
* @vagabond.category Settings File Property * @vagabond.category Settings File Property
......
...@@ -42,9 +42,11 @@ public class ILPCustomDataSource extends IloCustomOplDataSource { ...@@ -42,9 +42,11 @@ public class ILPCustomDataSource extends IloCustomOplDataSource {
handler.endElement(); handler.endElement();
// Variable migrationBudget // Variable migrationBudget
handler.startElement("migrationBudget"); if (settings.migrationBudget != -1) {
handler.addIntItem(settings.migrationBudget); handler.startElement("migrationBudget");
handler.endElement(); handler.addIntItem(settings.migrationBudget);
handler.endElement();
}
// Variable Array vmsPerClient // Variable Array vmsPerClient
handler.startElement("vmsPerClient"); handler.startElement("vmsPerClient");
......
...@@ -73,7 +73,14 @@ public class ReduceToILP implements ReduceTo { ...@@ -73,7 +73,14 @@ public class ReduceToILP implements ReduceTo {
IloOplErrorHandler errHandler = oplF.createOplErrorHandler(null); IloOplErrorHandler errHandler = oplF.createOplErrorHandler(null);
/*TIMING*/timing.startTimer(tp + "ReduceToILP::reduce::readOPL"); /*TIMING*/timing.startTimer(tp + "ReduceToILP::reduce::readOPL");
IloOplModelSource modelSource = oplF.createOplModelSource(settings.dataFolder + "/ilp.mod"); IloOplModelSource modelSource;
if (settings.migrationBudget != -1) {
logger.info("Using the OPL Model: " + settings.getIlpOplFile().getAbsolutePath());
modelSource = oplF.createOplModelSource(settings.getIlpOplFile().getAbsolutePath());
} else {
logger.info("Using the OPL Model: " + settings.getIlpOplNoMigrationFile().getAbsolutePath());
modelSource = oplF.createOplModelSource(settings.getIlpOplNoMigrationFile().getAbsolutePath());
}
/*TIMING*/timing.stopTimer(tp + "ReduceToILP::reduce::readOPL");