High Council Matrix program

29 postsstarted by mkmurray 14,078 viewsoriginal topic

Senior Member
#1
Please see [thread=234]this thread[/thread] for more information.

Ok, I have finished an application that I wrote in C#. It needs the .NET 2.0 framework on a Windows box.

It is really simple but seems to do the job. It allows you to input a list of speakers and a list of units manually. You can then specify a number of months for the schedule. It builds a matrix from this information. It allows you to load/save the data entered (speakers, wards, num of months) from/to a file.

I plan to add the ability to see just one ward's or one speaker's schedule, rather than the whole matrix. I also plan to add the ability to export the matrix to a CSV file or something to be imported into Excel or Open Office, if desired.

I don't have anywhere to post the code as of yet. You'll hear from me again soon.
Senior Member
#2
mkmurray wrote:I don't have anywhere to post the code as of yet. You'll hear from me again soon.
Why don't you try ldsoss.org?

Tom
New Member
#3

Thanks !!

Thank you for your timely messages and willingness to post the results. I'll watch for a location.
Senior Member
#4
Ok I am hosting it on CodePlex, Microsoft's open source hosting site. This is because I have written it in C# and I am mostly familiar with Microsoft tools and programming.

Here is the url to the project page for the High Council Circuit program: http://www.codeplex.com/HCC

It is my first crack at it and I plan on a making a few more improvements, as noted on the front page of the site. Enjoy!
Senior Member
#5
Ok, I have added the ability to see the whole matrix, or just a speaker's or a unit's schedule. The code is checked into CodePlex, but is not released in any build yet.

That leaves just the export to a CSV file for importing into a spreadsheet application (Excel, Open Office, etc.). I should have that done sometime soon.

Please feel free to go to the project on CodePlex, download the v1.0.0.0 beta release, and try it out. Provide feedback! Thanks.
Senior Member
#6
Version 1.1.0.0 Beta is released now.

It includes all of the features I had originally planned and a bug fix I found.

Please download it, give it a try, offer suggestions, report bugs, join the project.

http://www.codeplex.com/HCC
Senior Member
#7
mkmurray wrote:Version 1.1.0.0 Beta is released now.

It includes all of the features I had originally planned and a bug fix I found.

Please download it, give it a try, offer suggestions, report bugs, join the project.

http://www.codeplex.com/HCC
Well, it appears that the project was inactive too long and CodePlex deleted my project. Please email me if you want a copy of the executible. I'll see if I can get it hosted again somewhere.
Senior Member
#8
mkmurray wrote:Well, it appears that the project was inactive too long and CodePlex deleted my project. Please email me if you want a copy of the executible. I'll see if I can get it hosted again somewhere.
You may want to look at google code (code.google.com).

Tom
#9

Code

Rmember GWBasic Those were the fun days

TRSDOS lives :)
#10
Eric Werny wrote:Rmember GWBasic Those were the fun days

TRSDOS lives :)
I actually preferred LDOS. I had Newdos too, but it grew too bizarre toward the end of it's life. LDOS grew up to be the last of the TRSDOS series.

I actually wrote commercial programs (in assembler) for the LDOS system that were later incorporated. One was the help system the other a disk verifier. They are still on the web today I think, just no support for them. :D
Skip Taylor :eek:
Lancaster CA.
Senior Member
#11

Program Attached to this Post

Well, I've gotten quite a few emails requesting the most recent version of this application. So here you go, I have attached it to this post. It's a zip file with the exe inside of it.

Just run it anywhere on your machine. No installation required. It can create and load files of extension HCC (High Council Circuit) containing a saved configuration in XML.

Thanks everyone.
๐Ÿ“Ž HighCouncilCircuit.zip (9.69 KiB)
Community Administrator
#12

HC Matrix

MKMurray,

Thank you for posting your application. I appreciate you taking the time not only to write the application but also to share it.

The one aspect of your application that makes it less than optimal, in my opinion, is that the speaking assignments are all clumped together. Take the example of a stake of 6 wards with 12 high councilors, with each ward being visited by a high councilor once per month. Your application will create a schedule where each high councilor speaks for six consecutive months, then does not speak for 6 more months.

When I worked out the schedule for my stake of 7 wards (manually of course :)), I made sure that no high councilor ever spoke more than two months in a row, and never had two consecutive months off. This distributes the assignments much more evenly. I know that adding such a requirement makes the algorithm more complicated, but the result is much more balanced.

Just a thought....
Questions that can benefit the larger community should be asked in a public forum, not a private message.
Senior Member
#13
Alan_Brown wrote:MKMurray,

Thank you for posting your application. I appreciate you taking the time not only to write the application but also to share it.

The one aspect of your application that makes it less than optimal, in my opinion, is that the speaking assignments are all clumped together. Take the example of a stake of 6 wards with 12 high councilors, with each ward being visited by a high councilor once per month. Your application will create a schedule where each high councilor speaks for six consecutive months, then does not speak for 6 more months.

When I worked out the schedule for my stake of 7 wards (manually of course :)), I made sure that no high councilor ever spoke more than two months in a row, and never had two consecutive months off. This distributes the assignments much more evenly. I know that adding such a requirement makes the algorithm more complicated, but the result is much more balanced.

Just a thought....
Thanks for the suggestion. It's doubtful I'll get time to do this, but I could employ one of those spiffy algorithms I learned in college that gives different paths or outcomes different weights and then finds the best score. I'd have to pull out textbook and everything, but it would be a fun project to see what I can come up with. :)
Community Moderators
#14
mkmurray wrote:Thanks for the suggestion. It's doubtful I'll get time to do this, but I could employ one of those spiffy algorithms I learned in college that gives different paths or outcomes different weights and then finds the best score. I'd have to pull out textbook and everything, but it would be a fun project to see what I can come up with. :)

Do you want my old textbook??? :D Anyway to get it properly balanced an A* search might work with the number of times that one speaks adds additional weight to the next state.
- David
Senior Member
#15

High Council Matrix program algorithm

thedqs wrote:Do you want my old textbook??? :D Anyway to get it properly balanced an A* search might work with the number of times that one speaks adds additional weight to the next state.
Well, in case someone wants to help the algorithm, I've attached the relevant spots of code in a text file. It is C# running on .NET 2.0.

If we go with an algorithm that applies weights to certain aspects of an outcome, I would like there to be variables so that they can be incorporated into the UI (so the user can modify weights to their liking). Also, tell us what your chosen default weights are. Thanks in advance.
๐Ÿ“Ž Algorithm.txt (2.96 KiB)
Community Moderators
#16
Took me a momment to realize it was C#.... And that is one of my favorite languages too.
- David
Senior Member
#17
thedqs wrote:Do you want my old textbook??? :D Anyway to get it properly balanced an A* search might work with the number of times that one speaks adds additional weight to the next state.
So in order to find the right algoirthm, you have to understand the nature of the problem. What are the goals? Should every unit be visited every month? Maximize the rest time between assignments for each individual, while keeping it evenly distributed? Should special circumstances be considered (like a month with Ward Conference or Stake Conference)? Perhaps the last question is solved by just doing an 11 month schedule and shifting it as needed.

Well, to continue with the A* idea until further discussion progresses here, I have been using this wikipedia page as a guide for the algorithm: http://en.wikipedia.org/wiki/A*_search_algorithm

In short, f(x) = g(x) + h(x) for each unexpanded leaf node off of all already expanded nodes in the tree. g(x) is the cost from the start node to the current node being considered. h(x) is an admissible heurisitic, meaning it must underestimate the distance to the goal (for example, if we were finding the shortest path between two cities, it could be the straight-line distance even if there is not a valid path along that distance; this is why it "underestimates"). All f(x) values get put in a priority queue where lowest f(x) cost is the first-out.

So I can think of a possible h(x) function: The number of unit-month combinations still unassigned. This will give higher priority to nodes that are nearing a solution.

I'm kind of at a loss for a good g(x) function.

I'm also thinking that this is similar to the 8 queens problem (see http://en.wikipedia.org/wiki/Eight_queens_puzzle), so maybe whatever solution solves that can solve this (maybe a backtracking algorithm or something).
Community Moderators
#18
Since we want to spread out the speaking assignments maybe g(x) could be the number of empty months at after the last speaking assignment so if you got all 12 months filled you'd get g(x) of 0 but if after 6 months g(x) would be 6 saying that you didn't get to the end of the year.
- David
Senior Member
#19
thedqs wrote:Since we want to spread out the speaking assignments maybe g(x) could be the number of empty months at after the last speaking assignment so if you got all 12 months filled you'd get g(x) of 0 but if after 6 months g(x) would be 6 saying that you didn't get to the end of the year.
Actually, what if g(x) is just the number of speaking assignments that individual already has assigned? That would give preference to those who currently have the least assignments. Wouldn't that give equal spacing between each assignment, while doing a round-robin approach? I'll see if I can do a proof of concept with it and post a diagram or something.
Member
#20
I'm just a lowly ward clerk guys, but I'm bored today and I coded up a quick-and-dirty round-robin solution that ensures a balance of speaking assignments and accounts for ward conferences, etc. The only problem is that it does not seem to (a) evenly distribute the effects of a speaker's schedule -- meaning, a speaker may get a cluster of assignments and (b) a speaker may visit a ward twice. How important are these?

I have been playing with some other stuff today and thinking in ksh, but I can send you the solution. I've been testing it with different numbers of wards and ward conference configurations (including multiple wards having conference the same month, and it seems to work well, given the two caveats above).
Former membership clerk under 3 bishops, now on 2nd stint as executive secretary. Can I go back to teaching priesthood now?
Member
#21
geek wrote:I'm just a lowly ward clerk guys, but I'm bored today and I coded up a quick-and-dirty round-robin solution that ensures a balance of speaking assignments and accounts for ward conferences, etc. The only problem is that it does not seem to (a) evenly distribute the effects of a speaker's schedule -- meaning, a speaker may get a cluster of assignments and (b) a speaker may visit a ward twice. .
Of course, as soon as I type that, I find a case that causes it to fail perfectly. That's what I get for ignoring my dissertation.
Former membership clerk under 3 bishops, now on 2nd stint as executive secretary. Can I go back to teaching priesthood now?
Senior Member
#22
mkmurray wrote:Actually, what if g(x) is just the number of speaking assignments that individual already has assigned? That would give preference to those who currently have the least assignments. Wouldn't that give equal spacing between each assignment, while doing a round-robin approach? I'll see if I can do a proof of concept with it and post a diagram or something.
Same here, I just type it and then realize my idea is flawed. Having only this as the g(x) is the same algorithm I already have in place, where it round-robins until it's done. The g(x) has to be expanded to include this AND something like what thedqs suggested, to try and give priority to spread out assignments.

Although, I don't know if any of this matters...I can imagine people want different things out of this application. Like with the example of 12 speakers and 6 units...My algorithm makes sure each unit gets visited and the assignemtns are all bunched together in the first 6 months. If I were to spread that out, then the other 6 speakers wouldn't speak that year and wards are only being visited every 2 months. This seems to be a hard algorithm to parameterize for the user, let alone just design the algorithm.
Senior Member
#23
geek wrote:I'm just a lowly ward clerk guys, but I'm bored today and I coded up a quick-and-dirty round-robin solution that ensures a balance of speaking assignments and accounts for ward conferences, etc. The only problem is that it does not seem to (a) evenly distribute the effects of a speaker's schedule -- meaning, a speaker may get a cluster of assignments and (b) a speaker may visit a ward twice. How important are these?

I have been playing with some other stuff today and thinking in ksh, but I can send you the solution. I've been testing it with different numbers of wards and ward conference configurations (including multiple wards having conference the same month, and it seems to work well, given the two caveats above).
In our stake, here are the important criteria

1. No one should speak at the same ward twice in a year (unless illness or other incidents such as military leave cause an absence by a high councilor).
2. Everyone should get roughly the same amount of "time off" from speaking.

Tom
Community Administrator
#24
tomw wrote:(unless illness or other incidents such as military leave cause an absence by a high councilor).
Which raises a issue. The program needs to re-calculate the assignments if there's been changes. A simple release/call isn't a big deal - the new counselor simply follows the schedule of the one that he replaced. But what happens when substitutions are made? Or new units created during the year? As well as carrying things over to the next year and not just "start over" and potentially getting "two in a row" between December and January.

Gee, it seemed so simple......
Have you searched the Help Center? Try doing a Google search and adding "site:churchofjesuschrist.org/help" to the search criteria.

So we can better help you, please edit your Profile to include your general location.
Senior Member
#25
RussellHltn wrote:Gee, it seemed so simple......
Yes, I'm beginning to wonder if expanding the app is worth the trouble.
Senior Member
#26
RussellHltn wrote:Which raises a issue. The program needs to re-calculate the assignments if there's been changes. A simple release/call isn't a big deal - the new counselor simply follows the schedule of the one that he replaced. But what happens when substitutions are made? Or new units created during the year? As well as carrying things over to the next year and not just "start over" and potentially getting "two in a row" between December and January.

Gee, it seemed so simple......
In our stake when a high councilor was sent to Iraq, the Stake Presidency decided to leave him in his calling as his deployment is expected to be short (a few months). Because of this, other high councilors filled in. I don't think that the application needs to worry about short term substitutions. Long term subs, however, should be considered.

The goal of the program should be to "suggest" a schedule and not to make it perfect. Some fine tuning would still need to be applied in many cases.

Tom
Community Administrator
#27
tomw wrote:Because of this, other high councilors filled in. I don't think that the application needs to worry about short term substitutions. Long term subs, however, should be considered.

The goal of the program should be to "suggest" a schedule and not to make it perfect. Some fine tuning would still need to be applied in many cases.
It all depends on how the stake wants to handle it. Having councilors fill in disrupts the schedule. If the stake want to re-calculate based on even a one-time substitute, then the program needs to be able to recalculate from that.

What I envision is a system that will calculate a schedule for a year, but then allow for manual entries to reflect special situations and give the option to recalculate from there. It's the stake's option whether they want to stick to the original schedule printed for the year or do a revised one with the help of the program.
Have you searched the Help Center? Try doing a Google search and adding "site:churchofjesuschrist.org/help" to the search criteria.

So we can better help you, please edit your Profile to include your general location.
Senior Member
#28
RussellHltn wrote:What I envision is a system that will calculate a schedule for a year, but then allow for manual entries to reflect special situations and give the option to recalculate from there. It's the stake's option whether they want to stick to the original schedule printed for the year or do a revised one with the help of the program.
It's a great idea. We just need to go through the process of picking an appropriate algorithm and mapping out the problem, perhaps with some tree diagrams or something.
New Member
#29
Thank you, Thank you, thank you! This saved me so much time. Took me longer to find your exe than to enter data. I'm a fairly new Stake Executive Secretary and you just made me look good. Thanks, again.