cost

Use this forum to post Vensim related questions.
Post Reply
jie
Junior Member
Posts: 10
Joined: Mon Nov 15, 2021 7:24 am
Vensim version: PLE

cost

Post 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.
Administrator
Super Administrator
Posts: 4573
Joined: Wed Mar 05, 2003 3:10 am

Re: cost

Post by Administrator »

Can you upload your model? It was not attached to the original post.
Advice to posters seeking help (it really helps us to help you)
http://www.ventanasystems.co.uk/forum/v ... f=2&t=4391

Units are important!
http://www.bbc.co.uk/news/magazine-27509559
jie
Junior Member
Posts: 10
Joined: Mon Nov 15, 2021 7:24 am
Vensim version: PLE

Re: cost

Post by jie »

This is my model
Attachments
我改的.mdl
(37.67 KiB) Downloaded 91 times
Administrator
Super Administrator
Posts: 4573
Joined: Wed Mar 05, 2003 3:10 am

Re: cost

Post 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.
Advice to posters seeking help (it really helps us to help you)
http://www.ventanasystems.co.uk/forum/v ... f=2&t=4391

Units are important!
http://www.bbc.co.uk/news/magazine-27509559
jie
Junior Member
Posts: 10
Joined: Mon Nov 15, 2021 7:24 am
Vensim version: PLE

Re: cost

Post 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”.
Administrator
Super Administrator
Posts: 4573
Joined: Wed Mar 05, 2003 3:10 am

Re: cost

Post 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.
Advice to posters seeking help (it really helps us to help you)
http://www.ventanasystems.co.uk/forum/v ... f=2&t=4391

Units are important!
http://www.bbc.co.uk/news/magazine-27509559
jie
Junior Member
Posts: 10
Joined: Mon Nov 15, 2021 7:24 am
Vensim version: PLE

Re: cost

Post 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?
Administrator
Super Administrator
Posts: 4573
Joined: Wed Mar 05, 2003 3:10 am

Re: cost

Post 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.
Advice to posters seeking help (it really helps us to help you)
http://www.ventanasystems.co.uk/forum/v ... f=2&t=4391

Units are important!
http://www.bbc.co.uk/news/magazine-27509559
jie
Junior Member
Posts: 10
Joined: Mon Nov 15, 2021 7:24 am
Vensim version: PLE

Re: cost

Post by jie »

Ok I see, thank you very much for your patience.
Post Reply