enter image description here How do i write this constraints in CPLEX (linear-program)? ∑ j∈M until ∑ k=i xaijk ∗ bkj = dai, ∀i ∈ N, ∀a ∈ B ∩ A1; until = min(i + va, n)
In OPL you can write
int n=10;
range N=1..n;
{int} A={1,3,5};
int v[A]=[0,1,2];
range M=1..4;
int b[N][M]=[[1,1]];
int d[A][N]=[[1,2]];
dvar boolean x[A][N][M][N];
subject to
{
forall(i in N,a in A) sum(j in M,k in N:k <=minl(n,i+v[a])) x[a,i,j,k]*b[k,j]==d[a,i];
}
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.