Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Duplicate jobs in solution when using initial routes in a XML vrp problem #112

Closed
damariei opened this issue Jul 3, 2014 · 4 comments
Closed

Comments

@damariei
Copy link

damariei commented Jul 3, 2014

If you add a service or shipment such as:

<service id="1">
  <coord x="2" y="2"/>
  <capacity-dimensions>
    <dimension index="0">0</dimension>
  </capacity-dimensions>
</service>

And use an initial route such as:

<initialRoutes>
          <route>
               <driverId>noDriver</driverId>
               <vehicleId>1</vehicleId>
               <start>0.0</start>
               <act type="service">
                    <serviceId>1</serviceId>
               </act>
               <end/>
        </route>
</initialRoutes>

The solution duplicates the job:

<solutions>
          <solution>
               <cost>16131.119189371566</cost>
               <routes>
                    <route>
                         <driverId>noDriver</driverId>
                         <vehicleId>1</vehicleId>
                         <start>0.0</start>
                         <act type="service">
                              <serviceId>1</serviceId>
                              <arrTime>4096.696026182618</arrTime>
                              <endTime>4096.696026182618</endTime>
                         </act>
                         <act type="service">
                              <serviceId>1</serviceId>
                              <arrTime>4096.696026182618</arrTime>
                              <endTime>4096.696026182618</endTime>
                         </act>
                         <end>4591.722277748453</end>
                    </route>
               </routes>
          </solution>

This doesn't happen if you remove the initial routes.

@damariei
Copy link
Author

damariei commented Jul 3, 2014

After some more testing, the only jobs that get duplicated are ones that are not in the initial routes.
For example, you have service A and B, and only A is defined in an initial route.
In the solution you will see B getting done twice. Putting B inside the initial route as well removes this issue.

@jsprit jsprit added bug labels Jul 4, 2014
@jsprit
Copy link
Contributor

jsprit commented Jul 4, 2014

Either way jobs should not appear twice in solution. I will be looking at this asap.

jsprit pushed a commit that referenced this issue Jul 30, 2014
jsprit pushed a commit that referenced this issue Jul 30, 2014
jsprit pushed a commit that referenced this issue Jul 30, 2014
jsprit pushed a commit that referenced this issue Jul 30, 2014
@jsprit
Copy link
Contributor

jsprit commented Jul 30, 2014

bugfix in head of development (1.3.2-SNAPSHOT)

@jsprit jsprit closed this as completed Jul 30, 2014
@jsprit
Copy link
Contributor

jsprit commented Jul 30, 2014

Note that API of head changed (acc to v1.3.1) - see https://github.com/jsprit/jsprit/blob/master/CHANGELOG.md to migrate to the 1.3.2-SNAPSHOT

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant