Share My Creation [B4J] WorkersShifts using Google OR Tools

Hi there,

I want to share an Example based on Tutorial and Help of @Johan Schoeman - understand and created a Worker/Employee Shift Generator... using Google OR Tools (a great library that seems working only at Windows)...

You can get more info from here: https://www.b4x.com/android/forum/threads/google-or-tools.118623/post-1029478

You will need to download libraries and dll and copy them to specific directories as Johan saying at the Thread.

You can download my example project for B4J from here...

I wanna Thank Johan for his work and his help to understand the Google OR Tools !
 

Attachments

  • WorkersShifts.zip
    6.6 KB · Views: 42

Johan Schoeman

Expert
Licensed User
Longtime User
Hi there,

I want to share an Example based on Tutorial and Help of @Johan Schoeman - understand and created a Worker/Employee Shift Generator... using Google OR Tools (a great library that seems working only at Windows)...

You can get more info from here: https://www.b4x.com/android/forum/threads/google-or-tools.118623/post-1029478

You will need to download libraries and dll and copy them to specific directories as Johan saying at the Thread.

You can download my example project for B4J from here...

I wanna Thank Johan for his work and his help to understand the Google OR Tools !
You have done a great job with it @Magma. Well done!

JS

B4X:
Call B4XPages.GetManager.LogEvents = True to enable logging B4XPages events.
Nick / 1 / Night / Want to work: false
Nick / 4 / Morning / Want to work: false
Nick / 5 / Night / Want to work: false
Nick / 6 / Night / Want to work: false
George / 2 / Night / Want to work: false
George / 3 / Afternoon / Want to work: false
George / 4 / Night / Want to work: false
George / 6 / Morning / Want to work: true
Johan / 0 / Afternoon / Want to work: false
Johan / 2 / Afternoon / Want to work: false
Johan / 4 / Afternoon / Want to work: false
Johan / 5 / Morning / Want to work: false
Johan / 6 / Afternoon / Want to work: false
Erel / 0 / Morning / Want to work: true
Erel / 1 / Morning / Want to work: true
Erel / 2 / Morning / Want to work: true
Erel / 3 / Morning / Want to work: true
Jenny / 0 / Night / Want to work: false
Jenny / 1 / Afternoon / Want to work: false
Jenny / 3 / Night / Want to work: false
Jenny / 5 / Afternoon / Want to work: false
 
Last edited:

Johan Schoeman

Expert
Licensed User
Longtime User
You have done a great job with it @Magma. Well done!

JS

B4X:
Call B4XPages.GetManager.LogEvents = True to enable logging B4XPages events.
Nick / 1 / Night / Want to work: false
Nick / 4 / Morning / Want to work: false
Nick / 5 / Night / Want to work: false
Nick / 6 / Night / Want to work: false
George / 2 / Night / Want to work: false
George / 3 / Afternoon / Want to work: false
George / 4 / Night / Want to work: false
George / 6 / Morning / Want to work: true
Johan / 0 / Afternoon / Want to work: false
Johan / 2 / Afternoon / Want to work: false
Johan / 4 / Afternoon / Want to work: false
Johan / 5 / Morning / Want to work: false
Johan / 6 / Afternoon / Want to work: false
Erel / 0 / Morning / Want to work: true
Erel / 1 / Morning / Want to work: true
Erel / 2 / Morning / Want to work: true
Erel / 3 / Morning / Want to work: true
Jenny / 0 / Night / Want to work: false
Jenny / 1 / Afternoon / Want to work: false
Jenny / 3 / Night / Want to work: false
Jenny / 5 / Afternoon / Want to work: false
Visually it looks like this - I will be working the most shifts But all days covered by all 3 shists. And no double shift for anyone. Might be a quick change as be off for one shift and then back to shift again.

Green = shift requested
Red = Shift not specifically requsted.

1753983356538.png
 
Last edited:

Magma

Expert
Licensed User
Longtime User
It is very good library for automatic-schedule... can help in many projects - and then manually the user can make some changes if he wants...

But generally seems a fair work/job time sharing..

ps: You will work one more time... but you ll get your payment... ;-)
 
Top