Decision Optimization

 View Only
Expand all | Collapse all

Flexible job shop scheduling: defining sets and variables

  • 1.  Flexible job shop scheduling: defining sets and variables

    Posted Mon March 20, 2023 05:20 AM
    Edited by Rory Keeley Mon March 20, 2023 09:17 AM

    Hello,

    I am new to CPLEX and trying to write a model for flexible job shop scheduling problem (MIP). However, I am not able to define the sets and variables given below:

    SETS:

    Oi ->ordered set of operations of job i (Oi C O), where Oif(i) is the first and Oif(l) is the last element of Oi
    Mj  ->the set of alternative machines on which operation j can be processed, (Mj C M)
    Mj n Mj' -> the set of machines on which operations j and j' can be processed  (this set will be used as a domain for variable below and some constraints)

    DECISION VARIABLE:

    Yiji'j'k  = 1, if operation Oij precedes operation Oi'j' on machine k; 0, otherwise

    I tried to define a tuple as given in attachment. But I couldn't find a way to read processing time from this tuple to use in the constraint I shared.I also added a screenshot for sets and decision variables. I need your help. Thank you.



  • 2.  RE: Flexible job shop scheduling: defining sets and variables

    Posted Mon March 27, 2023 07:28 AM

    Dear Zgeg,

    To access a tuple field, you should use the dot (.) notation. 

    For instance:

    tuple Point {
    int x;
    int y;
    };

    Point p = <2,3>;
    int x = p.x; // here you use the (.) notation to access the field of the tuple.

    For more information, please consider reading: https://www.ibm.com/docs/en/icos/22.1.1?topic=structures-tuples

    I hope this helps.

    Cheers,



    ------------------------------
    Renaud Dumeur
    ------------------------------