swarm-support
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Swarm-Support] FW: 1) Storing a queue in a swarm object (2) Passing a v


From: Mervin Chan
Subject: [Swarm-Support] FW: 1) Storing a queue in a swarm object (2) Passing a variable with a method and inserting it in a ModelSchedule
Date: Wed, 15 Sep 2004 01:52:45 +0800

 

Hi,

 

I have some newbie questions. I am primarily doing development on a Swarm application using Java for my University research project.

 

My two questions are:

 

1)       Is there any way to add a queue in a Swarm object?

 

In my application (modeling a manufacturing plant), I have a “Factory” and many “Product” objects.

 

Products have different time-stamps to represent the time that they are created. Once the products are created, I want the Factory to store the Products in ascending order of their timestamps.

 

2)       Is there a way to pass a variable together with the method and then inserting it in a ModelSchedule.

 

Let’s assume that my factory stores a list of product timestamps. To update the list, I have to do updateProductList(int product_timestamp).

 

I want to pass the timestamp of a product together with the “updateProductList” method, to a factory. How can I do that?

All the tutorials I’ve read do not pass variables.

 

           

try

                {

                sel = new Selector(aFactory.getClass(), "updateProductList", false);

                modelActions.createActionTo$message(aFactory, sel);

                } catch (Exception e)

                        {

                        System.err.println("Exception updateFactoryTimestamp: " +

                                                   e.getMessage ());

                        System.exit(1);

                        }

           

 

 

Please help, many thanks.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]