Topic
  • 5 replies
  • Latest Post - ‏2013-06-04T18:30:42Z by Mintch Zulitch
Mintch Zulitch
Mintch Zulitch
10 Posts

Pinned topic problem with getting query about machines id

‏2013-06-01T19:09:23Z |

Hi,
I have problem with getting query about on which machine jobs has been processed.
So, through java API and deploying "getDomain" method "after" finishing optimization process,
I get following result (for 5 jobs on one machine):


null[1: 7 -- (7)7 --> 14]
null[1: 0 -- (3)3 --> 3]
null[1: 3 -- (4)4 --> 7]
null[0]8 -- (10)10 --> 18]
null[0]2 -- (6)6 --> 8]

Now, I want to get access the binary numbers which appears after null term. (but I don't know how)
So, above result indicates that only jobs 1,2, and 3 has been processed on this machine.
And another question is that how can I get access this numbers during (not after) optimization process?


Thanks in advance.

  • GGR
    GGR
    65 Posts
    ACCEPTED ANSWER

    Re: problem with getting query about machines id

    ‏2013-06-04T09:59:16Z  

    Hi,

    I know that getStart or other methods can invoke the intervals' properties, but I actually want to get access the machine index for distinguishing the scheduled jobs on that machine. I defined the machines as IloIntervallist in my code.

    Hi

     

    To complete the preceding answer, you can use the method you can use the method of IloCP class.:

    boolean isPresent(IloIntervalVar a)

    boolean isAbsent(IloIntervalVar a)

     

    Cheers

     

  • GGR
    GGR
    65 Posts

    Re: problem with getting query about machines id

    ‏2013-06-03T17:46:57Z  

    Hi

     

    The domain method is merely a pretty print. If you need the numerical values of the solution, please have a look on the IloCP class in the documentation.. As an example, one of the method of the IloCP class is int getStart(IloIntervalVar a) which return the start value of the interval a in the solution. All other values in a solution can be acceded by a get function member of this class on variable and expressions in the model.

     

    Hope that helps

     

  • Mintch Zulitch
    Mintch Zulitch
    10 Posts

    Re: problem with getting query about machines id

    ‏2013-06-03T17:56:05Z  
    • GGR
    • ‏2013-06-03T17:46:57Z

    Hi

     

    The domain method is merely a pretty print. If you need the numerical values of the solution, please have a look on the IloCP class in the documentation.. As an example, one of the method of the IloCP class is int getStart(IloIntervalVar a) which return the start value of the interval a in the solution. All other values in a solution can be acceded by a get function member of this class on variable and expressions in the model.

     

    Hope that helps

     

    Hi,

    I know that getStart or other methods can invoke the intervals' properties, but I actually want to get access the machine index for distinguishing the scheduled jobs on that machine. I defined the machines as IloIntervallist in my code.

  • rdumeur
    rdumeur
    123 Posts

    Re: problem with getting query about machines id

    ‏2013-06-04T07:08:26Z  

    Hi,

    I know that getStart or other methods can invoke the intervals' properties, but I actually want to get access the machine index for distinguishing the scheduled jobs on that machine. I defined the machines as IloIntervallist in my code.

    Dear Mitch,

     

    One way to know what machine is used to process your job is to know which interval var associating said job to a machine is present. In short: presenceOf(machine_job[m][j]) is true can be tested: when true, it means that job J has been scheduled on machine M.

    Cheers,

  • GGR
    GGR
    65 Posts

    Re: problem with getting query about machines id

    ‏2013-06-04T09:59:16Z  

    Hi,

    I know that getStart or other methods can invoke the intervals' properties, but I actually want to get access the machine index for distinguishing the scheduled jobs on that machine. I defined the machines as IloIntervallist in my code.

    Hi

     

    To complete the preceding answer, you can use the method you can use the method of IloCP class.:

    boolean isPresent(IloIntervalVar a)

    boolean isAbsent(IloIntervalVar a)

     

    Cheers

     

  • Mintch Zulitch
    Mintch Zulitch
    10 Posts

    Re: problem with getting query about machines id

    ‏2013-06-04T18:30:42Z  
    • GGR
    • ‏2013-06-04T09:59:16Z

    Hi

     

    To complete the preceding answer, you can use the method you can use the method of IloCP class.:

    boolean isPresent(IloIntervalVar a)

    boolean isAbsent(IloIntervalVar a)

     

    Cheers

     

    Hi,

    Considering:
    IntervalVarList machine = new IntervalVarList();

    CP_fms.isPresent(machine.get(job_id))
    returns:
    false

    AND,


    CP_fms.presenceOf(machine.get(job_id))
    returns:
    IloPresenceOf(387)(IloIntervalVar(3)[0..1: 0..1,073,741,822 -- (6)0..1,073,741,822 --> 0..1,073,741,822])

    Thanks, "isPresent" method is correct and in "IntervalVarList" case, "get" method should be used to map the ArrayList to Interval Variable.