• Operational Research Web Services
    • LIMOS 2012 : Webservices' Development
    • LOGO LIMOS

    •    Homepage   
    •    Svg2Png   
    •    Job shop   
    •    GPS for pedestrian   
    •    Job shop time lags   
    •    VRP   
    •    Community-based GPS    
    •    Bin packing    
    •    NFC android    
    •    Sudoku PPC    
  • Team   |   File Format   |   Web Service sources   |   Client Source   |   Create a simple client   |   Structures   |   API References

    • Web services for the job shop with time lags problem
    • Limitations:
      The maximum number of clients executing a GRASP at the same time is 10.
      The maximun number of GRASP a client can execute at the same time is 1.
      The maximum time a result is saved in the server is 60 minutes.
      (it means that if you do not get your file back in time, your file may be deleted).
    • Team's members  
    • photo de Thomas
      Thomas Rouchon

      Email : rouchon@poste.isima.fr
      ISIMA student
      Blaise Pascal University
      1 Rue de la Chebarde, 63178 Aubière CEDEX
    • photo de Damien
      Damien Lamy

      Email : damien.lamy.89@gmail.com
      ISIMA student
      Blaise Pascal University
      1 Rue de la Chebarde, 63178 Aubière CEDEX
     
    • Input file format  
      The web service can be used providing input file corresponding to the ones you can find Here An example of correct file is provided hereafter :
      photo_creation

      A solution is a Gantt chart similar to the next one :
      photo_creation

     
    • Java implementation of the web Service
     

    • Java Web Service link :

    • This web service is temporarily unavailable until July 8th 2016, if you need an earlier access you can contact Maxime Chassaing at this address: maxime.chassaing[@]gmail[dot]com
      http://orws2.isima.fr:80/WebService_JSTL/WebService_JSTL?wsdl


    • Java Web Service - Backup :


    • This web service is temporarily unavailable until July 8th 2016, if you need earlier an access you can contact Maxime Chassaing at this address: maxime.chassaing[@]gmail[dot]com
      http://orws.isima.fr:80/WebService_JSTL/WebService_JSTL?wsdl


    • Web Service :
    • Download Java Web Service sources

    • Example : Java Program using the web service
     

        Application is available here : Download
        Code source available here : Download


        Picture of the client before launching a GRASP :
      window before GRASP

        Picture of the client after the end of GRASP :
      window after GRASP

        Picture of the corresponding Gantt diagram :
      gantt


     
     
    • How to create a Java client in 5 minutes ?

        Start Netbeans and create a new Java application
      photo_creation

        Take one minute to achieve a main window which could be similar to the next window :
      photo_creation

        Add to the projet a reference to the web service. Use for example the following address :
      This web service is temporarily unavailable until July 8th 2016, if you need an earlier access you can contact Maxime Chassaing at this address: maxime.chassaing[@]gmail[dot]com
      http://orws2.isima.fr:8080/WebService_JSTL/WebService_JSTL?WSDL

        The web service reference must be visible now in the project.
      photo_creation

        The code Java implementation is divided into 6 steps :

        Step 1
        Create a reference to the Soap serveur :

                               webservice.WebServiceJobShop_Service service = new webservice.WebServiceJobShop_Service();
                               webservice.WebServiceJobShop port = service.getWebServiceJobShopPort();
                          


        Step 2
        Read a text file and transform it into a array of byte. Note we assume the file is test.txt.

                              
                              File f = new File ("La01_0_1.txt");
                              InputStream ips = new FileInputStream(new File("La01_0_1.txt"));
                              byte[] dataInByte = new byte[ips.available()];
                              ips.read(dataInByte);
                              ips.close();
                          



        Step 3
        Transform the file into an instance

                              Probleme un_prob = port.createProblem(dataInByte);
                          


        Step 4
        Create a random bierwith vector and evaluate it.

                              Solution une_sol = port.generateRandBierwirth(un_prob);
                              une_sol = port.evaluate(un_prob, une_sol);
                          

        Step 5
        Display the solution

                              jTextArea1.append("Makespan : " + une_sol.getCout() + "\n");
                              jTextArea1.append("Number of Broken Time Lags : " + port.countBrokenTL(une_sol, un_prob) + "\n");
                              int n = un_prob.getNbjob()*un_prob.getNbmac();
                              for (int i = 0 ; i < n ; ++i) {
                                  jTextArea1.append("Start date of operation "+ i + " : " + une_sol.getDate().get(i) + "\n");
                              }
                          

        Step 6
        Save the solution in PNG format on the disk.

                              byte[] ganttDiagram =port.getGantt(un_prob, une_sol, "problemName");
                              ByteArrayInputStream bais = new ByteArrayInputStream(ganttDiagram);
                              try {
                                  image = ImageIO.read(bais);
                                  ImageIO.write( image, "png", new File("src/test_gantt.png"));
                                  jTextArea1.append("Gantt diagram is available in src");
                              } catch (IOException ioe) { }
                          




    • The structures
    • Structure 1 : Operation
      description :
      int numero : Number of the machine
      int dureeHoriz : Treatment time on the horizontal path including Time Lags min
      int dureeDisj : Treatment time on the disjunctive path
      int sommet : Number of Vertex
      int timelagMax : Time lag max on the operation
      int timelagmin : Time lag min on the operation
      int arcRetour : Length of the arc corresponding to Time lags Max
    • Structure 2 : Problem
      description :
      int nbjob : Number of jobs
      int nbmac : Number of machines
      long biCriteria : Max Value for Time Lags
      Operation liste_operation[][] : Values for each operation of the problem
      int error : 0 if correctly loaded , -1 else
      String strError : String for information
    • Structure 3 : Solution
      description :
      int[] vecteur : The BierwirthVector
      int[] date : Start dates of the operations
      int[] pere : Fathers of the operations
      int[] critique : Critical path
      int cost : Cost of the evaluated solution
    • Web service : API Reference
     


    • Function : [Problem un_prob] createProblem(byte[] file)
      description :
          Function to store the datas of a problem into a class

      input :
          file : byte table supporting the datas to transform into a Problem.
      output:
          un_prob : Java class supporting the datas of the Problem.
    • Function : [Solution une_sol] generateCanBierwirth(Probleme un_prob)
      description :
          Function that create a solution supporting an evaluated canonical vector

      input :
          un_prob : Problem we are creating a canonical solution for.
      output:
          une_sol : Solution evaluated.
    • Function : [Solution une_sol] generateRandBierwirth(Probleme un_prob)
      description :
          Function that create a solution supporting an evaluated random vector

      input :
          un_prob : Problem we are creating a random solution for.
      output:
          une_sol : Solution evaluated.
    • Function : [Solution une_sol] generateBierwirthFromVector(Probleme un_prob, int[] vect)
      description :
          Function that create a solution supporting an evaluated given vector

      input :
          un_prob : Problem we are creating a solution for.
      output:
          une_sol : Solution evaluated.
    • Function : [Solution une_sol] evaluate (Solution une_sol, Probleme un_prob, int start)
      description :
          Function that evaluate a Bierwirth vector

      input :
          une_sol : Solution supporting a Bierwirth vector to evaluate.
          un_prob : Probleme we are evaluating a solution .
          start : index where you start the evaluation.
      output:
          une_sol : The solution after evaluation.
    • Function : [Solution une_sol] localSearch (Solution une_sol, Probleme un_prob)
      description :
          Function that make a local search on the given solution

      input :
          une_sol : Solution supporting an evaluated Bierwirth vector.
          un_prob : Problem we are trying to find a better solution.
      output:
          une_sol : The solution after local search.
    • Function : [int nbBrokenTL]countBrokenTL (Solution une_sol, Probleme un_prob)
      description :
          Function that count the number of broken Time Lags max in a solution

      input :
          une_sol : Solution supporting an evaluated Bierwirth vector.
          un_prob : Problem we are finding a solution for.
      output:
          nbBrokenTL : The number of broken Time Lags
    • Function : [Solution une_sol]repairSolution (Solution une_sol, Probleme un_prob)
      description :
          Function that try to repair a non valid solution

      input :
          une_sol : Solution we try to repair.
          un_prob : Problem we are finding a solution for.
      output:
          une_sol : Better solution
    • Function : [byte[] gantt]getGantt (Probleme un_prob, Solution une_sol, String title)
      description :
          Function that return a Gantt diagram into a byte table
          Warning : must be transformed into an image in the client environement
      input :
          une_sol : Solution we are constructing a Gantt diagram.
          un_prob : Problem we are finding a solution for.
      output:
          gantt : byte table of the gantt diagram
    • Function : [String uuid] startGRASP (byte[] file, Holder strErr, int nbMaxVect, int nbMaxVoisin, int nbMaxDeplacement)
      description :
          Function to start a GRASP

      input :
          file : byte table supporting the Problem we are finding a solution
          strErr : Holder in order to have some information.
          nbMaxVect : Number of restart - limited to 500.
          nbMaxVoisin : Number of neighbours of a solution- limited to 500.
          nbMaxDeplacement : Number of moves in the solution space - limited to 500.
      output:
          uuid : String to get the solution after GRASP
          if uuid == null => GRASP not launched
    • Function : [void] stopGRASP (String uuid)
      description :
          Function that stop a GRASP

      input :
          uuid : id of the GRASP currently running
      output:
          void
      Error code:
          "0" : GRASP stopped
          "-1" : key unknow
          "-2" : GRASP already finished
    • Function : [Solution une_sol] readGRASP (String uuid, Holder error, Holder stringError,Holder progress )
      description :
          Function to get the result of the GRASP

      input :
          uuid : id of the GRASP
          error : error code
          stringError : error information
          progress : in order to know progress value
      output:
          une_sol : Solution provided by the GRASP
      Error code:
          "0" : Execution ok
          "-1" : key unknow
          "-2" : Execution still in progress
          "-3" : Error during GRASP
          "-5" : Too many requests





    • Number of visitors : 3612
    |
      Last update : 15 december 2015