Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/github/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Scheduling 如何按顺序写入调度的顺序约束_Scheduling_Cplex_Opl_Mixed Integer Programming - Fatal编程技术网

Scheduling 如何按顺序写入调度的顺序约束

Scheduling 如何按顺序写入调度的顺序约束,scheduling,cplex,opl,mixed-integer-programming,Scheduling,Cplex,Opl,Mixed Integer Programming,现在,我尝试添加EQ7:一个新的约束,使每个start\u-pour[k][j]都不同于其他start\u-pour[k][j]的约束,它等于site\u-process\u-time[c]到一个可运行的模型中。它显示了一个宽松的解决方案,即没有可行的解决方案。如何编写此约束?多谢各位 EQ7 : forall(c in customer) sum(k in truck, j in job) (start_pour[k][j] + site_process_time[c]

现在,我尝试添加
EQ7:
一个新的约束,使每个
start\u-pour[k][j]
都不同于其他
start\u-pour[k][j]
的约束,它等于
site\u-process\u-time[c]
到一个可运行的模型中。它显示了一个宽松的解决方案,即没有可行的解决方案。如何编写此约束?多谢各位

 EQ7 :
 forall(c in customer)
   sum(k in truck, j in job)
      (start_pour[k][j] + site_process_time[c] + (M*(1-x[c][k][j]))) <= 
   sum(k in truck, j in job)
      (start_pour[k][j] + (M*(1-x[c][k][j])));

要使sur模型发挥作用,您至少需要进行更改

EQ5 : //Job-Time Sequencing;
 forall(c in customer, k in truck, j in job)
   start_load[k][j] + plant_process_time[c] + travel[c] <= start_pour[k][j] + (M*(1-x[c][k][j-1]));
甚至

    EQ7 :
 forall(c in customer)
   forall(ordered k,k2 in truck, ordered  j,j2 in job)

     ((1==x[c][k][j] ) && (1==x[c][k2][j2]))=> (abs(start_pour[k][j] -start_pour[k2][j2]) >=plant_process_time[c]);
如果您想将处理时间考虑在内


我建议你看看CPLEX内部,因为这对调度非常好。

1)从新的EQ7中,我如何使
start\u-pour[k][j]
start\u-pour[k2][j2]
不同于
plant\u-process\u-time[c]
关于
plant\u-process\u-time[c]
它不能仅仅将
+plant\u-process\u-time[c]添加到约束中。2) 在那里我可以找到更多关于CPLEX或CPO调度的教程。谢谢。我更新了模型。有关日程安排的更多信息,请参阅
EQ5 : //Job-Time Sequencing;
 forall(c in customer, k in truck, j in job)
   start_load[k][j] + plant_process_time[c] + travel[c] <= start_pour[k][j] + (M*(1-x[c][k][j-1]));
EQ5 : //Job-Time Sequencing;
 forall(c in customer, k in truck, j in job:(j-1) in job)
   start_load[k][j] + plant_process_time[c] + travel[c] <= start_pour[k][j] + (M*(1-x[c][k][j-1]));
EQ5 : //Job-Time Sequencing;
 forall(c in customer, k in truck, j in job:(j-1) in job)
(1==x[c][k][j-1] ) => (start_load[k][j] + plant_process_time[c] + travel[c] <= start_pour[k][j]);
EQ7 :
 forall(c in customer)
   forall(ordered k,k2 in truck, ordered  j,j2 in job)

      start_pour[k][j] != start_pour[k2][j2];
    EQ7 :
 forall(c in customer)
   forall(ordered k,k2 in truck, ordered  j,j2 in job)

     ((1==x[c][k][j] ) && (1==x[c][k2][j2]))=> (abs(start_pour[k][j] -start_pour[k2][j2]) >=plant_process_time[c]);