流水作業スケジューリング-ダイナミックプランニング
1043 ワード
#include
#include
#define N 100
using namespace std;
/*---------- */
class Jobtype{
public:
int operator <= (Jobtype a) const{
return (key <= a.key);
};
int key , index;
bool job;
};
Jobtype d[N];
/*---------- */
int cmp(Jobtype a , Jobtype b)
{
return a.key < b.key;
}
/*--------------johnson */
int FlowShop(int n , int a[] , int b[] , int c[])
{
for(int i = 0 ; i < n ; i++){
d[i].key = a[i] > b[i] ? b[i] : a[i];// Johnson b[i] a[i]
d[i].job = a[i] <= b[i];// a[i]>n;
int a[n] , b[n] , c[n];
cout<>a[i]>>b[i];
int mintime = FlowShop(n , a , b , c);
cout<