Originally posted by: Betis
Thanks for reply Chris,
Actually, I can't see either any syntax error, here is my all model script:
Thanks for the reply Chris,
Actually I don't see any error, but IBM ILOG CPLEX Optimization Studio is blocking processing. Here is all the model script:
using CP;
// ~~~~~~~~ Model inputs ~~~~~~~
int N = ...; // number of nodes
range nodes = 1..N; // range of nodes number
float lambda_i [nodes] = ...; // All generated traffic in node i
int lij [nodes][nodes] = ...; // linking Matrix
{string} Technologies = { "link 1", "link 2" }; // linking technologies
float b1 = ...; // link capacity for technology 1
float b2 = ...; // link capacity for technology 2
float c1 = ...; // link cost per length unit for technology 1
float c2 = ...; // link cost per length unit for technology 2
float dij[nodes][nodes] = ...; // Double sized array of distances between nodes
// ~~~~~~~~ Model decision variables ~~~~~~~
dvar int aggij [nodes][nodes];
dvar int T1ij [nodes][nodes];
dvar int T2ij [nodes][nodes];
// ~~~~~~~~ Model ~~~~~~~
dexpr float Cost = sum (i in nodes) (sum (j in nodes) (((T1ij[i][j]*c1*dij[i][j]) + (T2ij[i][j]*c2*dij[i][j]))));
minimize
Cost;
subject to {
forall (i in nodes)
forall (j in nodes)
lambda_i[i] <= T1ij[i][j]*b1 + T2ij[i][j]*b2;
forall (i in nodes)
forall (j in nodes)
lij[i][j] >= aggij[i][j];
forall (i in nodes)
forall (j in nodes)
T1ij[i][j] != T2ij[i][j];
/*forall (i in nodes , j in nodes)
aggij[i][j] = T1ij[i][j] + T2ij[i][j]; */
}
Regards,
Betis
#ConstraintProgramming-General#DecisionOptimization