Page 1 of 1

cost

Posted: Mon Nov 15, 2021 7:55 am
by jie
Hi all
I want to ask a question. I built an interruption model, but the cost is shown in the running results. I know this is impossible. After retrospectively, I found that the "work-in-progress p" also has a negative value, but the "work-in-progress p" The formula of p is very simple. I don’t know what went wrong. I uploaded my model and hope to get your help.

Re: cost

Posted: Mon Nov 15, 2021 8:03 am
by Administrator
Can you upload your model? It was not attached to the original post.

Re: cost

Posted: Mon Nov 15, 2021 8:25 am
by jie
This is my model

Re: cost

Posted: Mon Nov 15, 2021 8:33 am
by Administrator
You are going to have to translate things for us to help.

1. I cannot find a parameter called "cost".
2. I cannot find a parameter called "work-in-progress p"
3. The model has no units at all. Adding units and making sure your model passes this basic check usually reveals any common errors.

Re: cost

Posted: Mon Nov 15, 2021 9:26 am
by jie
I’m very sorry that I did not clarify my question. In fact, my main problem is that the value of the work-in-progress p has a negative number.In my model "work-in-progress p" means “在制品p”.

Re: cost

Posted: Mon Nov 15, 2021 9:33 am
by Administrator
ok. I'm probably not going to be able to help much as I cannot read the model parameters.

One note. You really need to simplify this equation. Embedding function calls (such as DELAY1) means you have no way of debugging and finding out which one of these IF THEN ELSE statements is causing the problem.

产品单位产量p = IF THEN ELSE(Time>=830, IF THEN ELSE(Time>860, DELAY1(在制品p, 生产时间p), IF THEN ELSE(产能中断率P=1, 0, DELAY1(在制品p, 生产时间p))), DELAY1(在制品p, 生产时间p))

You also really need to add units to the model to help you track down any errors.

Re: cost

Posted: Mon Nov 15, 2021 9:49 am
by jie
Is my if then else statement wrong? Do you mean to add a unit after each variable in order to check the error?
I have another problem with nesting if then else in the if then else function. What are the rules?

Re: cost

Posted: Mon Nov 15, 2021 9:57 am
by Administrator
It's too complicated. Nesting equations is bad practice as it makes things difficult to debug.

Start by simplifying your equations. Then add units to the parameters in your model and make sure it passes the units test. Hopefully then the problem will show itself.

Re: cost

Posted: Mon Nov 15, 2021 10:01 am
by jie
Ok I see, thank you very much for your patience.