Login ProductsSalesSupportDownloadsAbout |
Home » Technical Support » ElevateDB Technical Support » Support Forums » ElevateDB General Discussion » View Thread |
Messages 1 to 5 of 5 total |
RunningOrder Expression |
Mon, Sep 23 2013 6:16 AM | Permanent Link |
Malcolm Taylor | My brain's math unit has hung so I am hoping one of you has a working
version. It is a long story so please accept that I must do what I outline below. Sporting event in which competitors must perform 6 exercises. Normally a start order is drawn and then each performs their first exercise in start order and then their second, and so on. A simple index on ("Round", "StartOrder") does the business .. and has done so since time immemorial. But now the International Federation has added a Team event in which each team of 2 members performs 6 exercises, with each team member doing 3 alternately. So what? Well in spite of me buying the event designer a drink and explaining my difficulty, he was unmoved (or just plain awkward!) and this event type has to run with each of the 2 divers in a team performing one after the other - messing up the nice and simple running order. So it has to go: Start1 exercise1 (ie, round1), Start1 round2, Start2 round1, Start2 round2, .. until final team.. then back to Start1 round3, Start1 round4, .... I have managed to derive the following expression to calculate the running order using the "StartOrder", "Round" and number of "Teams", but I can't believe it has to be so complicated. I have added a few extra ()s to clarify it a little! (2 * "StartOrder" + (("Round"-1) MOD 2) - 1) + (((("Round" + 1) DIV 2) -1) * 2 * "Teams") You will see it is in two parts which are then added: The first expression generates the base RunOrder offset for each team, based on StartOrder (2 * "StartOrder" + (("Round"-1) MOD 2) - 1) The second expression generates the offset for each pair of rounds, based on the number of teams. (((("Round" + 1) DIV 2) -1) * 2 * "Teams) Any suggestions? I have posted a spreadsheet for a 4-team event in the binaries in case you need/want to test/experiment. Excel does not have DIV so I had to use TRUNC in it. Malcolm <How do you reboot a brain's math unit?> |
Mon, Sep 23 2013 2:09 PM | Permanent Link |
Tim Young [Elevate Software] Elevate Software, Inc. timyoung@elevatesoft.com | Malcolm,
<< Any suggestions? >> Are you simply concerned with the complexity ? I don't think it's particulary complex, and certainly won't be an issue for a generated column. Tim Young Elevate Software www.elevatesoft.com |
Mon, Sep 23 2013 2:13 PM | Permanent Link |
Malcolm Taylor | Tim Young [Elevate Software] wrote:
> > Are you simply concerned with the complexity ? I don't think it's > particulary complex, and certainly won't be an issue for a generated > column. Hi Tim Not concerned about performance as the data set will never be large. It seems to work fine but I wondered if anyone could look at me pityingly and say .. but you only have to ... Malcolm |
Mon, Sep 23 2013 5:55 PM | Permanent Link |
Barry | Malcom,
>Well in spite of me buying the event designer a drink and explaining my difficulty, he was unmoved (or just plain awkward!) and this event type has to run with each of the 2 divers in a team performing one after the other - messing up the nice and simple running order.< Some advice. In reply to the client's "simple" request, I'd counter with: "Sure it's possible. It all depends on how much time and money *we* have to contribute to the solution". If he doesn't have the money, then it can't be that important to him after all, and coincidentally I don't have the time. Far too many clients ask for the moon and only have bus fare as payment. It is better to determine this at the outset before writing any code. Just my 2 cents. Barry |
Tue, Sep 24 2013 2:24 AM | Permanent Link |
Malcolm Taylor | Barry wrote:
> > "Sure it's possible. It all depends on how much time and money we > have to contribute to the solution". > Sadly it is a freeware app and while all major championships now use software such as mine, the Federation's legislators were brought up in the days of paper and pencil management systems so they don't 'get' the 'systems' point of view. Clearly the guy's price was higher than a single beer! Malcolm |
This web page was last updated on Tuesday, September 17, 2024 at 04:19 AM | Privacy PolicySite Map © 2024 Elevate Software, Inc. All Rights Reserved Questions or comments ? E-mail us at info@elevatesoft.com |