MASON-INTEREST-L Archives

February 2014

MASON-INTEREST-L@LISTSERV.GMU.EDU

Options: Use Monospaced Font
Show Text Part by Default
Condense Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Sender:
MASON Multiagent Simulation Toolkit <[log in to unmask]>
Date:
Tue, 11 Feb 2014 19:53:48 +0100
Reply-To:
MASON Multiagent Simulation Toolkit <[log in to unmask]>
Subject:
MIME-Version:
1.0
Content-Transfer-Encoding:
8bit
In-Reply-To:
Content-Type:
text/plain; charset=ISO-8859-1; format=flowed
From:
"Gulyás, László" <[log in to unmask]>
Parts/Attachments:
text/plain (124 lines)
Hi Rakesh,

You might want to look at our Model Exploration tool, called MEME.
It works with MASON, can do parallel execution, Advanced DOE and even 
running in the cloud, too.

Best regards,

Laszlo
--.--
GULYÁS, László Ph.D.
Head of Division
Intelligent Applications and Web Services
AITIA International, Inc.

2014.02.11. 18:56 keltezéssel, Chris Hollander írta:
> Rakesh, just have your model stop the simulation internally once it's
> over (by calling finish on the main simulation object)
>
>
> On Tue, Feb 11, 2014 at 12:42 PM, R K Mishra
> <[log in to unmask] <mailto:[log in to unmask]>> wrote:
>
>     Dear all
>
>     I have model that terminates on a condition rather than iterate for
>     n time. Then how can I parallel .
>
>     On Feb 11, 2014 10:50 PM, "Ernesto Carrella" <[log in to unmask]
>     <mailto:[log in to unmask]>> wrote:
>
>         Just to add on the previous answer.
>
>         The simplest way to run the model 300 times and run each model
>         for 10000 steps:
>
>
>         public  static  void main(String[] args)
>         {
>            final  int  NUMBER_OF_RUNS=  300;
>            final  int  STEPS_PER_RUN=  10000;
>
>            for(int  run=0;  run<  NUMBER_OF_RUNS;  run++)
>            {
>                private  MySimState model=  new  MySimState(....);
>                for(int  i=0;  i<  STEPS_PER_RUN;  i++)
>                    model.schedule.step(model);
>            }
>         }
>
>         }
>
>
>         Now if you want to run it multithreaded, the simplest way to do
>         it is this:
>
>
>         private  static  class  OneRunOfTheModelimplements  Runnable
>              {
>
>                  @Override
>                  public  void  run()
>         {
>
>                      MacroII model=  new  MacroII(System.currentTimeMillis());
>                      model.start();
>                      for(int  i=0;  i<  STEPS_PER_RUN;  i++)
>                          model.schedule.step(model);
>
>                  }
>              }
>
>         public  static  void main(String[] args)throws  ExecutionException, InterruptedException{
>                  ExecutorService executor=  Executors.newCachedThreadPool();
>                  List<Future>  receipts=  new  ArrayList<>(NUMBER_OF_RUNS);
>
>                  for(int  i=0;  i<  NUMBER_OF_RUNS;  i++)
>                  {
>                      Future receipt=  executor.submit(new  OneRunOfTheModel());
>                      receipts.add(receipt);
>                  }
>
>                  //here we make sure every run was completed
>                  for(Future receipt:  receipts)
>                      receipt.get();
>
>                  executor.shutdown();
>              }
>
>
>
>
>         Notice that this is clearly not a good way to multithread. The
>         runnables are all potentially very long. Rather, you'd want the
>         runnable to be just a model step and build the whole blocking
>         queue infrastructure; but hey, one thing at a time.
>
>         Ernesto
>
>
>         On Tue, Feb 11, 2014 at 2:59 AM, Mac Van Vien
>         <[log in to unmask] <mailto:[log in to unmask]>> wrote:
>
>             Hi every body,
>             I need to run MaSon model more than 300 times to take data
>             farming.
>             Therefore, I want kick off this model one time and then it
>               can run several
>             times sequncetly or parallelly. Please show me how to do it.
>
>             I am looking forward to here from you soon.
>
>             Thank you very much
>
>
>             Your sincerely
>
>
>
>             Mac Van Vien
>
>
>

ATOM RSS1 RSS2