brian bovril

914 Reputation

16 Badges

18 years, 170 days

MaplePrimes Activity


These are replies submitted by brian bovril

@acer  As you have alluded, this relates to the project you've been helping me with. I'm trying to hyperlink instances of players names programmatically in the final output table. 4 players =4 different urls. Its proving difficult. Everytime I run it, I get errors...... 

@Adam Ledger upload the mma and mw worksheets. Or PM me with those attachments.

@acer Thanks Mr Saccharum

This is a 3 row table:

with(DocumentTools):with(DocumentTools:-Layout):

T := Table(interior = none, exterior = all, Row("Minesoda SL"), Row("7/11/2017"),Row("Summary Report")):InsertContent(Worksheet(T)):

If I wanted to hyperlink the date. I tried this but I didn't print the date at all, let alone hyperlink it. Is this what you mean by "You cannot get a hyperlink in regular printed output"?

HL:=DocumentTools:-Layout:-Hyperlink:
T := Table(interior = none, exterior = all, Row("Minesoda SL"), Row(InsertContent(Worksheet(Group(Input(Textfield(
                                                 HL(Font("7/11/2017",'style'=':-Hyperlink','color'="Blue"),
                                                    'linktarget'="http://www.maplesoft.com"))))))),Row("Summary Report"))

@acer thanks for your interest.

the output is Tab[A1]=Record(......), but what I want is Tab[A1] :=Record(....)

a programmatic approach might work... But i'm trying to keep it in functional style in view of the recent work you did for me. 

@acer upload your reworked worksheet

@Kitonum Do you have a program to convert screendumps or pictures of math input into maple 1D input?

I hope you don't retype everything from a picture ???

In future the OP should use the big green arrow to upload his worksheet.

@Carl Love 

I wonder if i could impose further:

1/

At the very end there is

#Calculate change in means:

How do I sort this in descending values of mu?

B1: 1168 +- 74, change +5

A1: 1007 +- 42, change +0

........

2/ interum changes:

infolevel[RC]:= 1: #reports

RC: B1 Winner = 1166 +- 78; Change=3; Loser = 1004 +- 45; Change=-3
RC: B1 Winner = 1007 +- 42; Change=3; Loser = 816 +- 44; Change=0

Is it possible to output the winner and loser at each stage like this:
RC: Winner [B1]  = 1166 +- 78; Change=3; Loser [A1] = 1004 +- 45; Change=-3
RC: Winner [A1] = 1007 +- 42; Change=3; Loser [B2] = 816 +- 44; Change=0

UpdateStandingsSorted.mw

 

@Carl Love Thanks very much.

I wondered myself how much they charged for the consultation?. The problem is to find such work in the first place. The first barrier is requiring someone at the farm to realise its a scheduling problem and the need for a specialist such as yourself.

In terms of speed, Evolver took less than 5 seconds to get to the minimum for both the 7 block and the 5 block.

The advantage of such a platform is it suits someone with my coding skills (ie very little needed). The disadvantage is that it doesn't always find the minimum. Take the last problem in the document. The number of partitions of it into 3 blocks with the sizes as even as possible is PartCount([2$5, 4])=945945. (Higher than the 7 block, but lower than 5 block), but Evolver can't seem to get lower than 1205.9 even when I left it going for 45 mins and many trials. (Your procedure gets 1107.1). Now there may be a trick to it, tweaking crossover/mutation rate (it uses genetic algorithms), but I am no expert in it. There may be a forum? This is my worksheet anyways TRP5.xls

As an aside, does Maple do genetic algorithms and neural networks (AI) ?

@Carl Love 

Its a pity when the facts get in the way isn't it? I guess I should have guessed I had the matrix wrong when a lot of it violated the triangle inequality and my answers differed significantly from the pdf's.  I'll stop the self flagellation now.

So the real distance matrix is

N:=14:
c:=Matrix(
   (N+1)$2, shape= symmetric, scan= triangular,
   [0, op]~([[222,65.4,217,136,115,119,47.9,206,56.5,73,119,189,25.2,104],
                   [251,24.4,284,262,103,213,23,204,155,266,29.2,246,131],
                   [247,76.8,47.4,148,109,235,47.9,103,58.9,218,61.5,168],
                         [279,258,98.9,247,45.1,199,151,261,32.6,242,153],
                             [31.8,181,184,267,80.4,135,41.3,251,137,201],
                                    [159,162,246,59,113,38.9,230,109,179],
                                       [148,87.1,101,53,163,70.9,144,139],
                                          [189,104,102,165,205,53.4,82.3],
                                               [187,139,249,35.2,230,108],
                                                   [55,62.6,171,80.9,121],  
                                                        [117,123,98,93.1],
                                                            [233,120,183],
                                                                [214,135],
                                                                    [123]]
                                                                  
));


Using this matrix the answer to

a) is 2041.8 (agrees with the pdf). ok  i see how you got 135,135 partitions: nops(setpartition([seq(2..15)],2))

b) 1563 is the published answer. But when I crunched the data using Palisade Evolver, it found a lower minimum (1552.6) with these tours:  [[[1, 3,10,11], [1, 6,5,12], [1, 7,9,15],[1,13,2,4],[1,14,8]]]:

with Maple I got 1580, but I didn't generate enough routes, only a fraction of them.

I had a look at the help for SetPartitionFixedSizes, but frankly I don't know how to code it....

@Carl Love 

Thankyou for your interest. I found this problem trawling the net for for VRP's:

TRP.pdf

Edited.

In summary, a truck leaves a depot (node 1 in Maple) and has to visit 14 stores (nodes 2-15 in Maple) in various formations and return to the depot.

(a) The first part is to visit the 14 stores over 7 trips, ie visit 2 stores and return to the depot each trip.

Both Maple and Evolver agree the minimum is 2770.9, but the authors say its 2041.....

TRP_14x2.mw

(b) The problem as submitted. Visit all 14 stores over 5 trips. Maximum 3 stores and return to depot per trip. [p9]

14 is not divisible by 3, so an extra "slack" variable is added (node 16). After the permutations of the partitions, node 16 is removed.

@Seb1123 remove the word "maximize" from the above expression. The default setting in Dr. Sergey Moiseev's package is minimize.

@Carl Love I wish I could give it an upvote

@Kitonum 

thanks. But when I look at the problem I want to apply this to, I need a variation:

Given S := [seq(2..5)]

P:=combinat:-setpartition(S, 2);

[[[2, 3], [4, 5]], [[2, 4], [3, 5]], [[2, 5], [3, 4]]]

I want to remove the instances of 5.

leaving

[[[2, 3],[4]], [[2, 4],[3]], [[2],[3, 4]]]

sorry about that!

First 6 7 8 9 10 11 12 Last Page 8 of 26