## 884 Reputation

16 years, 200 days

## Index...

@vv Happy new year to you. I have changed the question slightly to reflect the depot being node 1 not 0. and the customers are 2 to 8.

and a slightly different methodology....But as Carl Love points out, the distance matrix provided violates the triangle inequality: c[1,2]+c[2,8]<c[1,8], so it may not be salvagable.

VRP_IPv2.mw

## It's a pity...

@Carl Love when the facts spoil a good story. I found the matrix after trawling the internet for VRP questions (and answers)

## Thanks Tom. I don't know...

@tomleslie why it works.......magic? But then i encountered a problem with a imported distance matrix...

revEngVRP.mw

## This is...

@Markiyan Hirnyk a forum about maths, not English. Why don't you lookup "pedantry".

## Rgds...

@vv thanks for your erudite solution. I like the way you dealt with the Y[ i<>j] constraint. I'll try and apply your method to a VRP....

## I got...

@Christopher2222 what I wanted, thanks. The link you found contains some good information. It's a pity such a lot of interesting material is "buried" beneath an ambiguous title (virtually unsearchable). Hopefully this polemic will inspire improvement of the search engine by the powers that be.

## Poly area...

@Kitonum Thx.  I swore I'd seen the formula before, so I looked through my repository of worksheets and found a worksheet from my Maple 15 folder:

poly_area.mw

and a link to similar work.

http://www.mapleprimes.com/questions/200154-Find-The-Area-Of-A-Polygon-Using-Maple

## Well,...

I didn't move it or remove it. Acer turned it into a post.
http://www.mapleprimes.com/posts/207664-Mapleprimes-Enquiry-Confusion

## Hint...

Looks like homework to me. Draw 3 lines from the vertexes of the triangle meeting in the centre of the circle. What angle is subtended at the centre? Get the radius by applying a little trigonometry.

## Great,...

@Carl Love Thanks for your effort. And Tom. And Markiyan.

Carl, on my Maple 2015, I don't get the output you got.

## Playing with your data,...

I believe the equation to optimize should be z := add(add(dist[i, j]*d[i]*Y[i, j], j = 1 .. n), i = 1 .. m);

try it and you will get different sites {compared to d[j] }

## Rgds...

@Carl Love thanks for the procedure.

It seems vv's simplex solution using the abs to linear trick was staring me in the face.

## abs to linear model trick...

@Carl Love

I modified the objective using this methodology:

http://math.stackexchange.com/questions/623568/minimizing-the-sum-of-absolute-values-with-a-linear-solver?rq=1

I'd like to make a procedure out of it, but i'm not a strong coder. Challenge anyone?
trick.mw

## Ah........

@Carl Love I was wondering when some Erudite Rchard would pull me up on that. I *assumed* when the OP mentioned "location" the problem might have involved cartesian co-ords (see attached) and therefore the Euclidean Metric (non linear) or even the Taxi Cab Metric might be appropriate. That was before he posted his worksheet. There is a saying: "Assumption is the mother of all ..........s"

http://www.mapleprimes.com/questions/205878-Taxi-Cab-Metric

Also, your Matrix solution doesn't completely work with my M2015, because it doesn't have DataFrame or DataSeries...

 First 8 9 10 11 12 13 14 Last Page 10 of 25
﻿