AnswerHub Upload Issue
Our AnswerHub community currently has a bug that prevents you from attaching your model or other files to your questions. AnswerHub is aware of this issue and they are working on a fix. Until we receive their patch, you can upload your models and other files to FlexSim's file share site. Include the file name in your question so that we know which upload to reference.

question

martin.j avatar image
0 Likes"
martin.j asked Joerg Vogel edited

Get BackOrder Fulfillment degree from list

Is it possible to get the backorder fulfilled degree/value from a backorder?

I have an order on a list pulling resources and at some point I want to produce the exact amount remaining to fill the order. To do that I will need to get its backorder from the list and find out how much of its original requested/required resources it has already been assigned and set about producing the rest.

I imagine the code would go something like this:

List resourceList = List("ResourceList");
int orderIndex = resourceList.backOrders().toArray().indexOf();
List.BackOrder backOrder = resourceList.backOrders(orderIndex);
double requested = backOrder.numRequested;
double fulfilled  = backOrder.??????;
double toProduce = requested-fulfilled;
FlexSim 20.1.0
listsbackorderfulfilled
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.

1 Answer

·
Matthew Gillespie avatar image
1 Like"
Matthew Gillespie answered Joerg Vogel edited

This isn't a property on the Backorder object in the API right now, but maybe it should be. You can get this number by calling getsdtvalue() on the backorder like this:

getsdtvalue(List("ItemList1").backOrders()[1], "numFulfilled")

Note that since we haven't officially exposed this property through the API we make no guarantee that this code will continue to work in future versions of the software.

· 2
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.

@Matthew Gillespie Thanks Matthew, that seems to work. But as an alternative, is there similarly a way to look at a list entry and determine how much is left of a label - Weight - that I have already partially pulled an amount from?

If I have a list entry that originally held 20 in a Weight label, but 5 was pulled by a SELECT Weight statement - Can I somehow find out how much is left in the entry?

As you can see from the image below I can get the list entry, but the getsdtvalue() can't seem to get the "staticFields" values, of which I am technically only interested in the first one. I have tried declaring "fields" as a variable but the result is always the same. I can get the "pushTime" though.

0 Likes 0 ·
fs-listentries.png (37.2 KiB)

@martin.jensen, you get by the methods and properties in the namespace of Lists only the value back no matter what you try. BUT if you have used a global list, you can query your list as a table. Then you have access to the values of fields of a list. Here you find an example.

0 Likes 0 ·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.