I work in a production company where my colleagues calculate costprices based on 3D models and their respective operations. Apart from workactivities where a user has to insert an operation time and setuptime, most operations are calculated automaticly. Currently, this is done in an Excelsheet. I am responsible for improving an existing software product (C#) where those algoritms are migrated to.
These automatic operations are calculated on a high variety of parameters, which depening on the workactivity (unique by certain code).
I would draw a workflow like below:
The project will be used in a view for the user but also for recalculating the current database.
Some examples
The operation of bending a plate. The operation and setuptime is based on the length of tooling which is used, the number of stations and number of bends. Each of those numbers are then multipied by another variable, say a "setting" variable?
The time we calculate to prepare a single product before it goes to production. This is based on some parameters as described in the previous paragraph, but also if the product contains workactivity A, workactivity B or is an assembly. And if so, a certain time is added..
A workactivity where there user is counting holes and based on the material, required quality (user input) and thickness, an operation and setuptime is calculated. Or another workactivity which is based on a table of minimum and maximum product length.
A workactivity which is calculated in money, not time. There are some which are based on containing an outsourced activity. If yes, then two workactivities are added with a price depending on the outsourced activity (some require more money because they are done further from the company).
Now ofcourse this can be done with an endless chain of switch- and if-statements but something tells me that might be the worst way to go. I have checked the Refactoring Guru but I can't quite find which one should help me, or if I am looking in the right direction.