Group Abstract Group Abstract

Message Boards Message Boards

Solve for best teams?

Posted 9 years ago
POSTED BY: Peter Parker
14 Replies

@Peter Parker did you edit your post and made images disappear? Could you please bring it back to a readable state?

POSTED BY: EDITORIAL BOARD

Thank all of you for your contributions to my question. You are all very helpful and I am glad that this forum exist. Special thanks to Anton, who took the effort to write a complete algorithm to my problem. Thank you very much. I am also supriesed that my little questions turns out in such a big algorithm. I completely underestimated it.

I am still trying to understand the algorithm but there is one question that I already have:

Did you forget to define eachTeamHadFullMeal ? I think so. This is why I can not evaluate the Matrix plot.

I will have following questions, but I will keep this for the beginning. I don't want to confuse you :-)

Regards,

Peter

POSTED BY: Peter Parker

Did you forget to define eachTeamHadFullMeal ? I think so. This is why I can not evaluate the Matrix plot.

Yes, I removed it somehow after pasting the Markdown code into the browser. It is fixed now.

POSTED BY: Anton Antonov

Hi,

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 attached to this message.

Screenshoot in my Dropbox

It is almost the last step. If I evaluate the file again, the first error message disappears ("Cannot open....") but I can still not plot the table. Am I doing sth. wrong when importing the Mathematica file? I don't think so....

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

PS: I posted a similar message in the separated discussion of this topic: Discussion But I think it actually belongs to here, which is why I reposted it. I am really interested in understanding the code and I hope you will have the patience to help me with my problem :-) As I sad, I have the matrix plot already and I think I understand it more or less. But the rest doesn't seem to work for some reasons...

POSTED BY: Peter Parker

Here is the solution I outlined in a previous post: http://community.wolfram.com/groups/-/m/t/975898

POSTED BY: Anton Antonov

@Anton Antonov suggested a great solution. We split it up in a separate discussion. To keep future edits of this solution in a single place please always refer to the new solution's URL: http://community.wolfram.com/groups/-/m/t/975898

POSTED BY: EDITORIAL BOARD

This type of problem is best solved with a program called GAMS (see gams.com). The only downside of GAMS is that it does not have the power of Mathematica to create and manipulate the equations and constraints. I have written a GAMS package in Mathematica to enable problems to be formulated in Mathematica and solved in GAMS, however, it is not quite yet ready for external distribution. Fortunately your problem equations are easy to write in GAMS and can be solved with the free version of the program.

Regards

Neil

POSTED BY: Neil Singer

Thank you very much. Since I don't have Mathematica on my private PC I will be able to test my idea not until Monday. I guess the best for me would be, it I write the constrains in Mathematica-Code first, and then try to maximize them using the suggestions of Anton in the first reply. Anyway, I think it would be helpful to see the code for equation 2. Then I can apply this to the remaining equations.

Cheers and have a nice weekend,

Peter

POSTED BY: Peter Parker

Oh yes, maybe you are right and my description in post 1 is not consistend with the mathematical definitions below. Here is a detailed explanation for each equation and what it means:

enter image description here

Anyway, as I said in my previous post, I struggle to write down the Mathematica-code even for equation (2). Would be great if somebody can give me an example, so that I can code the remaining equations.

Cheers,

Peter

POSTED BY: Peter Parker

For each team/group/course there should correspond a (triply indexed) variable that takes values of 0 or 1. If 1, that means the team is assigned to that group in that course. The sum over all groups, for fixed team and course, must be 1. So that gives the constraints corresponding to stipulation 2.

POSTED BY: Daniel Lichtblau

It seems that the uses of "team" and "group" are inconsistent in your description. A team has two people in it or that is the definition of a group?

POSTED BY: Anton Antonov
POSTED BY: Peter Parker
POSTED BY: Daniel Lichtblau

You can generate symbolically the constraints of equations (2)-(8) and give (1) to Maximize. It might be a very good idea to make a linear programming formulation (and use LinearProgramming). See this answer at MSE that uses the outlined approach.

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