Jump to content

Assign data table to a Entity.


Recommended Posts

Good night,

It's my first post here, and I want to say at first very thanks for the help,


I'm going to explain a little the issue:

I'm making my own simulation about a supermarket, and I'm trying to generate a list of things which had to be assigned to a Entity.

I generated a string property as vector with 4 rows (ArticuloQueCompra), and I sent from a table (Listadelacompra).

I also had made the same with another property (CantidadArticulo).

file.php?mode=view&id=1353&sid=f06390a2bf6168a1e46ab097070f6abc

After, I sent the values throw a trigger (AsignacionManualDatos).

file.php?mode=view&id=1352&sid=f06390a2bf6168a1e46ab097070f6abc

I thought it isn't the best way for this but I didn't find the right.


I appreciate the time you spend for help, so, thanks again.


Regards,

Trigger.png.7f2a1b653b2096114e14eb5e28922998.png

Asigns.png.afdd3d5083437cddfd93ea42196a7452.png

Link to comment
Share on other sites

I am not sure I understand what you want to do.

Are your entities the people who are shopping? And the table contains the articles they must buy?


Perhaps represent those articles as Materials (an element). Then perhaps the entity could travel to a Server or Workstation where the material is located and Consume one or more units of that material.

Link to comment
Share on other sites

Hello dsturrock. Hello everyboud.


You understand my situation. Im going to explain a little bit:

My entities are the people who are shopping, and I'm trying to assign to them a kind of 'shoplist' when the source create the entity.

This 'shoplist' has to be different for any entity. I thought make something like (any options?):

ShopList Table.

Item to buy | Location |Qtty

Apples | Input@ApplesShelves | Random.Discrete(0,0.5,1,1)

Carrots | Input@CarrotShelves | Random.Discrete(0,0.5,1,1)

...


On that way, I would generate a random 'shoplist' about random items and quantities to buy and when a source generates an entity. It would assign the 'shoplist' for that.

In each Node, I could evaluate with a Decision Step if the Entity have to join or continue towards the commerce-path. I defined a route with nodes front of the shelves. Entities walk by the paths (unidirectional), being evaluated at Nodes and taking the "Qtty" in each Server (Shelves).

To handle the stock, at Model level, I defined a QttyApples, a QttyCarrots, (as State Variables, following in the steps of the exercise of the 'supply chain' of workbook). Before, towards the Server (ie: ApplesShevles), a trigger may sent a code for quit the 'Qtty' about that item.



For now, I generate one table and one property for each column, i.e.:

Listadelacompra table, the rows:

Item (Articulos) | Qtt (CantidadPromedioPorCliente)

Apples | Random.Discrete()

Carrots |Random.Discrete()

Peas |Random.Discrete()

Lettuce |Random.Discrete()


I had also made a State Variable for each item at Model level: QttyApples QttyCarrots QttyPeas QttyLettuce, ... Because before the Servers (shelves) had to disccount it.


To make that I have to determine a lot of code-lines (one per item for the entity [n], one per item for the Model) and I was wondering if I could associate a table to an entity. Right now, I'm using property-vectors (ArticuloQueCompra, CantidadArticulo).



I hope I have been clear enough,

Maybe there is another way to resolve these problem but I didnt know how to make it,



Very thanks for the help,

Regards,


Nicolás Rodríguez.

Link to comment
Share on other sites

×
×
  • Create New...