Decision Optimization

Decision Optimization

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

 View Only
  • 1.  Objective Function Result

    Posted Wed September 26, 2018 10:35 PM

    Originally posted by: vahid_mlkr


    Hi

    I have 2 questions that I do appreciate if I can have some hints please

    Please see the images 1, 2, 3, 4, 5 and 6 attached here. My question is about the some auto-generated stuff by cplex in java. (highlighted in red, INTEGER)

    =====

    Image 1

    ======

    Image 2

    =====

    Image 3

    =====

    Image 4

    ======

    Image 5

    =====

    image 6

    ===============

    I have a dynamic problem, that the system has to solve the problem over time, T1, T2,  T3 and so on.

    My question is, when I printed the objective function value using model.getObjValue(), in image 1 the part that is related to INTEGER, generated by cplex, it is being printed in the beginning of my objective value. The 1st part is for the integer but the remaining part is the correct value of my objective (I could calculate that and verify it). How can I stop that 0115 from being printed ?

    The same thin is happening at my T2 (images 3 and 4), 160 is still being printed together with the value of my objective function (cumulative, T1 + T2).

    ===============

    My 2nd question is that however, at my T3 (images 5 and 6), the behavior of the system suddenly changes. Although the minimum value of the INTEGER is still being printed together with the objective function, but the result is not cumulative the  same as T1 and T2 which I can't really understand why it happens.

    ===============

    And lastly, I have printed the cplex time, using model.getCplexTime(), this is the time that cplex takes to solve the problem at each T, am I right ?

    May I know what is its difference with getDetTime() ? I read the documentation and forums, but it was not really clear for me and I couldn't understand it well from the explanations. 

    ===============

    Many thanks in advance


    #CPLEXOptimizers
    #DecisionOptimization


  • 2.  Re: Objective Function Result

    Posted Thu September 27, 2018 01:08 AM

    Sorry, I don't get what your issue is with the printout. As far as I can see, the value in the "Best integer" column of the log matches the objective value you compute yourself. The only difference is that the value in the log is rounded to 4 decimal places to allow for nicer output. So everything is expected. You say you want to stop CPLEX to print 0.0115. What do you mean by that? Do you mean you want to disable CPLEX log output? You also say the result is not "cumulative". What do you mean by that? Maybe you can rephrase your questions or tell us what output you would expect instead.

    About the timing functions: getCplexTime() measures wallclock time while getDetTime() measure deterministic time. Deterministic time describes the amount of work CPLEX has performed so far. As opposed to wallclock time, it is deterministic. That is, it does not depend on the OS scheduler etc.


    #CPLEXOptimizers
    #DecisionOptimization


  • 3.  Re: Objective Function Result

    Posted Thu September 27, 2018 02:54 PM

    Originally posted by: vahid_mlkr


    Thanks for the reply

    I will try to re-phrase my question

    My problem is a minimization problem. It is a task-resource assignment problem

    For testing purposes I have given a set of data to the system in a way that after assignment I can calculate the result by hand manually too. For validation purposes only

    What I have calculated based on the assignment results, was 0.0000499

    The CPLEX gives that result as well, but as you can see it has added the Best Integer to it as well that I can't understand why. I was expecting to see 0.0000499 as the result of my objective function. but I see 0.0115499

    ===================

    Regarding the 2nd part (cumulative)

    once the cplex completed its work at T1, it moves to T2 and the model is re-constructed and it does the assignment based on the tasks at T2.

    The test was in a way (small enough) that I can calculate the results by hand to check them.

    So, the cplex does the job, finds the objective function results and adds it to the one he found in T1,

    So, what is appearing at T2 (image 4: 0.0160979), the 0.0160 is the best integer, and the 0.0000979 is the summation of the objective function resulted in T1 + T2 which I am fine with that, So, at T2 the objective function result was something around 0.0000479 that when it is added to T1 results (~0.0000500), it become 0.0000979,  I have calculated both (0.0000500) and (0.0000479) by my self and it is correct. I mean once I saw the assignment decisions, then I calculated the function and it is fine.

    BUT, this is not the case at T3 (image 5 and 6), as u can see, the best Integer is being printed as usual, but the rest of the result is not really match with what I had given to the system

    Hope the description is a little bit more clear, please let me know if further explanations are needed

    ======================

    Regarding the time, the getCplexTime() is is seconds, is that the same for the getDetTime() or is it in milli seconds ? Because obviously I didn't wait 189.56 seconds (image 6) to get the results. Which one is the "time" that I have to consider about the time it take for cplex to solve the model/problem ?

    ======

    Many thanks 

     

     


    #CPLEXOptimizers
    #DecisionOptimization


  • 4.  Re: Objective Function Result

    Posted Sun September 30, 2018 05:23 PM

    Originally posted by: vahid_mlkr


    Any suggestion on this is highly appreciated

    And may I know please what best Integer is exactly referring to ?


    #CPLEXOptimizers
    #DecisionOptimization


  • 5.  Re: Objective Function Result

    Posted Thu October 04, 2018 01:44 AM

    As explained here and here the column "best integer" gives the objective value of the best integer feasible solution found so far.

    For you other question, you say

    I was expecting to see 0.0000499 as the result of my objective function. but I see 0.0115499

    So there is a difference of 0.0115 that is unaccounted for. How exactly do you compute this number 0.0000499? Do you include the values of all variables when computing that?


    #CPLEXOptimizers
    #DecisionOptimization


  • 6.  Re: Objective Function Result

    Posted Tue October 09, 2018 01:27 AM

    Originally posted by: vahid_mlkr


    Dear Daniel
    Many many thanks for your time and replies.
    Yes. I did consider all the variables.
    Basically I have two types of Resources R1 and R2 (many from each type as the input data) and I have set of Tasks (as another input). So, I know the cost of assignment of Tasks to R1 or R2. That's why when I see the result of assignment, I can do the calculations (for a small scale of course) by myself to validate the result obtained. And just to add that it is minimization problem, to minimize the cost with respect of set of constraints I have. That's basically the high level image of the model
    Regards


    #CPLEXOptimizers
    #DecisionOptimization


  • 7.  Re: Objective Function Result

    Posted Wed October 10, 2018 01:46 AM

    Apparently, you are doing something else than you think CPLEX does. Can you show us the model and the code with which you compute the objective value that is different from what CPLEX computes?


    #CPLEXOptimizers
    #DecisionOptimization