Prod Planning - Build to Order - Consolidation

Discussions relating to Jiwa 7 plugin development, and the Jiwa 7 API.

Prod Planning - Build to Order - Consolidation

Postby pricerc » Thu Nov 04, 2021 10:33 am

Customer is migrating from Jiwa 6 to 7.2.1 SR5. We'd like to use the production planning to help automate some stuff they're currently doing manually.

The key thing we're trying to tackle at the moment is their 'cut shop', where they're cutting sheets of raw material. We're wanting to collate all orders that use a specific raw material, so that they can be combined in a CAD system to optimise the cutting.

I've made a copy of the build-to-order plugin, which is a close match to our requirements (being largely made-to-order parts). Since the customer has a Bill No = Part No setup, I've modified the stored procedure so that the 'Part No' range works as a 'component' range. That is working to give me a list of potential work orders that use a specific component.

But I'm a bit stuck on the next bit, which is to generate a single work order that creates multiple outputs instead of multiple work orders each producing a single output.

Do I need to intercept MakeWorkOrdersUltraButton_Click() or ProductionPlan.Process() ?

Or is this something there's already a process for that I've missed?
/Ryan

ERP Consultant,
Advanced ERP Limited, NZ
https://aerp.co.nz
User avatar
pricerc
Senpai
Senpai
 
Posts: 518
Joined: Mon Aug 10, 2009 12:22 pm
Location: Auckland, NZ
Topics Solved: 21

Re: Prod Planning - Build to Order - Consolidation

Postby Mike.Sheen » Mon Nov 15, 2021 6:42 pm

pricerc wrote:Do I need to intercept MakeWorkOrdersUltraButton_Click() or ProductionPlan.Process() ?


ProductionPlan.Process() is what I would use - In there you would meddle with the ProcessCandidates collection.

Each ProcessCandidate in that collection has a WorkOrder property which is simply a normal WorkOrder business logic instance.
Mike Sheen
Chief Software Engineer
Jiwa Financials

If I do answer your question to your satisfaction, please mark it as the post solving the topic so others with the same issue can readily identify the solution
User avatar
Mike.Sheen
Overflow Error
Overflow Error
 
Posts: 2583
Joined: Tue Feb 12, 2008 11:12 am
Location: Perth, Republic of Western Australia
Topics Solved: 807

Re: Prod Planning - Build to Order - Consolidation

Postby pricerc » Wed Dec 15, 2021 8:46 am

Ok,

I've made some good headway with this project.

I ended up bypassing ProductionPlan.Process().

Creating the candidate WorkOrder up front results in a single candidate per raw material, with no UI for selecting which demand within that to fulfil.

So I instead I populated the candidate list 'normally', and then hooked ProductionPlan.ProcessStart in SetupBeforeHandlers, and parsed the candidates manually, creating a new job per raw material, honouring the 'Process' flag. I then throw a UserCancelledException.

I have a bit of fine-tuning to go, but it seems to be (mostly) working.

I could use some guidance on populating extra columns on the candidate list. Because I'm generating output items from the candidate list, I'd like to add a 'share of cost' column to the candidate list. While it's easy enough get get extra data out of the stored procedure, I can't seem to find an event I can hook into.
/Ryan

ERP Consultant,
Advanced ERP Limited, NZ
https://aerp.co.nz
User avatar
pricerc
Senpai
Senpai
 
Posts: 518
Joined: Mon Aug 10, 2009 12:22 pm
Location: Auckland, NZ
Topics Solved: 21

Re: Prod Planning - Build to Order - Consolidation

Postby pricerc » Thu Dec 16, 2021 8:26 pm

Ok, just when I thought I was winning....

I can get the 'fresh' workorder looking great:
Capture1.PNG
WorkOrder Main Page


However, it seems that the underlying logic for allocating input to output cannot cope with this.

In the example presented, the idea is that the *combination* of inputs creates the *combination* of outputs. However, I am unable to (manually at least, I haven't tried programatically) set all the output quantities without getting a complaint about unsufficient inputs for allocation.

I take a look at the allocations page after adding just the first output quantity of 1 for the first line, I see that it has allocated all the inputs to just one output:
Capture2.PNG
Allocations


And then I get this when I try to set the quantity output value to 6 on the second item:
Capture3.PNG
Allocation error
Capture3.PNG (6.99 KiB) Viewed 5254 times


So a couple of questions:
1) can I turn off the automatic allocation so that I can do it manually later? I don't need it happening in real time while the operator is entering the numbers.
2) will that even work? i.e. if I can disable the automatic allocations, and say intercept the 'close' function and do it there, would the structures support it?
3) is there a better way I should be doing this?
4) is this a futile exercise with the 7.2.1 incarnation of WorkOrders? Looking at the (decompiled) code, there are a few places where I can see I'll have to completely override the standard behaviour, with no obvious means.

further to question 2:
In my example, all of the outputs use the 'CUTTING' and 'OVERHEAD' 'parts', and then at least one of the 'J*' parts. Each raw material 'J*' part is a sheet of gasket material, which gets cut with a laser or mechanical cutter (depending on the material). Because not all gaskets are the same size, it is possible to nest small ones inside large ones, and the amount of raw material used for a small one is (usually, but not always, because geometry) less than the raw material used for the big one. And shapes matter too, because different combinations of shapes can produce less waste for a given sheet of raw material.

So there is no single 'primary' output, they are all primary outputs. The overall cost, including waste and fixed costs (setup time for machines), will be divided up between the outputs depending on their theoretical share of the raw material.
/Ryan

ERP Consultant,
Advanced ERP Limited, NZ
https://aerp.co.nz
User avatar
pricerc
Senpai
Senpai
 
Posts: 518
Joined: Mon Aug 10, 2009 12:22 pm
Location: Auckland, NZ
Topics Solved: 21


Return to Technical and or Programming

Who is online

Users browsing this forum: No registered users and 3 guests