다음을 통해 공유


‘Production order #### could not be scheduled. Not enough capacity could be found.’ - How to get to the bottom of this.

A few times already I’ve been asked to investigate customer cases that went something like this:

Create a production order for some item from the standard test data.

Schedule the order (job scheduling or operation scheduling, doesn’t matter).

Expected result:
The order gets scheduled.

Actual result:
Production order ### could not be scheduled. Not enough capacity could be found.

 

In some cases it turned out it was a product bug. In other cases the message was perfectly valid.

The question is: how would you, as a user, know what’s happening? How would you figure out why capacity was not found?

Ideally the scheduling engine should not only return a dull message saying that it didn’t find enough capacity. It should come up with a reason or a trace or something you could analyze. And we sincerely hope that in future releases we will get to enhance the error reporting of the scheduling engine! But until then, here is a list of things you can do when you get the error:

1. Check if there are any applicable resources that satisfy the operation requirements at the production order site.

Path:
Production order list page – chose the production order that can’t be scheduled – Production details – Route – chose the operation that’s causing the failure – Applicable resources – check if you have any applicable resource on the production order site


 

Img 1 – There are applicable resources, but none on the production site

 

2.  If it turns out that there are no available resources at the production order site, make sure you have resource requirements enabled for the type of scheduling you are doing: operations vs job.

Path: Production order list page – chose the production order that can’t be scheduled – Production details – Route – chose the operation that’s causing the failure – Applicable resources – toggle ‘Use requirements for’ between Job and Operation scheduling.

 

 

3.  Make sure you have calendars associated to the resources/resource groups identified as applicable and that the calendars have working times and that efficiency percentages are not 0.

Path: Production order list page – chose the production order that can’t be scheduled – Production details – Route – chose the operation that’s causing the failure – Applicable resources – for each applicable resource right click and or click
View resource – Resource form – Resource groups – make sure there is a Calendar associated with the resource.

If there is a calendar, make sure it has working times: right click on the Calendar and View details or Organization administration – Calendars – Calendars – chose the calendar – Working times and check the form is not empty or that the days don’t have Control set to Closed. Pay attention to the base calendars as well, and make sure they have working times and correct efficiencies and the days are not closed.

If the error occurs during Operations scheduling, make sure that there is a calendar on all the applicable resource groups.

In operations scheduling, the resource group’s calendar is used for determining the start and end times and dates for each operation. The resource group’s calendar puts a limit on how much time that can be operations scheduled for one specific
operation for one specific day in one specific resource group. For example, if the working time for a resource group on one specific date is between 8-16, one operation can’t put more load on the resource group than what can be fit into 8 h, no matter how much capacity that the resource group has available on that day. The available capacity can however limit the load further

 

4.  Due to performance reasons, the scheduling engine will only search for a resource for a certain time/number of scheduling conflicts encountered. Make sure that in Organization Administration - Setup - Scheduling - Scheduling parameters you
haven't turned on any of the scheduling parameters. If you did, try to change the values and reschedule the order.

 

5.  If you are doing finite scheduling, it may very well be that you really have no free capacity. To make sure this is not the case, you can either:

 

6.  Revert to doing infinite scheduling, by un-checking Finite capacity check box during scheduling.

 

7.  Check the available capacity on the resources/resource groups applicable for the operations that couldn’t be scheduled.

Path: Resources/Resource groups form, opened either by View details or from Organization administration – View – Capacity load or Capacity load, graphically and make sure there is available capacity.

 

8. And if none of the above worked, then you need to revert to more ‘serious’ stuff – doing scheduling engine diagnostics, by enabling logging. Here’s how you do it.

(Note: you’ll need to have extended permissions to some files and the AX database in order to perform this, so if you are a production planner, shop floor supervisor, etc you will need to contact your internal AX support person to help you)

First of all, you need to know that the scheduling engine can produce 3 logs:

  1. Log that gives you the full picture of all the input data that the scheduling engine will work with when trying to figure out the schedule for the production order: list of jobs/operations that need to be scheduled, applicable resources, scheduling constrains, etc

Log file name : Program Files\Microsoft Dynamics AX\60\Server\MicrosoftDynamicsAX\Log\SchedulingDataModel_[funky_numbers_here].xml

It is pretty easy to read. Look at this log in order to determine if the correct input information is fed to the scheduling engine.

       2.  Log with all the available capacity slots that the engine receives for scheduling – we will not get into details about who is providing these slots and so on, what is important to understand is that basically these are the available resource working times, based on the calendars associated with the resources.

Log file name : Program Files\Microsoft Dynamics AX\60\Server\MicrosoftDynamicsAX\Log\SchedulingSlots_[funky_numbers_here].xml

It is also fairly easy to read. Look at this log to see if the capacity slots that are sent to the engine make sense.

     3. Log with all the capacity reservations that the scheduling engine wants to make, that should be saved in the AX database.

Log file name: Program Files\Microsoft Dynamics AX\60\Server\MicrosoftDynamicsAX\Log\SchedulingResults_[funky_numbers_here].xml

This is basically the scheduling result.

           

By default, the scheduling engine does no logging at all, so none of the above files will be created. So how do you enable these logs? You go to Program Files\Microsoft Dynamics AX\60\Server\MicrosoftDynamicsAX\bin, open SchedulingEngine.config and set:

UseXmlOutput = true, in order to generate SchedulingDataModel_[funky_numbers].xml

UseSlotsXmlOutput = true, in order to generate SchedulingSlots_[funky_numbers].xml

LogResults = true, in order to generate LogResults_[funky_numbers].xml

 

 

Don’t bother with LoggerEnabled and LogVerboseEnabled - they are there just for historical reasons and are, in fact, never used. LogToTextFile will be explained later.

Don’t bother to stop/restart the AOS – no need for that in order to enable logging.

Now, as soon as you schedule your production order again, you’ll get the log files.

These logs that you’ve just got are very generic, as you can see, so it would be a huge step forward for us if a ‘Not enough capacity found’ customer case had these attached!

I will not go now into detail about the fields in the logs, what they mean and so on – this will be explained in a future post, more technical. What you can do until then is play with different parameters, play with applicable resources, play with different route parameters and you will get a decent understanding, I believe.

So what does LogToTextFile do? Up until now we’ve produced log files that are decently readable by anyone. You can also enable the scheduling engine to log every tiny thing it does, using standard Windows event tracing. Here’s how you enable this!

 

  1. Go to Performance monitor (go to Run – type Perfmon.msc)

       2. Create a new User defined Data collector set. Give it a name to remember and follow the wizard.

       3.Chose Create manually

 
        4. Chose Create data logs – Event trance data

       5. Add a trace provider

 

       6. Chose Microsoft-DynamicsAX-Tracing

 

 

       7. Specify what you want to trace from AX, by clicking Edit. You want to choose MRP from the list of all keywords.

       8. Specify where you want to keep the log

  1. 9. And you’re done, just click Finish

      10.  Well, you’re not 100% done – you need to start tracing, by clicking start in the tool bar

 

If you now schedule a production order, you can view the trace in the standard Windows Event viewer – Action – Open saved log – open the log saved at the location you set in the wizard, in my case C:\PerfLogs\Admin\DAXTrace\[MachineNameHere]_20130116-000001

 

 And good luck keeping track of these!

What you could do to make your life a little bit easier is to convert all the messages into a .csv file, which you can open in Notepad and search for some keywords or something like that. You do this by running the following command:

tracerpt [location_of_the_trace_file] -o [destination_file] -of csv

 

 

 

Whatever you do, remember to switch off tracing after you’ve collected your data! You don’t want to keep on piling data you don’t need, not to mention that tracing always has a negative impact on scheduling performance.

Comments

  • Anonymous
    April 18, 2013
    Hi,Thanks for sharing this info! We got the case where we scheduled with references a parent production order that got 300 childs productions orders. It works 1 time out of 4 without any change in the data...any idea what could be the issue ?

  • Anonymous
    June 09, 2013
    Hi,I have a route design production as below :Oper No.       Priority                   Operation           Next Link      Resource Req.           Cost Category10                  Primary                Process 1.1            20                 Resource R1            R1-Depreciation10                  Secondary1        Process 1.2            20                 Resource R1             R1-Repair10                  Secondary2        Process 1.3            20                 Resource R1             R1-Labor20                  Primary                Process 2.1              0                 Resource R1             R1-Depreciation20                 Secondary1         Process 2.2              0                 Resource R1              R1-Repair20                 Secondary2         Process 2.3              0                 Resource R1              R1-LaborI use secondary process because I have one or more cost category for each resource.I can use this route design into job scheduling of batch order in AX 2012, but why I can't use this route design into job scheduling of batch order in AX 2012 R2 ? this route design only running when I use operation scheduling of batch order in AX 2012 R2.If I try to running this route into schedule job, system give me error message "Production order No. ##### could not be scheduled. Not enough capacity".why this happened?

  • Anonymous
    July 10, 2013
    Hi Arsya,I'm running into the same problem. The scheduling engine only prompts that a specific operation in the route cannot be scheduled due to capacity. I hope MSFT can shed some light into this.Site/Calendars/Resource groups are all fine.

  • Anonymous
    August 12, 2013
    Hi Arsya and AndyPlease check if resource R1 is not marked as Exclusive. This would mean that it is supposed to be used only for one operation at a time.Also, make sure that you are doing infinite scheduling. Finite scheduling won't work in your case.If none of the above help, then we have an issue that we need to solve, because your scenario is a valid one, that we should be able to support.Thanks,Roxana

  • Anonymous
    August 12, 2013
    Hi GuillaumeI will need much more about your data composition to reply to your question, sorry... How many operations do you have per production order, do you do job scheduling or operation scheduling, finite material, etc etc. I suggest you open a case with our support channel for your issue.

  • Anonymous
    November 12, 2013
    Hi,We get the following error:Production - Operations schedulingProduction: ####Operation 5 PrimaryProduction order #### could not be scheduled. Not enough capacity could be foundUpdate has been cancelled.The thing is we do not use routes on items. We have no resources nor capacity planning. We only get this error for one item, all the rest work ok. We have started to look at the log-files but nothing so far.Any suggestions?Thanks!Einar

  • Anonymous
    November 18, 2013
    FolksWe were using AX without any problems until about a week ago when we started seeing the capacity messages.   We first noticed that our calendar was ending on November 20, 2013, so I extended it through 2015, but that doesn't see to help.None of our production orders have any required resources and everything is set to infinite capacity.I would appreciate any suggestions.ThanksHarinder

  • Anonymous
    November 19, 2013
    Einar, what calendar is that item's coverage group using, and does it have open working times?

  • Anonymous
    November 19, 2013
    Harinder, did you install any CUs/hotfixes/customizations last week? What calendars did you update? Did you also check the calendar on the coverage groups?

  • Anonymous
    January 06, 2014
    Production order list page – chose the production order that can’t be scheduled – Production details – Route – chose the operation that’s causing the failure – Applicable resources – toggle ‘Use requirements for’ between Job and Operation scheduling... we just change it from job to operation scheduling then we update the route.. and it works in live environment...:)

  • Anonymous
    February 05, 2014
    Good Post.I am facing following Error.NetResourceScheduler:PropagateAllConstraintsNetResourceScheduler:DateVariableBind (5637167136, StartTime) 02/05/2014 00:00:00NetResourceScheduler:DateVariableRestrictUpperBound (5637167136, StartTime) 02/05/2014 00:00:00NetResourceScheduler:PropagateAllConstraintsNetResourceScheduler:PropagateConstraint JobDateLinkConstraint - (5637167136, StartTime) - (5637167136, EndTime)NetResourceScheduler:Propagate: MaxDaysConstraintNetResourceScheduler:System.ArgumentOutOfRangeException: Value to add was out of range.Parameter name: value  at System.DateTime.Add(Double value, Int32 scale)  at Microsoft.Dynamics.AX.Planning.JobScheduling.MaxDaysConstraint.PropagateDateVars()  at Microsoft.Dynamics.AX.Planning.JobScheduling.MaxDaysConstraint.Propagate(JobSchedulingEngine engine)  at Microsoft.Dynamics.AX.Planning.JobScheduling.SequenceScheduler.PropagateAllConstraints()  at Microsoft.Dynamics.AX.Planning.JobScheduling.SequenceScheduler.Solve(List1 schedulingVars, ICollection1 jobList, Boolean findOptimalSolution)  at Microsoft.Dynamics.AX.Planning.JobScheduling.SequenceScheduler.PropagateAndSolve(Sequence sequence, OptimalSolutionSearch optimalSolutionSearch)  at Microsoft.Dynamics.AX.Planning.JobScheduling.SequenceScheduler.ScheduleAttempt(OptimalSolutionSearch optimalSolutionSearch, Boolean scheduleIndividualSubSequences)  at Microsoft.Dynamics.AX.Planning.JobScheduling.SequenceScheduler.ScheduleSequence()  at Microsoft.Dynamics.AX.Planning.JobScheduling.JobSchedulingEngine.Run(Int32 sequenceScheduleRuntimeLimit, Int32 sequenceOptimizationRuntimeLimit)NetResourceScheduler:Dataprovider: GetWorkingTimes, Time (ms), 0, Calls, 0 , GetCapacityReservations, Time (ms), 0, Calls, 0 , LoadResouceCapabilities, Time (ms), 0, Calls, 0  LoadResouceCalendars, Time (ms), 0, Calls, 0

  • Anonymous
    February 11, 2014
    The comment has been removed

  • Anonymous
    March 08, 2014
    HiI get the error " A CLR error occurred while invoking the scheduling engine"  while doing the operation scheduling with  quetime after for one of the operation in route, The route group setup for Quetime after is activated but working time  unchecked . the scheduling works fine with Workingtime  ticked for quetime but fails without it, Any help?thanks

  • Anonymous
    March 11, 2014
    Hi VasuI tried your repro steps on the latest build of AX and I can't repro. So please make sure that you download and install the latest CU for the AX version you are running on, because we've fixed a lot of issues around job types. So most likely this has been fixed as well.Sorry i can't be of more help,Roxana

  • Anonymous
    March 11, 2014
    Hi RoxanaDiaconuThanks for the reply. we have the latest  AX2012 CU7 build installed .The requirement here is to set a  queue time after of 2days ( 48hrs) for that particular operation. this operation is attached to Resource group which has 3 resources  and a working time calendar of 12hrs a day. For Queue timeafter it should follow the gregorian calendar ( 24hrs) which is not functioning I believe. Pls note- in Route group setting Working time is disabled but Capacity, Jobmanagement enabled.I tried this in AX2009 , AX2012 R2 CU7 base and with demo data aswell, No luck,Since you have done the repro steps with out any error, I think we have missed some setting. A quick hint on where Queue time after will look for a standard 24HR calendar will helprgdsVasu

  • Anonymous
    March 27, 2014
    Hi VasuThank you for the details! Now I can repro the issue. There's not much you can do to fix it, it seems to be something that we overlooked. Could I please ask you to report this back to us, via the usual channels? It's the easiest way we can react to it...Thanks,Roxana

  • Anonymous
    May 14, 2014
    On thing to add while you are attempting to troubleshoot "Not enough capacity" errors is to also test with the latest Kernel fix.  Granted there are 2 code pieces involved here (x++ code that hands off information to the scheduling ending & Scheduling engine itself).  But if there are any past issues found where hand off information is perfectly fine (ie Route / Setup info is perfectly correct and x++ code is fine), but the Scheduling engine has a past known defect in its *.dlls, then a test with the latest Kernel hotfix installed on a TEST system my be worth your effort.  Latest Kernel info can be found here:blogs.msdn.com/.../overview-of-ax-build-numbers.aspx

  • Anonymous
    June 29, 2014
    RoxanaDiaconu >>Einar, what calendar is that item's coverage group using, and does it have open working times?Thanks for answer. It helped us.

  • Anonymous
    July 02, 2014
    Really great to hear it helped! :)

  • Anonymous
    July 22, 2015
    Another situation that could trigger this error message is related to SITE! the site of the routing is different then the site of the resource or resource group. If you get into the habit of always clicking "routing feasibility" you would find out. If not, it may be a long time before you find this out. This is actually a pretty weak spot in the design I should not be able to select a resource or resource group from a  different site then my routing. It should filter to only show the resources in the site of the routing. Right now you can create a ghost routing and the system says nothing until you click "feasibility".. or "applicable resources". .

  • Anonymous
    September 07, 2015
    I tried REDUCING the quantity to be produced.

  • Anonymous
    November 16, 2015
    Hi everyone, I experience the same problem: route with one primary and one secondary operation: -> error message. Researching online I had the impression that quite a lot of people get this error. What I did not find is someone posting a real solution to this AX behaviour. Has anyone a working solution / explanation for the error? Appriciate any input, thanks Andreas

  • Anonymous
    November 16, 2015
    Hi Andreas You are most likely missing one of the hotfixes we released for production scheduling. I remember we had some issues with primary and secondary operations, but they have been fixed for sure.