how to write equation

Use this forum to post Vensim related questions.
Post Reply
KarthikThilak
Member
Posts: 21
Joined: Mon May 29, 2017 9:25 am
Vensim version: PLE

how to write equation

Post by KarthikThilak »

Hello,

I would like to write an equation for the following in the model:

1.Volume to be shipped
2.Inventory
3.Transportation costs
4.Replenishment Rate

This model tries to optimise the optimal split volume and the number of cartons to be shipped to the customers.The current split volume is 0.9.

Could you please review the model and help me on the above.

Thanks,
Last edited by KarthikThilak on Tue Jul 04, 2017 11:56 am, edited 1 time in total.
Administrator
Super Administrator
Posts: 4590
Joined: Wed Mar 05, 2003 3:10 am

Re: how to write equation

Post by Administrator »

Inventory is easy, you've already got most of the equation.

inventory = INTEG(replenishment rate-shipment rate, initial inventory)

Is "volume to be shipped" the same as "shipment rate"?

transportation costs, you've already got most of an equation.
IF THEN ELSE(volume to be shipped<=0.9, number of cartons*PRICE PER CARTON,LOOKUP OF TRANSPORTATION COSTS (volume to be shipped))

Replenishment rate? That could be anything, can you describe the system and maybe we can assist here?
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
KarthikThilak
Member
Posts: 21
Joined: Mon May 29, 2017 9:25 am
Vensim version: PLE

Re: how to write equation

Post by KarthikThilak »

Hello,

By this model I'm trying to optimise the freight cost for parcel and pallet shipments.This is none other than to get an optimum value of SAP split volume and number of parcels to clearly differentiate when to change from parcel to pallet shipment.The left hand side of the model is added for completeness and also to consider shipping time and order processing time as factors.

Here,the replenishment rate represents the rate at which the goods come into the warehouse or get added to the inventory.

I have also added a arbitrary value to Replenishment rate,but I'm getting a floating point error.

I have added the snapshot of the error and also the model for your reference.

Please assist.

Many Thanks in advance,
Last edited by KarthikThilak on Tue Jul 04, 2017 11:56 am, edited 1 time in total.
tomfid
Administrator
Posts: 3811
Joined: Wed May 24, 2006 4:54 am

Re: how to write equation

Post by tomfid »

The model you uploaded isn't runnable because the Replenishment Rate is undefined.

However, my guess is that the problem is a division by 0 in Number of Cartons, because the Volume of biggest... is 0. That presumably happens because your carton size lookup includes a 0 size entry, and initial inventory and shipments are 0.

You'll need to add some logic to handle that.
KarthikThilak
Member
Posts: 21
Joined: Mon May 29, 2017 9:25 am
Vensim version: PLE

Re: how to write equation

Post by KarthikThilak »

Hello,

I have attached the model with a arbitrary value of replenishment rate.Can you please help me figure out this floating point error.

I tried to even give a min and max limit for volume to be shipped.But have no clue how to modify shipment rate

Please help

Regards,
Karthik
Last edited by KarthikThilak on Tue Jul 04, 2017 11:56 am, edited 1 time in total.
Administrator
Super Administrator
Posts: 4590
Joined: Wed Mar 05, 2003 3:10 am

Re: how to write equation

Post by Administrator »

1. Save results every time step, when debugging a model, it's useful to be able to see all calculations (Model->Settings, Save results every time step).

2. Time step. You've selected a time step of 0.25, but your "min order processing time" is 1. Time step needs to be less than 1/3 of the shortest delay in the model, so change time step to

3. Why do you have INTEGER inside of the Inventory level?

4. The inventory level is wrong. You are accumulating "shipment rate" and removing "REPLENISHMENT RATE". The equation should be REPLENISHMENT RATE - shipment rate.

If I implement these, it starts simulating but then fails when "volume of the biggest carton frequently used" becomes zero (leading to a divide by zero in "number of cartons"). This is due to the lookup table "LOOKUP OF VOLUME OF BIGGEST CARTON", if the input is over 1.2, the volume is zero. Remove the point (1.2,0) in the lookup table.
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
KarthikThilak
Member
Posts: 21
Joined: Mon May 29, 2017 9:25 am
Vensim version: PLE

Re: how to write equation

Post by KarthikThilak »

Hello,

I would like to make a decision with a volume and weight criterion in the point shown in the attached figure.

Could you please tell me if Vensim PLE supports any decision point or what is the way for me to insert a criterion so that shipments either flow as parcels or pallets.

Thanks,
Last edited by KarthikThilak on Tue Jul 04, 2017 11:55 am, edited 1 time in total.
Administrator
Super Administrator
Posts: 4590
Joined: Wed Mar 05, 2003 3:10 am

Re: how to write equation

Post by Administrator »

Can you explain the logic that you wish to implement?

Usually you would calculate the number of pallets (based on inventory and demand) and what is left goes to the parcels level.
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
KarthikThilak
Member
Posts: 21
Joined: Mon May 29, 2017 9:25 am
Vensim version: PLE

Re: how to write equation

Post by KarthikThilak »

PFA the model,

I am tring to modify the parameters of volume and weight.which are the reaason for the shipments to be shipped as parcel or pallet.

Should I add this decision point as a stock itself or how should i go about adding it?

Please let me know,
Last edited by KarthikThilak on Tue Jul 04, 2017 11:55 am, edited 1 time in total.
Administrator
Super Administrator
Posts: 4590
Joined: Wed Mar 05, 2003 3:10 am

Re: how to write equation

Post by Administrator »

It doesn't need to be a stock.

Can you explain (in words rather than just attach a model) how the calculation to ship via pallets or parcels is made?
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
KarthikThilak
Member
Posts: 21
Joined: Mon May 29, 2017 9:25 am
Vensim version: PLE

Re: how to write equation

Post by KarthikThilak »

when the volume is less than 0.9 cubic metre and the weight of the shipment is below 70kg ,it is shipped as Parcel,If either one of the condition or both conditions exceed the mentioned limit,then it is shipped as pallet.
Administrator
Super Administrator
Posts: 4590
Joined: Wed Mar 05, 2003 3:10 am

Re: how to write equation

Post by Administrator »

First calculate two things, the "number of pallets to ship based on weight" and "number of pallets to ship based on volume". For this, you'll need to calculate the volume and weight of the demand.

From this, you can work out how many pallets to ship.

Then the unsatisfied demand, ship that via parcel.
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
KarthikThilak
Member
Posts: 21
Joined: Mon May 29, 2017 9:25 am
Vensim version: PLE

Re: how to write equation

Post by KarthikThilak »

I have statistical data for how many pallets have been shipped by volume and how many by weight.
But,how do I calculate weight and volume of demand?
What about the parcels?Do i just randomly say a pallet contains 'x' no. of parcels??
Flow for pallets and flow of parcels have diff units.
and so does the inventory also.
Also,any related research I could refer to model this system?

Many Thanks,
Administrator
Super Administrator
Posts: 4590
Joined: Wed Mar 05, 2003 3:10 am

Re: how to write equation

Post by Administrator »

KarthikThilak wrote:But,how do I calculate weight and volume of demand?
Demand must come from somewhere, or do you ship anyway based on what you have in stock? If nobody orders, there is no demand so no shipment needed.
KarthikThilak wrote:What about the parcels?Do i just randomly say a pallet contains 'x' no. of parcels??
I'd assume you also have a value for this from somewhere. Does each parcel have a weight that can be used to work out the weight of the pallet?
KarthikThilak wrote:Flow for pallets and flow of parcels have diff units. and so does the inventory also.
Different units are not a problem as long as you convert correctly between the two. Eg, a constant which is in "months" can be divided by "months per year" to give the same value with the year unit.
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
KarthikThilak
Member
Posts: 21
Joined: Mon May 29, 2017 9:25 am
Vensim version: PLE

Re: how to write equation

Post by KarthikThilak »

Administrator wrote:
KarthikThilak wrote:But,how do I calculate weight and volume of demand?
Demand must come from somewhere, or do you ship anyway based on what you have in stock? If nobody orders, there is no demand so no shipment needed.

We ship based on orders(Articles ordered)
KarthikThilak wrote:What about the parcels?Do i just randomly say a pallet contains 'x' no. of parcels??
I'd assume you also have a value for this from somewhere. Does each parcel have a weight that can be used to work out the weight of the pallet?

Each parcel has a weight,but since there are a lot of parcel sizes,how is it possible to say which cartons go in a pallet?

Do you have any related info which could help me get an idea
Post Reply