• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Jeanne Boyarsky
  • Ron McLeod
Sheriffs:
  • Paul Clapham
  • Liutauras Vilda
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
Bartenders:

new Project "automatic employee scheduling software", need some advice

 
Ranch Hand
Posts: 210
Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

I am thinking about starting a project and would like to ask first if it is possible to do in java, and if so how should i go about starting it?

I want to create a employee automatic work scheduler. That means that i would like to have a scheduler that creates automatically a work schedule for one month based on different variables for each employee.

(Some of the variables i can think of at the moment):

1. different employees have different amounts of hours that can be worked in one month.

2. certain employees are allowed to open and close(they can have a key). They would need to switch between the early shift to open and the late to close(one has late the other then has to have early).

3. can't be scheduled if they have vacation or a day off.

4. must have at least 1 work day off in a 6 day work period.

5. would need to have the employee switch from one day early to the next late unless specified they have a fixed shift daily.


I am sure i will think of more variables as i start this if it is even at all possible to do. This schedule must then be printable to possibly an open office document or PDF or something similar.

I am still pretty much a beginner although i have allot of the core java learned at this point (the rest i will have to figure out in time). This would actually be something i can use in real life , not just an idea out of the blue.I also
realise this will be a major project (at least for me lol)!!

any thoughts or ideas on beginning this would be much appreciated!!

PS: I don't want anyone to show me code for this, i just never really planned a larger project and would like some ideas on how i should start doing that, plus just want to know if something like this is even possible before i start and can never finish;)


Thanks Mike
 
Bartender
Posts: 563
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
A GUI program? I'll assume so.

I am sure i will think of more variables as i start this if it is even at all possible to do. This schedule must then be printable to possibly an open office document or PDF or something similar.



My recommendation is that you think about it a lot more. Write your thoughts down. Divide what you write down into program requirements, data requirements, and implementation specifics. When you start writing down your implementation specifics, draw sketches of what the GUI interfaces will look like. As you sketch, answer questions like, "What what will the interfaces do?" What components are required to accomplish that?" "How will the user know what to do?" "What data is required?"

As you go through that process from start to finish for each of the program's functions you'll come up with new requirements, implementation details you hadn't thought of, data requirements that aren't obvious.

Think it through until you think you've absolutely thought of everything and written down your thoughts, solutions, GUI sketches, implementation details, etc. THEN start programming. You'll find that roughly an equal number of new thoughts, requirements, questions, etc. will occur to you while you're writing the code, but that's okay. It's better to have even a 50% plan before writing a single line of code than to have no plan at all.
 
Greenhorn
Posts: 29
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Speaking more as a mathematician than as a Java coder, this could be quite a difficult problem. Coding the front end to the algorithm that decides on the schedule will be non-trivial, but it's certainly doable, and it sounds like a good exercise with plenty of opportunities to learn new things. You can make it as simple or as complex as you like. But before beginning the coding process, make sure that you understand how the schedule will be determined -- how the algorithm works. Depending on the number of employees, you may find that the problem is harder than you expect.
 
Marshal
Posts: 80281
432
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Have you come across constraint programming? That is a branch of logic programming, supported by languages such as Prolog and Oz. In constraint programming, you can attach constraints (rules) to employee objects and the program can calculate a schedule very rapidly. One of our undergraduates did something similar for room availability about two years ago here. But that was in Oz. I don't think Java™ supports constraint programming, however.
 
mike ryan
Ranch Hand
Posts: 210
Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

Thanks to all of you for the feedback,I realised myself after thinking about how this program could work, that it will be very difficult to do.That is why i asked the experts here if it would even be possible,now the question is "will it be possible for me!!". I think this will be a chance to learn allot about the language and specially about algorithms.I just recently bought a book about algorithms, i forget the name at the moment,it is i think a little bit over my head mathmatically.I hope i can get some insight about how to do algorithms though from it.

I will do as Greg wrote and start with a pencil and paper, and see if i can work out a model, i also don't have much experience with interfaces and static methods, so i will probably make some poor choices to begin with i imagine, but will learn from the mistakes!!
I will keep you all posted on my progress, i also have to finish my Correspondence course in the next few months as well;)greg is correct this will be a GUI.

PS:

Thanks to all(and keep the tips comming;))

Mike
 
Campbell Ritchie
Marshal
Posts: 80281
432
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Get the logic behind it to work, and you can work out static methods later.
 
mike ryan
Ranch Hand
Posts: 210
Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Campbell,

Thanks again for the advice, i did some searching about Constraint programming and came across this software called "Drools Planner" , that is open source as well.
Sounds like it can do pretty much what i wanted to do. here is a link to the website --> click me!
I think i will first attempt this on my own for learning purposes although i have a feeling it will be a bit difficult for me at this time but that won't stop me from trying anyway;) but when a Mathmetician says it will be hard then i get nervous lol.

Mike
 
Sheriff
Posts: 28371
99
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

mike ryan wrote:but when a Mathmetician says it will be hard then i get nervous lol.



When we mathematicians say something is "hard", we're talking about the perfect solution. However in real life it's quite often sufficient to produce a "good enough" solution. Your employee-scheduling software may not scale up to be useful to, say, the State of California, but don't let that stop you from producing something that could be useful for a 10-person office.
 
mike ryan
Ranch Hand
Posts: 210
Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks Paul, I will give it a try for sure. It is for a store with about 7 to 10 employees. I was just looking at the users manual for the Drools Planner and it showed some of the methods used in it.Is pretty complex so i stopped looking at it to see if i can find my own possibly simpler way to do it as i think ,as you said mine will not need to be at first so complicated.

Also just a note because i mentioned earlier that i bought a book about algorithms in java,the name is "A Concise and Practical introduction to Programming Algorithms in Java " written by Frank Nielson. Just in case that may intrest someone. I haven't read much yet as i haven't had time.Maybe if someone has read it they can let me know if it is a good book on algorithms.


Thanks again
Mike
 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

mike ryan wrote:I was just looking at the users manual for the Drools Planner and it showed some of the methods used in it.Is pretty complex so i stopped looking at it to see if i can find my own possibly simpler way to do it as i think ,as you said mine will not need to be at first so complicated.



You could probably just copy-paste large parts of the nurse rostering example from Planner.

What makes Planner look complex? Would a "quick start" section in the reference manual help to distinguish between the base stuff and the advanced stuff?
 
Campbell Ritchie
Marshal
Posts: 80281
432
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Welcome to the Ranch

It is surprising how concise and simple constraint programming code can look. Google for a tutorial and have a look.
 
mike ryan
Ranch Hand
Posts: 210
Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Geoffrey,

Well i am still pretty new so allot of things look complex to me;) , but the main point is that i want to try to work it out on my own. It may be that in the end i will look closer at the Drools docs if i don't get anywhere on my own. I think it will take me a while just figuring out what i need to do on paper and then figure out how to put it all together.

I am guessing that you have done some work or working on this Software? If so stay tuned i will probably need your help ;)

Mike
 
mike ryan
Ranch Hand
Posts: 210
Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

So i am sitting here with a bit of free time and starting on my project. I have lots of paper and a pen/pencil at hand.AND... i am already stuck not knowing exactly how to do this lol.

I have so far started writing down all the things i can think of that i need. Is there any concrete way people begin a project? Or does everyone get there own flow over time? Just curious if there is some kind of "Rule of thumb" to follow here?
I can see already that there will be a problem with knowing what i will use for certain tasks, and what will make the most sense. For instance i have the employees, a few are full time and a few are part time . Do i use an Array? of just the names, then another class for full and part time? or do i make an array fullTime[], and an Array partTime[]; Should i even use an Array? hehe so i see this will be fun right from the beginning...

if anyone has a good rule of thumb to follow or some suggestions in general how you might go about this(keeping in mind i am a beginner). I was thinking to start just taking one single part and getting that done like the employees Class i suppose. Just figuring out how to put that, and the variables associated to the employee in some logical order.

things i know i need:

* Store hours are from 09:00 until 20:00

* 2 shifts 09:00 till 18:00 and 11:00 til 20:00

* full time employees work 8 hours a day (1 day off in a 6 day workweek mandatory).

* part time employees work minimum 87 hours per month max 40 hrs a week.(this depends on the time of year which i also need to somehow factor into this).

* part time must also have 1 day off in a 6 day workweek

* there must be at least 2 employees in the early shift and 2 in the late shift

* the store has alloted man hours for the month of 792hrs. (this can also change monthy)

* have to be able to add vacation dates in when they have been planned.(Vacation is not taken at any mandatory time but chosen by the employee)+(Vacation = 30 days a year which could possibly be controlled with this plan as well)

* meetings and such must also be able to be added same as vacation.

*employees must be able to be added or deleted as needed

that is all that i could think of at the moment, just so you get an idea , but is more than enough to keep me busy for now ;)

I have set my time limit to "when i retire" so i have like 22 years or so ...




Thanks
Mike
 
Paul Clapham
Sheriff
Posts: 28371
99
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Whoa, whoa! What do you mean, should you use an array?

You're talking about programming. You aren't nearly ready to do any programming. You don't even have a design yet. My suggestion would be to start by designing your data model. That would involve identifying classes (like maybe Employee, Shift, EmployeeShiftAssignment, and so on) and their attributes. Then you can design some processes which work with those objects and do things with them. When you do this you're bound to find attributes, or even classes, which you missed. Carry on until you have a coherent-looking design.

I would also recommend tossing out some the more complicated-looking requirements, or at least relegating them to a "Version 2" list. Do something very simple for Version 1 and make sure it works well before moving on. It's very likely that Version 2 will require modifying your data design, but that's normal in the systems development world, so don't be tempted to put things into your Version 1 design which won't be used until Version 2. Keep it simple to start with.
 
mike ryan
Ranch Hand
Posts: 210
Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Paul,

Good advice thank you. OK i will try it like that first, will see if i get anywhere ;)

Thanks
Mike
 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
We''ve tried to do something at Hello Scheduling a number of times in the past. This is a much more difficult problem than it sounds. At Hello Scheduling, employees get "tags" -- tags represent a skill that is required for the shift, like the ability to turn off the alarm -- and then our algorithm tries its best to take into account employee time preferences, shift "tag" requirements, vacation, etc. Incredibly difficult to do, and not for the faint of heart.
 
mike ryan
Ranch Hand
Posts: 210
Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Jon,

Thanks for your input. And yes i figured before i even started this thread that it would be difficult, especially for a Beginner such as myself , but I think if i try it and make it really simple and have only a couple
preferences to begin with, even if i don't get it to work perfect it will still be a good learning experience for me, maybe a real headache as well hehe.
It may help me to understand how to implement algorithms or at least how to go about it(or how NOT to go about it ;) )

Thanks
Mike
 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Wow this is like exactly what am trying to do for my final year project in school!!am still learning when it comes to java,but I have someone helping me through it,but I also need more help in the design,I have an idea of how the interface will be,but now my netbean IDE isn't functioning properly not sure why
 
First, you drop a couch from the plane, THEN you surf it. Here, take this tiny ad with you:
Smokeless wood heat with a rocket mass heater
https://woodheat.net
reply
    Bookmark Topic Watch Topic
  • New Topic