Menu

#8 I cannot get stats from execution of FRODO as an API

v1.0 (example)
closed
None
5
2020-04-06
2014-06-26
No

Hello all,

I'm using FRODO as an API, inside a Java program. After I have received the solution, I have tried to get some stats:

try {
parser = XCSPparser.parse("src/frodo2/algorithms/dpop/DPOPagentJaCoP.xml", false);
} catch (Exception e) {
e.printStackTrace();
}

solver = new DPOPsolver<AddableInteger, AddableInteger="">(parser).
solve(xmlDoc, null);

System.out.println("--- Cost: " + solver.getUtility() + " ---");
System.out.println("--- Time: " + solver.getTotalTime() + " ---");

The total cost of the solution is returned OK but I always have 0 value for total time. I’have checked the agent configuration file (DPOPagentJaCoP.xml), and it’s configured to measure processing time:

<agentDescription className="frodo2.algorithms.SingleQueueAgent" measureTime="true" measureMsgs="false">

Could you help please?

Kind regards,
Denise

Discussion

  • Thomas B. Léauté

    • assigned_to: Thomas B. Léauté
     
  • Thomas B. Léauté

    Hi Denise,

    I assume that you actually meant:

    solution = solve(xmlDoc, null);
    
    System.out.println("--- Cost: " + solution.getUtility() + " ---");
    System.out.println("--- Time: " + solution.getTotalTime() + " ---");
    

    I have looked at the code, and I believe that the method you should call is not getTotalTime() but getTimeNeeded(). Does it work for you when you call getTimeNeeded()?

    I am going to look into how to remove the confusing redundancy between the two methods. Thanks for your input.

    Thomas

     
    • Denise Maria Vecino Sato

      Yes Thomas, that's right. Now, I have the processing time.

      Thanks!

       

      Last edit: Thomas B. Léauté 2014-06-26
  • Thomas B. Léauté

    • status: open --> accepted
     
  • Thomas B. Léauté

    • status: accepted --> closed
     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.