次の方法で共有


Traveling Salesman Problems using Solver Foundation: C# code

This post has been updated. Click here to read it.

Comments

  • Anonymous
    April 28, 2010
    Hi Nathan, Thanks for posting this code.  I  have been playing with the MSF and it is nice to see many pieces in action here.  In an earlier posting, you have mentioned that you could use either "rank" or "assign" to display the results, but you chose to use "assign" to demonstrate some more LINQ capabilities.  However I am not getting the expected results with using "assign" alone.  Do we need to sort it somehow?  Thanks! Tekin.

  • Anonymous
    April 28, 2010
    Hi Tekin, Can you elaborate? In the last part of this sample I am doing a "select" from assign to print out the tour.  Assign[i, j] == 1 means that the arc i -> j is in the tour.

  • Anonymous
    April 28, 2010
    Hi Nathan, Select statement returns j's for active arcs.  When you print them out with "->" I assumed that the order represented the route taken.  It is not the case however.  You can confirm that by printing the full report and construct the route from it.  Thanks.

  • Anonymous
    October 13, 2010
    The comment has been removed

  • Anonymous
    January 19, 2011
    Thank you So Match for your Post...But there's one Error is :     "   Error 1 The type or namespace name 'SolverFoundation' does not exist in the namespace 'Microsoft' (are you missing an assembly reference?) " i search for it on "References">>Add  Reference>>.Net or Com    but i didn't find it this "SolverFoundation".... What should i do ? Please Help me!. Thank You Again.

  • Anonymous
    January 20, 2011
    Hi Maria, you need to download and install the Express version of Solver Foundation from code.msdn.microsoft.com/solverfoundation.  Make sure your project is .Net 4, NOT .Net 4 Client Profile. Otherwise you will not see Solver Foundation listed as a .Net reference.

  • Anonymous
    May 01, 2011
    Hi, creat code, works fine for me! Iam new in modelling, and iam asking my self, if it is possible to add a constraint which defines that a city has to be "entered" (assigned) after a spefic distance. thx Nathalie