--
You received this message because you are subscribed to the Google Groups "jsprit-mailing-list" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jsprit-mailing-...@googlegroups.com.
To post to this group, send email to jsprit-ma...@googlegroups.com.
Visit this group at http://groups.google.com/group/jsprit-mailing-list.
For more options, visit https://groups.google.com/d/optout.
I'm not sure, but you would definitely need BOTH a custom objective function and a soft constraint, as the custom objective function in jsprit is not considered during individual job insertions (but soft constraints are).
Could you describe your approach to clustering using a minimum cost flow problem in more detail? Also what library do you solve it in?
--
I can't find a good example for soft constraints (Stefan - do you know of one?) but see the interface SoftConstraint and its extended interfaces SoftRouteConstraint and SoftActivityConstraint. You add them to the constraintmanager when building the algorithm. See create method in https://github.com/jsprit/jsprit/blob/master/jsprit-core/src/main/java/jsprit/core/algorithm/box/Jsprit.java which adds the InsertionNoiseMaker. InsertionNoiseMaker is a SoftActivityConstraint - see https://github.com/jsprit/jsprit/blob/master/jsprit-core/src/main/java/jsprit/core/algorithm/box/InsertionNoiseMaker.java
These constraints are evaluated on each insertion and give the cost of an activity insertion, either at the route or activity (position) level.
Thanks for the information on the clustering - very interesting. I have a couple more questions if this is OK:- Do you use the network simplex algorithm in Networkx to solve the min cost flow?
- You already have the cluster positions (as you have the edge costs). Are you embedding this within a k-means so you (a) get the mean position per cluster, (b) assign jobs to clusters using min cost flow and then repeat this for a certain number of iterations?
- If you're using network simplex, wouldn't this sometimes split a job between two different clusters? How do you deal with this? (particular in the output results)?
--
Yes, however if you need to enforce a minimum route size and you include a penalty for this in the insertion cost, you might run into issues. It's difficult to model minimum route size (i.e. cluster size in your case) with an approach like jsprit which uses job insertion heuristics. Have a look at how the cheapest insertion and regret insertion codes work in jsprit...
Yes - but I don't know much about network flow problems, simplex and I know nothing about capacity scaling algorithms. I just know that if you're doing a linear-programming type solution, then unless you're using a fancy mixed integer programming solver (like simplex), you're solving the case where all decision variables are real valued (i.e. can take any value, not just integer values like 1). Hence getting a partial assignment (split as fractions) could be an issue. I think there are some circumstances where this is guaranteed not to happen in flow problems, but I know very little about this subject.
clustering result with capacity constraint
clustering result without capacity constraint