Let's see the signature for some global constraints in or-tools:
X
refers always to a list of variables (or expressions)
ALLDIFFERENT(X)⟷
slv.AllDifferent(X)
ALLDIFFERENTEXCEPT(X)⟷
slv.AllDifferentExcept(X, v)
v
is the escape valueDISTRIBUTE(X,V,C)⟷
slv.Distribute(X, V, C)
V
is the list of the values to constrain/countC
is a list with the cardinality variables for the values in V
COUNT(X,V,C)⟷
slv.Count(X, v, c)
v
is the value to count, c
is either a cardinality variable or a valueATMOST(X)⟷
slv.AtMost(X, v, u)
v
is the value to limit, u
the maximum number of occurrencesLet's see the signature for some global constraints in or-tools:
X
refers always to a list of variables (or expressions)
MIN(z,X)⟷
slv.Min(X)
z
is implicit (slv.Min
returns an expression object)MAX(z,X)⟷
slv.Max(X)
z
is implicit (same as above)SUM(z,X)⟷
slv.Sum(X)
z
is implicit (same as above)ELEMENT(z,V,x)⟷
var.IndexOf(V)
var
corresponds to x
(i.e. the index)V
is the list to be indexedz
is implicit (same as above)A data center hosts servers running a number of Virtual Machines
A data center hosts servers running a number of Virtual Machines
About the servers:
ns
nc
About the Virtual Machines:
i
can run on a single serverci
A data center hosts servers running a number of Virtual Machines
Goal:
It is possible to solve all instances in less than 30 seconds
The provided model is given by:
min
n_{vm}
is the number of VMs, x_i = j
iff VM i
is assigned to server j
u_j
is a variable/expression representing the core usage on server j
s_i
is the service for VM i
, r_i
the required number of cores