0

你能帮我找出关于 CPLEX 中求和约束的错误吗?

ctbackorderBalanceThrowPeriodsa:
    forall (i in part, h in period) {
        if (h == 1) {
            demand[i, h] == production[i, h] + iniinventory[i] - inibackorder[i] - inventory[i, h] + backorder[i, h];   
        } else {
            demand[i, h] == production[i, h] + inventory[i, h - 1]  - backorder[i, h - 1] - inventory[i, h] + backorder[i, h];
        }   
    }

ctDailyWorkHr:
    forall (h in period) {
        sum(i in part) (production[i, h] * prodStd[i]) <= sum(w in worker) workHr[w, h];
    }

ctworkHrperPeriod:
    forall (w in worker,i in part, h in period) {
        workHr[w, h] >= 10.50 + 100000000 * (1 - x[w, i, h]);
        workHr[w, h] <= 10.50 - 100000000 * (1 - x[w, i, h]);
    }

ctWorkOneShiftPerDay:
    forall(w in worker, i in part, h in period) {
        sum (i in part) x[w, i, h] <= 1;
    }

我在最后一个约束中的x(二进制变量)有问题。sum

4

0 回答 0