topic Re: Modelling optimal number of office desks with flexible working policies in Alteryx Designer Discussions
https://community.alteryx.com/t5/Alteryx-Designer-Discussions/Modelling-optimal-number-of-office-desks-with-flexible-working/m-p/738934#M176172
<P>Thanks Ben! I agree 108 would be the minimum, and did some additional thinking around the 'confidence intervals'</P><P> </P><P>I think for the 'simple' scenario, the confidence interval can be solved using simple statistics, where the 95% confidence interval is the mean (108) plus 1.98 * standard deviation (6.6), so about 121 desks. This should be sufficient on 95% of the days. Of course the issue is that it assumes every employee's probability of showing up on a given day is random at 60% (when in fact some days may be more or less popular).</P><P> </P><P>For the 'advanced' scenario, I think once we have the employee responses, we could either pick the day which seems the busiest, or do the calculation for each workday. We'd calculate each person' probability of showing up on that day - 1 for those who said "I'll always work that day", 0 for "never on that day", and for all the other ones who said "sometimes" calculate it based on their other responses (e.g. if we're looking at Wednesday, and an employee said they'd go to the office 3 days a week, always on Monday and never Friday, that means for Wednesday there's a 2 in 3 probability for this specific person). Based on this we'd get the mean (the 108 from the 'simple' scenario), and could use the combined individual probabilities to also calculate the 95% margin of error (although I'm not entirely sure how that calculation would work).</P><P> </P><P>If you manage to work something out with the Optimization tool, please let me know! In the meantime I'm trying to brush up my statistics knowledge for the calculations <span class="lia-unicode-emoji" title=":slightly_smiling_face:">ðŸ™‚</span></P><P> </P><P>Michal</P>Thu, 25 Mar 2021 10:52:35 GMTmichalklofac2021-03-25T10:52:35ZModelling optimal number of office desks with flexible working policies
https://community.alteryx.com/t5/Alteryx-Designer-Discussions/Modelling-optimal-number-of-office-desks-with-flexible-working/m-p/738905#M176160
<P>Hi everyone,</P><P> </P><P>I have a challenge which is perhaps more about statistics than Alteryx per se, but since I'd like to solve it using Alteryx I'm turning to the Community for help.</P><P> </P><P>A company is moving into a new office and needs to decide on the optimal number of desks. They have about 180 employees, but they know not all of them will be at the office every day in the post-covid reality.</P><P> </P><P>What would be the best way in Alteryx to build a model calculating the optimal number of desks, with corresponding confidence intervals (e.g. if the number of desks is sufficient on 95% of days, the company can rent extra meeting rooms on the remaining 5% of days, however if they would have to be renting extra rooms on e.g. 20% of days it would be better to just get more desks from the beginning)?</P><P> </P><P>For input assumptions, I consider two scenarios:</P><P> </P><P>- Simple scenario: assuming each employee spends the same number of days at the office (e.g. 3) and the days are entirely random for each employee</P><P> </P><P>- Advanced scenario: assuming the company runs a survey and finds out for each employee: (1) how many days on average will they spend at the office, (2) whether some days are more or less likely (i.e. for each weekday, whether they will "never be at the office", "always be at the office", "sometimes be at the office")</P><P> </P><P>I saw <A href="https://community.alteryx.com/t5/Engine-Works/COVID-19-Return-to-Work-Scheduling-with-Alteryx-MBA-Project/ba-p/595816" target="_blank" rel="noopener">https://community.alteryx.com/t5/Engine-Works/COVID-19-Return-to-Work-Scheduling-with-Alteryx-MBA-Project/ba-p/595816</A> , which is cool but a little high-level, not showing the actual modelling part.</P><P> </P><P>Many thanks to everyone for thinking along and/or tips!</P><P> </P><P>Cheers,</P><P> </P><P>Michal</P>Thu, 25 Mar 2021 09:05:29 GMThttps://community.alteryx.com/t5/Alteryx-Designer-Discussions/Modelling-optimal-number-of-office-desks-with-flexible-working/m-p/738905#M176160michalklofac2021-03-25T09:05:29ZRe: Modelling optimal number of office desks with flexible working policies
https://community.alteryx.com/t5/Alteryx-Designer-Discussions/Modelling-optimal-number-of-office-desks-with-flexible-working/m-p/738925#M176169
<P>Hi!</P><P> </P><P>This is a great question, I think the 'number of desks' can be solved with a bit of maths (though I could be wrong).</P><P> </P><P>If you want all employees to be in the office 3 days a week, and you have 180 employees then you need each employee to be in the office 60% of the time.</P><P> </P><P>60% of 180 is 108, this (I believe!) is the minimum number of desks that will allow you to achieve this level of attendance.<BR /><BR />Creating a 'timetable' is the interesting piece here and I'm just working on something that I can share with you later in the day using the optimization tool to do this.<BR /><BR />Ben</P>Thu, 25 Mar 2021 10:06:32 GMThttps://community.alteryx.com/t5/Alteryx-Designer-Discussions/Modelling-optimal-number-of-office-desks-with-flexible-working/m-p/738925#M176169BenMoss2021-03-25T10:06:32ZRe: Modelling optimal number of office desks with flexible working policies
https://community.alteryx.com/t5/Alteryx-Designer-Discussions/Modelling-optimal-number-of-office-desks-with-flexible-working/m-p/738934#M176172
<P>Thanks Ben! I agree 108 would be the minimum, and did some additional thinking around the 'confidence intervals'</P><P> </P><P>I think for the 'simple' scenario, the confidence interval can be solved using simple statistics, where the 95% confidence interval is the mean (108) plus 1.98 * standard deviation (6.6), so about 121 desks. This should be sufficient on 95% of the days. Of course the issue is that it assumes every employee's probability of showing up on a given day is random at 60% (when in fact some days may be more or less popular).</P><P> </P><P>For the 'advanced' scenario, I think once we have the employee responses, we could either pick the day which seems the busiest, or do the calculation for each workday. We'd calculate each person' probability of showing up on that day - 1 for those who said "I'll always work that day", 0 for "never on that day", and for all the other ones who said "sometimes" calculate it based on their other responses (e.g. if we're looking at Wednesday, and an employee said they'd go to the office 3 days a week, always on Monday and never Friday, that means for Wednesday there's a 2 in 3 probability for this specific person). Based on this we'd get the mean (the 108 from the 'simple' scenario), and could use the combined individual probabilities to also calculate the 95% margin of error (although I'm not entirely sure how that calculation would work).</P><P> </P><P>If you manage to work something out with the Optimization tool, please let me know! In the meantime I'm trying to brush up my statistics knowledge for the calculations <span class="lia-unicode-emoji" title=":slightly_smiling_face:">ðŸ™‚</span></P><P> </P><P>Michal</P>Thu, 25 Mar 2021 10:52:35 GMThttps://community.alteryx.com/t5/Alteryx-Designer-Discussions/Modelling-optimal-number-of-office-desks-with-flexible-working/m-p/738934#M176172michalklofac2021-03-25T10:52:35ZRe: Modelling optimal number of office desks with flexible working policies
https://community.alteryx.com/t5/Alteryx-Designer-Discussions/Modelling-optimal-number-of-office-desks-with-flexible-working/m-p/738958#M176183
<P><LI-USER uid="30893"></LI-USER> I've taken this on a bit further and have attached a workflow.</P><P> </P><P>Based on the '180 employees, 3 days a week, 108 desks' we can build an optimization model which provides a timetable for when employees can come into the office.</P><P> </P><P>You could use this timetable to line people up based on their given availability in the forms, or alternatively, you could adjust the workflow so that it has true employee availability (rather than the current view which is all employees can come in at any time).<BR /><BR />If the workflow errors 'no solution found' once you add in your employee avaibility, that is indicating that with the availability specified by your users, 108 desks simply won't work, so you could bump this figure up until a solution is identified, perhaps you could start with your 121 desk figure. To do this you would change the formula given in tool 29, where the 'RHS' specifies the capacity.</P><P> </P><P><span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="BenMoss_0-1616672094210.png" style="width: 400px;"><img src="https://community.alteryx.com/t5/image/serverpage/image-id/177559iFBC259997333E92E/image-size/medium?v=v2&px=400" role="button" title="BenMoss_0-1616672094210.png" alt="BenMoss_0-1616672094210.png" /></span></P><P> </P><P>I hope this is somewhat useful, i'll probably blog this at some point in the next week as it's certainly an interesting usecase!</P><P> </P><P>Ben</P>Thu, 25 Mar 2021 11:35:53 GMThttps://community.alteryx.com/t5/Alteryx-Designer-Discussions/Modelling-optimal-number-of-office-desks-with-flexible-working/m-p/738958#M176183BenMoss2021-03-25T11:35:53ZRe: Modelling optimal number of office desks with flexible working policies
https://community.alteryx.com/t5/Alteryx-Designer-Discussions/Modelling-optimal-number-of-office-desks-with-flexible-working/m-p/739173#M176278
<P><LI-USER uid="5143"></LI-USER> thanks for sharing, this is great! I haven't really worked with the Optimization tool much in the past, so this was very instructive, and definitely helpful for the actual challenge.</P><P> </P><P>As a matter of curiosity, how far can the Optimization tool be stretched in terms of more complex constraints? E.g. if we wanted several people (a certain team) to be at the office all together for at least one day in the week, would it be possible to include that in the analysis?</P><P> </P><P>I can imagine you could always do a workaround, e.g. specifying upfront that everyone from Finance must be at the office on day1, and only letting the Optimization optimize the other variables, but am wondering if there is a more dynamic approach (e.g. if you have multiple teams who each want to have their members at the office together, but don't care if it's the same day as the other teams or not - so you'd actually want the Optimization to consider different combinations, together with all the other constraints).</P><P> </P><P>Michal</P>Thu, 25 Mar 2021 17:46:11 GMThttps://community.alteryx.com/t5/Alteryx-Designer-Discussions/Modelling-optimal-number-of-office-desks-with-flexible-working/m-p/739173#M176278michalklofac2021-03-25T17:46:11ZRe: Modelling optimal number of office desks with flexible working policies
https://community.alteryx.com/t5/Alteryx-Designer-Discussions/Modelling-optimal-number-of-office-desks-with-flexible-working/m-p/739619#M176451
<P>I believe the Alteryx optimization tool leverages linear programming logic such as PuLP, in Python; see <A href="https://medium.com/analytics-vidhya/optimization-modelling-in-python-scipy-pulp-and-pyomo-d392376109f4" target="_blank">Optimization Modelling in Python: SciPy, PuLP, and Pyomo | by Igor Shvab | Analytics Vidhya | Medium</A></P>Fri, 26 Mar 2021 14:55:33 GMThttps://community.alteryx.com/t5/Alteryx-Designer-Discussions/Modelling-optimal-number-of-office-desks-with-flexible-working/m-p/739619#M176451FBradbury_dup_1062021-03-26T14:55:33ZRe: Modelling optimal number of office desks with flexible working policies
https://community.alteryx.com/t5/Alteryx-Designer-Discussions/Modelling-optimal-number-of-office-desks-with-flexible-working/m-p/739686#M176481
<P>No problem at all, I've written a blog on it now and it's with Alteryx to publish, so look out for that in the near future. In the blog I've used a usecase whereby employees specify the minumum and maximum number of days they would like to be in the office each week, so that complicates the example I shared above a bit further.</P><P> </P><P>Good question, as you say, I think if you specify a specific day then it's quite simple as you could just inform the model which employees belong to which team, and then add a constraint for a specific weekday which indicates that each members of that team must be in; I'm trying to rattle my brain on how we could adjust the data structure to essentially do an 'or' constraint, I'm sure it's possible but not on a Friday afternoon brain!</P><P> </P><P>Regards optimization, it can definitely get way complex, this is a simple linear example, but the tool also supports mixed interger and quadratic optimization too. The tool itself uses R under the hood, and makes reference to a package called 'ROI', linked below..</P><P> </P><P><A href="https://cran.r-project.org/web/packages/ROI/index.html" target="_blank">https://cran.r-project.org/web/packages/ROI/index.html</A></P><P> </P><P>Ben</P>Fri, 26 Mar 2021 16:19:55 GMThttps://community.alteryx.com/t5/Alteryx-Designer-Discussions/Modelling-optimal-number-of-office-desks-with-flexible-working/m-p/739686#M176481BenMoss2021-03-26T16:19:55Z