Split Prod Calendars

Looking for some quick input on something ProdCal related. We are having an issue since upgrading to 2024.2 where on occasion a job will generate in MRP without any dates and when you go to try and finite schedule it it throws the exception below

System.InvalidOperationException: Nullable object must have a value.
   at System.Nullable`1.get_Value()
   at Erp.Internal.ES.SchedEngine.mvOpSchedJobBwd(Nullable`1 PassedDueDate, Decimal`1 PassedDueHour) in C:\_releases\ERP\ERP11.3.200.5\Source\Server\Internal\ES\SchedEngine\SchedEngine.cs:line 17504
   at Erp.Internal.ES.SchedEngine.processJob(Boolean isFirstProcess) in C:\_releases\ERP\ERP11.3.200.5\Source\Server\Internal\ES\SchedEngine\SchedEngine.cs:line 22350
   at Erp.Internal.ES.SchedEngine.MoveJobItem(String ttScheduleEngineCompany, String ttScheduleEngineJobNum, Int32 ttScheduleEngineAssemblySeq, Int32 ttScheduleEngineOprSeq, Int32 ttScheduleEngineOpDtlSeq, Nullable`1 ttScheduleEngineStartDate, Int32 ttScheduleEngineStartTime, Nullable`1 ttScheduleEngineEndDate, Int32 ttScheduleEngineEndTime, Boolean ttScheduleEngineWhatIf, Boolean ttScheduleEngineFinite, String ttScheduleEngineSchedTypeCode, Boolean ttScheduleEngineOverrideMtlCon, Int32 OverRideHistDateSetting, Boolean ttScheduleEngineScheduleDir, Boolean il_surpressexceptions, Int32 ttScheduleEngineAllocNum, String& WarnLogTxt, Boolean ttScheduleEngineMinimizeWIP, Nullable`1 ipOverrideBounceDate, Boolean useLotExpiration) in C:\_releases\ERP\ERP11.3.200.5\Source\Server\Internal\ES\SchedEngine\SchedEngine.cs:line 14043
   at Erp.Internal.ES.SchedEngine.MoveMRPJob(String ttScheduleEngineCompany, String ttScheduleEngineJobNum, Int32 ttScheduleEngineAssemblySeq, Int32 ttScheduleEngineOprSeq, Int32 ttScheduleEngineOpDtlSeq, Nullable`1 ttScheduleEngineStartDate, Int32 ttScheduleEngineStartTime, Nullable`1 ttScheduleEngineEndDate, Int32 ttScheduleEngineEndTime, Boolean ttScheduleEngineWhatIf, Boolean ttScheduleEngineFinite, String ttScheduleEngineSchedTypeCode, Boolean ttScheduleEngineOverrideMtlCon, Int32 OverRideHistDateSetting, Boolean ttScheduleEngineScheduleDir, Boolean il_surpressexceptions, Int64 instancetasknum, Int32 ttScheduleEngineAllocNum, Nullable`1 GlobalBounceDate, Boolean ttLogfile, String& WarnLogTxt, Boolean useLotExpiration) in C:\_releases\ERP\ERP11.3.200.5\Source\Server\Internal\ES\SchedEngine\SchedEngine.cs:line 14513 --- MoveMRPJob

Here are two MRP generated records that are both unfirm and what difference we are seeing that causes the issue.

Anyways support is telling me that our issue is split prod calendars, but

  • First of all, if you have a resource available from say 6pm to 6am you have to split but itā€™s not really split? orā€¦?
  • Second, we have been running this way since 9.05.602A without issue, soā€¦ ā€œweā€™ve been lucky for 12 yearsā€ I donā€™t know about that
  • Third, when I add 4pm and 5pm to the calendar below the dates generate in MRP correctly, but itā€™s still a split calendar. (If I add 8, 9, 10, 11 dates donā€™t generate either. Itā€™s all sorts of whack)

Iā€™m just looking for validation that there shouldnā€™t be any issue with running a calendar split like this. The reality from a scheduling perspective is Epicor doesnā€™t support scheduling employees (cross shift issues) so really all we can do is constrain our machineā€™s calendars to when we have employees roughly available to run them. Essentially due to employee constraint yes a 5 hour job could be scheduled for 12 and that would be unfortunately accurate. I wouldnā€™t want it to schedule it for 5 hours from a Gantt chart perspective.

Also has anyone else seen an uptick in this issue with 2024.2? I have seen this error many other times throughout the system over the years, but never in Job Entry and never consistently (avg 1-2 per week). Workaround is schedule it infinitely.

3 Likes

Not the answer you want, but I was always told (from back @ 9.05) that you never split the calendar like this, as it will ā€˜confuseā€™ the scheduler.

Weā€™ve not made it work the way youā€™ve historically had working. Weā€™re in the same boat you are with co-dependent machine/people resources required for operations that create the same scheduling problem.

Iā€™m curious though, if the scheduler got some sort of re-write or what exactly happened, since itā€™s no longer working for you.

2 Likes

If I watch the job generate via MRP and I keep refreshing I can see it gets dates for a bit during MRP and then the dates are cleared. Pretty much all of our machines run split schedules and have for years, but we only see this on random jobs now and again since the upgrade. The MRP logs were not super helpful either.

Other weirdness is one job we fixed by changing the ReqDueDate, saving, changing it back, then running scheduling and it was fine. 3 of the jobs were not correctable this way.

We have restored the DB 4 times to our KineticProblem DB and every time the fix seems different. Ran some conversions, cleared ShopLoad/ShopCap/ResourceUsedTime tables, changed calendars. At any given time one of those has fixed the issue, then I restore to validate and itā€™s not fixed by the same actions. Itā€™s not consistent at all. I can consistently create the issue from a restore, but I canā€™t consistently fix it.

1 Like

I would recommend putting in an Idea for this. Epicor appears to be moving towards more time-of-day type stuff (notice the ā€œShip By Timeā€ field on Order Entry), and if that is the case then the Production Calendar and Scheduling functionalities are going to need a LOT of love real soon now.

5 Likes

You just have to hate when this is happening. My gut is telling me that code is finding a failure point in the 2-pass scheduling code and resetting the operation dates. Finding it is going to be a problem though.

Iā€™m sure youā€™ve iterated through all the scenarios to see if material vs resource availability is a problem, eliminating one or the other.

I reached out to our planner and the few times weā€™ve seen wonky dates, she has simply changed the date on the job and rescheduled successfully to a new accurate set of dates. Iā€™m on 2021.1 right now and I may have the same problem just from the opposite direction - youā€™re seeing it from an availability angle, and Iā€™m sure weā€™re seeing it from an overload angle.

I agree with @Ernie - an Idea is needed to get this on the books.

There is my Idea from a little while ago Job Operation should allow sequential resource scheduling that needs some votes. Maybe we can get some momentum on it.

Iā€™ll also let you know that Iā€™ve got CSG involved on this. They cannot change the Schedulerā€™s code, but weā€™ve found an unused field that will allow us to run a second scheduling function to reorder the person resources they way we need it to. Itā€™s nowhere near complete, but the POC is done and weā€™re looking at how to build a new Gannt-style interface for the new dataset.

Continuing the rabbit trailā€¦

Whenever we start talking about ā€œtimeā€ as in time-of-day, itā€™s also going to affect the System Agent, Scheduled Tasks, and (shudder) Time Zone Management. Daylight Savings Time issues and all that.

I feel pretty comfortable saying that when the System Agent functionality and the Scheduling functionality were originally written (and to the best of my knowledge, they havenā€™t changed substantially since at least Vantage 8), global time issues were probably not at the forefront of the programmersā€™ minds. Any idea around this is gonna be way more than a band-aid.

My last company saw the same weirdness with a split calendar and the consultant told us NOT to split the calendar. We removed the blank checkboxes in the middle and our issues were resolved. This was on version 2023.2 or 2024.1

1 Like

Good to see/hear from you man!

Further update from meā€¦we were using Finite Scheduling also. To get the employee constraint needed, we added a second resource to the operation for the employee constraint. So two machine could be available for two shifts but maybe second shift only had one employee capable of running them and so could only be sheduled for one machine or other machine (but not both)

2 Likes

Weā€™re doing the same, but have the virtual person resource scheduled for 20hrs a day which equals two non-virtual people on 10 hr shifts. All because the Scheduler cannot use multiple person resources on single operation in sequence, but rather only simultaneously.

Updated all calendars to non split calendars and the issue still exists. I went as far as deleting all jobs on the same resources until I found the 1 that was causing the issue. No idea why itā€™s causing an issue yet, but I can reproduce over and over if I delete this other job from the schedule I can schedule the job throwing the null error, as soon as I put that other job back on the schedule MRP derps out on my broken job. There is data corruption somewhere happening but no idea where. The other thing that can fix it is if I push the req due date of the job out like 6-7 weeks then it will schedule just fine too. Itā€™s like itā€™s hitting a scheduling constraint and not gracefully handling it.

Also I contend in some cases it would be impossible to not have a split calendar. For example say you have a resource that is available only from 7pm to 7am. You will have a ā€œsplit calendarā€ as far as a given day is concerned. This should not be an issue, if thatā€™s the case then epicor shouldnā€™t give us checkboxes, just a number box asking how many hours a day a resource is available and call it good. At that point much like the points in whoā€™s line the time wonā€™t matter. Not much of a schedule if your start and end times are arbitrary.

Weā€™ve literally run split schedules for 12 years and never once had an issue until 2024.2. I canā€™t imagine weā€™ve just been lucky for 12 years.

Push come to shove, an MSCoreLib exception should not be bubbling up in MRP they have an unhandled exception that needs to be addressed.

5 Likes

That sucks.

I was told that as long as the available hours did not have a split, you could do the 7am to 7pm checkboxes without an issue. Itā€™s what I was told, and I questioned it because I thought it should be like you said. In fact, I was trying to make the machine unavailable for the lunch ā€œhourā€ and was told not to do that, but rather make the machine available for 1 hour less per day and it would ā€˜work itself outā€™.

Totally Agree. And an adjustment to the scheduler code should then allow linear resource allocation since itā€™ll ignore the ā€˜scheduleā€™ for the resource.

Wish I could be a fly on the wall for this troubleshooting session. Would learn so much from yā€™all.

Iā€™m glad you are getting further along with it.

Ever watch Lewis Black stand-up? It sounds a lot like that mixed with some Ron White by the end of the day.

3 Likes

No I donā€™t believe I have haha