[pgrouting-dev] [pgRouting/pgrouting] 2d7e98: update some functions

Hi Razequl,

Thank you for checking your code. I just had a "quick" look over it and you seem to be making good progress. I see you are starting to integrate you code into pgRouting. Is it safe to assume that you have it working to your satisfaction in yout tester environment?

One issue that we have run into with out pgrouting code is that you should not push_back large objects on to a std::vector as this seems to allocate memory for a copy and it tends to fail. We have worked around this in other code by pushing a reference or point onto the std::vector an then making sure we new() and delete() the objects as appropriate.

These seems to work fine outside the postgresql environment, but tends to be problematic in postgresql and it seems to be random whether it works or not.

So just keep this in mind as you are integrating code.

Thanks,
   -Steve

On 8/23/2013 3:25 PM, zibon wrote:

   Branch: refs/heads/gsoc-vrp
   Home: https://github.com/pgRouting/pgrouting
   Commit: 2d7e9858d029d0fbbc41003336217b0490edb437
       https://github.com/pgRouting/pgrouting/commit/2d7e9858d029d0fbbc41003336217b0490edb437
   Author: zibon <ziboncsedu@gmail.com>
   Date: 2013-08-23 (Fri, 23 Aug 2013)

   Changed paths:
     M src/vrp_basic/src/VRP_Solver.cpp
     M src/vrp_basic/src/VRP_Solver.h

   Log Message:
   -----------
   update some functions

Hi Steve,

Thanks for the information. As I have lost some days, I am working hard to make that up. I am still having some issues with the test environment. I am fixing those and hopefully this will be completed within two-three days. I will then invite you to run the program using some sample files and have a feel of that. Once it is done, I will start to write codes for taking input from database and feed it to the algorithm. There are some design issues and so I will need help from you and Daniel. I have started looking at the codes for TSP and DARP as they have similarity with VRP. As for push_back issue, I will follow your suggestion. May be we implement the copy constructor of the class as push_back calls the copy constructor.

  • Razequl
···

On Sat, Aug 24, 2013 at 1:52 AM, Stephen Woodbridge <woodbri@swoodbridge.com> wrote:

Hi Razequl,

Thank you for checking your code. I just had a “quick” look over it and you seem to be making good progress. I see you are starting to integrate you code into pgRouting. Is it safe to assume that you have it working to your satisfaction in yout tester environment?

One issue that we have run into with out pgrouting code is that you should not push_back large objects on to a std::vector as this seems to allocate memory for a copy and it tends to fail. We have worked around this in other code by pushing a reference or point onto the std::vector an then making sure we new() and delete() the objects as appropriate.

These seems to work fine outside the postgresql environment, but tends to be problematic in postgresql and it seems to be random whether it works or not.

So just keep this in mind as you are integrating code.

Thanks,
-Steve

On 8/23/2013 3:25 PM, zibon wrote:

Branch: refs/heads/gsoc-vrp
Home: https://github.com/pgRouting/pgrouting
Commit: 2d7e9858d029d0fbbc41003336217b0490edb437
https://github.com/pgRouting/pgrouting/commit/2d7e9858d029d0fbbc41003336217b0490edb437
Author: zibon <ziboncsedu@gmail.com>
Date: 2013-08-23 (Fri, 23 Aug 2013)

Changed paths:
M src/vrp_basic/src/VRP_Solver.cpp
M src/vrp_basic/src/VRP_Solver.h

Log Message:

update some functions