Message Boards Message Boards

LinearProgramming approach for "best teams" algorithm

Posted 7 years ago
POSTED BY: Anton Antonov
12 Replies

Hello Maxime,

thank you very much for your answer. Seems I was not completely wrong. Good to know ;-). Looks like Anton is very busy at the moment. Hope he has some time in the future to help me for the last questions. That would be great. Or maybe there is someone else in this forum who knows the answers my questions above :-)

Regards,

Peter

POSTED BY: Peter Parker

Hi

Thank you very much for your reply!

If I rerun the code with the new package (or use the definition from your last post) I finally get a table: enter image description here However, as you can see, the table is not identical to the one you have and I still get some error messages.

Best regards,

Peter

POSTED BY: Peter Parker
Posted 7 years ago

Hello,

meanwhile I came to the conclusion (after checking several steps in this and similar Mathematica-codes), that loading the Mathematica file is not the reason for my error message. I now start to doubt if the very last section in the code above, the part where you plot the Matrix, is correct. It always tells me that one part of the matrix does not exist. And I don't understand why. Is there some other way to plot the data? I was thinking to export the result in an Excel file. The advantage is, that I can use the excle file for some other calculations.

I would really appreciate any help on this problem!

Thank you very much in advance!

Peter

POSTED BY: Updating Name
POSTED BY: Anton Antonov

Hello Anton,

I would appreciate your help very much!!!

Thank you very much in advance!

Peter

POSTED BY: Peter Parker

Hey Anton,

looks like you are the only person who can help me with this problem....

Since the problem seems to work in your case, I hope we are close to a final solution for this.

I may have some further questions, but I want to ask them step by step. Highest priority has to plot the table. Either in Mathematica or in Excel. Both is fine for me. Excel maybe even more useful for post processing.

The code you have written is quite powerful and I already have an idea to improve it even more. But this would be the next step.

Cheers,

Peter

POSTED BY: Peter Parker

I did not include in my GitHub package MathematicaForPredictionUtilities.m the up-value definition of MatrixForm for Association objects that have keys "XTABMatrix" or "XTABTensor". I did that today. (Although I am not sure it is a good idea.) Please rerun your code with the new package definition or use the definition:

Unprotect[Association];
MatrixForm[x_Association /; (KeyExistsQ[x, "XTABMatrix"] || KeyExistsQ[x, "XTABTensor"])] ^:= (MatrixForm[#1, TableHeadings -> Rest[{##}]] & @@ x);
Protect[Association];
POSTED BY: Anton Antonov

Sorry, its me again :-)

I am confused. It is nice to see, that I am now able to get a table by running your code. This is great and I am thankful for all your help!!! But there are still some thinks that make me confuse:

1) Why do you get a different table? Maybe there are multiple solutions?

2) As you can see in my table (see screenshot), I do not have a chef team assignment for every course (red number missing). Therefore sth. must be wrong.

3) As you can see in the screenshot, I still get error messages.

4) Why does it obviously work in your case but not in my case? Am I doing sth. wrong or is it the code?

The algorithm is quite complex. I get most of it. I can follow the main steps, but I don't understand all the details (yet). Therefore I can not judge if I do sth. wrong or just the code. But how can I do sth. wrong when all I have to do is to run your code? This should not be so difficult.

Best regards,

Peter

POSTED BY: Peter Parker
Posted 7 years ago

Hi Peter

1) Yes looks like there are multiple solutions. At least both yours and Antons solution look right to me. When I run the code I get an other table as well.

2,3) The error messages are related to your problem. I get the same when I run the code. Don't really see what is the reason for this.

4) I don't know

Hope I could help you.

POSTED BY: Maxime Denker

Hi everyone,

I am still in the process of understanding the code step by step. So far I doing well but I have a problem after plotting the matrix (which, by the way, looks exactly like in the example). The problem appears with importing the Mathematica file. Please have a look at the screenshot.

![enter image description here][1]

Hope you can help me. As I sad, my Matrix plot looks like the one from the example, therefore I think this is not the problem.

Best regards,

Peter

POSTED BY: Peter Parker

For the Sudoku problem, I used FindMinimum to do the linear programming. I believe it selects that method automatically when the problem is linear.

POSTED BY: Frank Kampas

enter image description here - another post of yours has been selected for the Staff Picks group, congratulations! We are happy to see you at the top of the "Featured Contributor" board. Thank you for your wonderful contributions, and please keep them coming!

POSTED BY: Moderation Team
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract