I am making a painting line simulation and i have 9 different products that would have to be put on a hanger and ran through the painting line and removed off of the hanger. All the products have different times in various places on the painting line. There is one especially problematic section that is the oven. The oven has 2 lines that both have a capacity 3 hangers per line. The oven process starts when the hanger enters the oven and stops at the exit. I would want to start a counter when the product enters the oven area and deduct that time from a process point when the product enters it. Is this even possible without a pythoin script? Other thing is that how can i create the variable process times for each product in the other process points in the system? process points include things like covering and washing.
One has a Switch statement that checks the product type name and based on the name, there are different processing times.
Another process has a counter that starts when a part enters, and then after the counter meets the condition, the part is transported to the next station.
Thank you this helped on the first part of my problem
Can i use the counter part so that the counter would start when my part enters the oven in one point and the part exits when the counters reaches a set value in a different place? Preferably so that the part could move along the conveyor while the counter ticks on. And can i combine the switch statement to it so that the counter would count different counts for different parts simultaneously?
You could use a product property (defined in the product type) either as a counter, or to store simulation time as a timestamp (seconds from simulation start) and calculate remaining time in expressions by comparing to current time.
The current simulation time in seconds can be accessed using SimTime() function in expressions.
Sorry for no response and being a noob… How could i make this happen? As i said above i have 9 different products in total i would have to define the product properties for each one since the curing time of the paint is dependant on the product in question yes?
Add a “CuringStartTime” product property to each of the product types
When the product has been painted, use the Assign statement to set e.g. Assign "ProductIn.CuringStartTime = SimTime()"
In subsequent processes check whether approriate amount of time has passed for specific product instance e.g. If "ProductIn.CuringStartTime + 60 >= SimTime()"
In addition, you can replace the constant curing time of 60 seconds with Product type or Product instance specific time by adding another property for it and use that in the expression.
If you have set up the Product property correctly in the Product type, there might be a bug in the Assign statement
You could try with a Component property instead. Then the expression needs to be like ProductIn.Component.CuringStartTime = SimTime()
Im pretty sure its an issue with my setup of the product property…
What should the correct property type be? Iam curently using double but i tested string also and it didnt work. Also should i put the SimtTime() function into the product property or the assign process node or both?
Okay so i made a print statement aftter the assign statement Print: ProductIn.CuringStartTime and it gives me the correct value for the timestamp so that leads me to believe that the assign value works as wanted. The only weird thing is that it prints 2-3 values that are close to eachother but i dont necessarily think this is an issue.
The only remaining problem i seem to have is that i cant get the products to leave the oven when the timer reaches the wanted value. I tried to make a while statement to hold the product and release it when the timer reaches the wanted value but VC just delays infinetly and does not release the product.
Edit: I also made a print statement to the release phase and it gives me the same value that the product had previously so the timestamping works.