Decision Optimization

Decision Optimization

Delivers prescriptive analytics capabilities and decision intelligence to improve decision-making.


#Analytics
#DecisionOptimization
#DecisionOptimization
 View Only
  • 1.  FJSP Benchmark Instances

    Posted 06/24/19 11:42 AM

    Originally posted by: AndyHam


    Dear IBM,

    The FJSP-transbot models outperformed all other approaches in literature. However, researchers solved only small sized instances.

    Now, I would like to try medium-large sized instances. I found the well-known instances, but it is not trivial to reformat the instances into OPL format.

    http://people.idsia.ch/~monaldo/fjspresults/TextData.zip


    Can you please post the benchmark instances in OPL format which were used for the following "constraint_programming benchmark"?
    I will add robot travel times into the instances and run FJSP-transbot models.
    https://www.ibm.com/developerworks/community/blogs/jfp/entry/solving_flexible_job_shop_scheduling_problems?lang=en
    Thanks,
    Andy

     


    #DecisionOptimization
    #OPLusingCPOptimizer


  • 2.  Re: FJSP Benchmark Instances

    Posted 06/24/19 11:59 AM

    Originally posted by: PhilippeLaborie


    As you can see in the post, we did not use OPL for benchmarking but C++: "The model we use for FJSSP is given below in OPL.  We actually used the C++version in our experiment but performance is quite similar whatever API is used (C++, Java, .NET or OPL)."

    So we do not have the data for instances in OPL format, we directly read the original data in C++. If you are interested I can send you some C++ code we used for reading these data files.

     


    #DecisionOptimization
    #OPLusingCPOptimizer


  • 3.  Re: FJSP Benchmark Instances

    Posted 06/24/19 12:02 PM

    Originally posted by: AndyHam


    C++ code for data-read will be very appreciated. Thanks!


    #DecisionOptimization
    #OPLusingCPOptimizer


  • 4.  Re: FJSP Benchmark Instances

    Posted 06/24/19 12:10 PM

    Originally posted by: PhilippeLaborie


    In fact, you can look in the installation directory of CP Optimizer. You will find the c++ example for FJSP in cpoptimizer/examples/src/cpp/sched_jobshopflex.cpp: this files reads the classical instance format (note that they maybe a few discrepancies). And if you prefer java, you can look cpoptimizer/examples/src/java/SchedJobShopFlex.java.


    #DecisionOptimization
    #OPLusingCPOptimizer


  • 5.  Re: FJSP Benchmark Instances

    Posted 06/25/19 07:07 AM

    Originally posted by: AndyHam


    Thanks!
    I have successfully modified the sched_jobshopflex.cpp to change the format into OPL.

    tuple t_mode {
      int o;   //oper id
      int j;   //job id
      int mch; //machine id
      int pt;    //processing time
      int isFirst; //1 if it is the first operation of job j
    };
     

    // reading a text file
    #include <iostream>
    #include <fstream>
    #include <string>
    using namespace std;

    int main() {

        for (int r = 1; r <= 40; r++) {
            string line, s, t;
            s = to_string(r) + ".fjs";
            t = to_string(r) + ".dat";
            if (r <= 9) {
                s = "0" + to_string(r) + ".fjs";
                t = "0" + to_string(r) + ".dat";
            }
            s = "C:/Codes/OPL/IntegratingMTS2Production/instances_FJSP/Hurink_Data/Text/sdata/la" + s;
            t = "C:/Codes/OPL/IntegratingMTS2Production/instances_FJSP/Hurink_Data/Text/sdata/la" + t;
            ifstream file(s);
            ofstream oFile;
            oFile.open(t);

            int nbJobs, nbMachines;
            float nTemp;
            file >> nbJobs;
            file >> nbMachines;
            file >> nTemp;

            int o; o = 1;
            bool f;
            oFile << "nj =" << nbJobs << ";" << '\n';
            oFile << "nm =" << nbMachines << ";" <<  '\n';

            oFile << "Modes ={" << '\n';

            for (int i = 1; i <= nbJobs; i++) {
                f = 1;
                int nbOperations;
                file >> nbOperations;
                for (int j = 0; j < nbOperations; j++) {
                    int nbOpMachines, k;
                    file >> nbOpMachines;
                    for (k = 0; k < nbOpMachines; k++) {
                        int m, d;
                        file >> m;
                        file >> d;
                        oFile << "<" << o << "\t"  << i  << "\t" << m << "\t" << d << "\t" << f << ">" << '\n';
                    }
                    o++;
                    f = 0;

                }

            
        oFile << "};";
        }

        return 0;
    }


    #DecisionOptimization
    #OPLusingCPOptimizer