problem in frepplectl simulation-start or end inventory is negative

33 views
Skip to first unread message

Alex Chen

unread,
Oct 30, 2020, 5:52:59 AM10/30/20
to frePPLe users
Hi Johan:
when I use the frepple simulation function and gave the option "--pause".  I found that in the inventory report of a plan after a bucket step , some of the buffer's start or end inventory is negative, for example the start inventory is -3, how could I explain this?what does a negative inventory mean?
Thanks.

Johan De Taeye

unread,
Oct 30, 2020, 6:07:33 AM10/30/20
to freppl...@googlegroups.com

 

>>when I use the frepple simulation function and gave the option "--pause". 

 

Just a word of caution: the simulation function is for advanced use and for academic analysis. It is only usable for specific use cases, and takes some coding before it will generate good results.

Regular users normally won’t need this function.

 

>>I found that in the inventory report of a plan after a bucket step , some of the buffer's start or end inventory is negative, for example the start inventory is -3 how could I explain this?what does a negative inventory mean?

 

In a constrained plan negative inventories shouldn’t be present. Instead you should see demands that are planned short or late because of the material shortage.

 

But there are some material shortages that are unsolvable.
For instance, onhand is 0 and a confirmed production order will consume 5 units today. If the replenishment lead time is 10 days, there is no way we can avoid the inventory from going negative: We can’t move the confirmed production order and a replenishment will be late.

 

Stay safe,

 

Johan De Taeye

Mob: +32 477.385.362

Skype: jdetaeye

Visit us at https://frepple.com

--
You received this message because you are subscribed to the Google Groups "frePPLe users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to frepple-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/frepple-users/fa6bec0b-4bf4-4f22-9e97-b637bab09f58n%40googlegroups.com.

Alex Chen

unread,
Oct 30, 2020, 10:13:47 PM10/30/20
to frePPLe users
Hi Johan
Thanks for your suggestuin. 
Again, I carefully checked the plan.autofenceoperation and set it to be zero,then I checked the constrained plan considering materials, capacity and lead time. Finally I start the simulation. For the first bucket step runplan, the inventory report of all buffers are good along the whole time horizon, which means positive or zero. But for the second loop, after the simulator closed the MOs POs and DOs that the end date is less than the first bucket step's end time and trigger the second runplan, I chcked the buffer inventory, some of the buffer's start inventiry is negative. This really confued me, I have seen the code of simulator.py and add some print() to monitor the running but found nothing.
Thanks.

Alex Chen

unread,
Oct 31, 2020, 10:39:20 AM10/31/20
to frePPLe users
no title.png
Hi Johan:

Just like picture above. 
This is simulation result of the manufacturing demo in frepple. I load it into the scenario and start the simulation. I didn't change anything of this demo. The simulation step is 1 day.  When the simualtion went into the third step bucket, I checked the the inventory report of the plan and found the negative end inventory like the picture above.
 I can not understand why. 
So I monitered the running of  simulation.py and I found that  
the simulator can not correctly handle the "def finish_manufacturing_orders(self, strt, nd):". Some of the MOs that satisfy the end date can not be finished correctly. 
I hope you can give me some suggestions to solve this problem.
Thanks again.

在2020年10月30日星期五 UTC+8 下午6:07:33<Johan De Taeye> 写道:

Johan De Taeye

unread,
Oct 31, 2020, 11:52:37 AM10/31/20
to freppl...@googlegroups.com

 

Hi Alex,

 

>> Again, I carefully checked the plan.autofenceoperation and set it to be zero.

That’s normally not a good idea.  In case a confirmed MO/PO/DO already exists for an item, you normally want to wait for it to arrive/finish rather than creating a new MO/PO/DO.

 

>> When the simualtion went into the third step bucket, I checked the the inventory report of the plan and found the negative end inventory like the picture above.
>>I can not understand why. 

 

The inventory detail report will show more information about all producers and consumers of the material.

 

This may well turn out to be a big in the simulation script – it’s a few years ago since it was last used actively, and we haven’t spent time to test or keep it up to date with recent releases.

For me, it’s very low priority to look into it.

Pull requests are welcome J

Alex Chen

unread,
Oct 31, 2020, 7:42:01 PM10/31/20
to frePPLe users
Hi Johan:
Thanks for your response.
In fact, when I found this simulation function in frepple, I was impressed because I think this is an advanced function in other aps softwares such as preactor and planrttogether. I think the simulation function in frepple resembles the “advance the clock” function in planettogether. I hope you can fix it in some one day.

As I Tried, I found 2 problems

1. the "finish confirmed MOs " can not be excuted correctly in each time bucket.
2. the start inventory at the start time of the next time bucket for some buffers are not in accordance with their initial onhand quantity in the same loop , especially those negative inventoty. thus the absolute quantity of those nagative inventory will become bigger and bigger.

One question:
several lines of code like below

param = (
                Parameter.objects.all()
                .using(database)
                .get_or_create(name="currentdate")[0]
            )
param.save(using=database)

the "param.save(using=database)" just saves the paramter value into a variable in the computer memory or save it into the database like postgresql used by frepple?

Johan De Taeye

unread,
Nov 1, 2020, 6:02:20 AM11/1/20
to freppl...@googlegroups.com

 

>>param = (

>>                Parameter.objects.all()

>>                .using(database)

>>                .get_or_create(name="currentdate")[0]

>>            )

>>param.save(using=database)

>> 

>>the "param.save(using=database)" just saves the paramter value into a variable in the computer memory or save it into the database like postgresql used by frepple?

 

It’s saving to the database.   You can see it as a Python interface to run an SQL statement on the database: see https://docs.djangoproject.com/en/2.2/topics/db/queries/ for more details

 

When using the simulation functionality there are 3 components that are communicating through the database:

-          The simulation script that changes the state of the database to simulate the time moving forward

-          The planning engine that reads the updated input, generates a plan and exports the results to the database

-          The user interface that is displaying the planning results stored in the database

Reply all
Reply to author
Forward
0 new messages