Quantcast

Control the Repast Simphony schedule from another Java program

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Control the Repast Simphony schedule from another Java program

Jorge
I'm setting up a new program to run a Repast model using TestRunner 2.java and TestMain 2.java.  The latest FAQ instructions state that "you will need to include the classes from repast.simphony.runtime and
repast.simphony.Batch in your classpath to run."

I added the src and lib jars from both locations (repast.simphony.batch_2.3.1 and repast.simphony.runtime_2.3.1), but import repast.simphony.engine.environment.AbstractRunner is still not found.  When I search for it in Eclipse, I only find it in the repast.simphony.bin_and_src.jar.  So are the instructions wrong for this section?  Which classes and lib jars do I need?
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Control the Repast Simphony schedule from another Java program

Jorge
Any thoughts on this?  I know for RepastMain we shouldn't use
repast.simphony.bin_and_src.jar, but for AbstractRunner, I don't see
how else to get the code to compile.

On Fri, Apr 1, 2016 at 11:32 PM, Jorge <[hidden email]> wrote:

> I'm setting up a new program to run a Repast model using TestRunner 2.java
> and TestMain 2.java.  The latest FAQ instructions state that "you will need
> to include the classes from repast.simphony.runtime and
> repast.simphony.Batch in your classpath to run."
>
> I added the src and lib jars from both locations
> (repast.simphony.batch_2.3.1 and repast.simphony.runtime_2.3.1), but import
> repast.simphony.engine.environment.AbstractRunner is still not found.  When
> I search for it in Eclipse, I only find it in the
> repast.simphony.bin_and_src.jar.  So are the instructions wrong for this
> section?  Which classes and lib jars do I need?
>
>
>
> --
> View this message in context: http://repast.10935.n7.nabble.com/Control-the-Repast-Simphony-schedule-from-another-Java-program-tp11449.html
> Sent from the repast-interest mailing list archive at Nabble.com.
>
> ------------------------------------------------------------------------------
> Transform Data into Opportunity.
> Accelerate data analysis in your applications with
> Intel Data Analytics Acceleration Library.
> Click to learn more.
> http://pubads.g.doubleclick.net/gampad/clk?id=278785471&iu=/4140
> _______________________________________________
> Repast-interest mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/repast-interest

------------------------------------------------------------------------------
_______________________________________________
Repast-interest mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/repast-interest
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Control the Repast Simphony schedule from another Java program

srcnick
AbstractRunner is in repast.simphony.core, so you should include that as well.

Nick

> On Apr 7, 2016, at 10:24 PM, Jorge Calderon <[hidden email]> wrote:
>
> Any thoughts on this?  I know for RepastMain we shouldn't use
> repast.simphony.bin_and_src.jar, but for AbstractRunner, I don't see
> how else to get the code to compile.
>
> On Fri, Apr 1, 2016 at 11:32 PM, Jorge <[hidden email]> wrote:
>> I'm setting up a new program to run a Repast model using TestRunner 2.java
>> and TestMain 2.java.  The latest FAQ instructions state that "you will need
>> to include the classes from repast.simphony.runtime and
>> repast.simphony.Batch in your classpath to run."
>>
>> I added the src and lib jars from both locations
>> (repast.simphony.batch_2.3.1 and repast.simphony.runtime_2.3.1), but import
>> repast.simphony.engine.environment.AbstractRunner is still not found.  When
>> I search for it in Eclipse, I only find it in the
>> repast.simphony.bin_and_src.jar.  So are the instructions wrong for this
>> section?  Which classes and lib jars do I need?
>>
>>
>>
>> --
>> View this message in context: http://repast.10935.n7.nabble.com/Control-the-Repast-Simphony-schedule-from-another-Java-program-tp11449.html
>> Sent from the repast-interest mailing list archive at Nabble.com.
>>
>> ------------------------------------------------------------------------------
>> Transform Data into Opportunity.
>> Accelerate data analysis in your applications with
>> Intel Data Analytics Acceleration Library.
>> Click to learn more.
>> http://pubads.g.doubleclick.net/gampad/clk?id=278785471&iu=/4140
>> _______________________________________________
>> Repast-interest mailing list
>> [hidden email]
>> https://lists.sourceforge.net/lists/listinfo/repast-interest
>
> ------------------------------------------------------------------------------
> _______________________________________________
> Repast-interest mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/repast-interest


------------------------------------------------------------------------------
_______________________________________________
Repast-interest mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/repast-interest
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Control the Repast Simphony schedule from another Java program

Jorge
Nick,

After taking out repast.simphony.bin_and_src.jar, I had to add repast.simphony.scenario_2.3.1 in addition to repast.simphony.core, repast.simphony.batch_2.3.1, and repast.simphony.runtime_2.3.1.

Do we need to make sure both the class files in bin and the all the JARs are in the lib directories are added?  I went ahead and added "bin" as an external class folder.

repast.simphony.core has watcher_test.jar in the bin directory, which I didn't add and I'm guessing isn't required.

Would there be any problem with just using repast.simphony.bin_and_src.jar instead of repast.simphony.scenario_2.3.1 and repast.simphony.core, and repast.simphony.batch_2.3, but still using repast.simphony.runtime_2.3.1?  It's worked for me in the past as long as it's not in the project classpath when running it with the GUI or on the classpath when using RepastMain.  I've also used it to on the build path when creating another JAR that uses Repast classes, which I later added to a Repast project's lib/build path (but not the repast.simphony.bin_and_src.jar itself) and everything seemed to work.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Control the Repast Simphony schedule from another Java program

srcnick
Jorge,

See my replies below.

> On Apr 15, 2016, at 11:48 PM, Jorge <[hidden email]> wrote:
>
> Nick,
>
> After taking out repast.simphony.bin_and_src.jar, I had to add
> repast.simphony.scenario_2.3.1 in addition to repast.simphony.core,
> repast.simphony.batch_2.3.1, and repast.simphony.runtime_2.3.1.
>
> Do we need to make sure both the class files in bin and the all the JARs are
> in the lib directories are added?  I went ahead and added "bin" as an
> external class folder.

Yes, you should add the bin folder and the jars in lib.

>
> repast.simphony.core has watcher_test.jar in the bin directory, which I
> didn't add and I'm guessing isn't required.

Yes, that’s not necessary.

>
> Would there be any problem with just using repast.simphony.bin_and_src.jar
> instead of repast.simphony.scenario_2.3.1 and repast.simphony.core, and
> repast.simphony.batch_2.3, but still using repast.simphony.runtime_2.3.1?
> It's worked for me in the past as long as it's not in the project classpath
> when running it with the GUI or on the classpath when using RepastMain.
> I've also used it to on the build path when creating another JAR that uses
> Repast classes, which I later added to a Repast project's lib/build path
> (but not the repast.simphony.bin_and_src.jar itself) and everything seemed
> to work.
>

If it works, then its probably OK. If I’m integrating repast code with another application, I only add the required individual repast project’s classes and libraries. There’s no real necessity to do it that, but it does limit the requirements to only what’s actually needed.

Nick

>
>
> --
> View this message in context: http://repast.10935.n7.nabble.com/Control-the-Repast-Simphony-schedule-from-another-Java-program-tp11449p11473.html
> Sent from the repast-interest mailing list archive at Nabble.com.
>
> ------------------------------------------------------------------------------
> Find and fix application performance issues faster with Applications Manager
> Applications Manager provides deep performance insights into multiple tiers of
> your business applications. It resolves application problems quickly and
> reduces your MTTR. Get your free trial!
> https://ad.doubleclick.net/ddm/clk/302982198;130105516;z
> _______________________________________________
> Repast-interest mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/repast-interest


------------------------------------------------------------------------------
Find and fix application performance issues faster with Applications Manager
Applications Manager provides deep performance insights into multiple tiers of
your business applications. It resolves application problems quickly and
reduces your MTTR. Get your free trial!
https://ad.doubleclick.net/ddm/clk/302982198;130105516;z
_______________________________________________
Repast-interest mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/repast-interest
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Control the Repast Simphony schedule from another Java program

Jorge
Nick, will you update the FAQ to state that "repast.simphony.scenario_2.3.1" and "repast.simphony.core" are also required in the classpath (in addition to repast.simphony.runtime and repast.simphony.Batch) in the "How can I control the Repast Simphony schedule from another Java application?" instructions  in the FAQ?
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Control the Repast Simphony schedule from another Java program

srcnick
Yes, good idea.

Nick

> On Apr 30, 2016, at 8:43 PM, Jorge <[hidden email]> wrote:
>
> Nick, will you update the FAQ to state that "repast.simphony.scenario_2.3.1"
> and "repast.simphony.core" are also required in the classpath (in addition
> to repast.simphony.runtime and repast.simphony.Batch) in the "How can I
> control the Repast Simphony schedule from another Java application?"
> instructions  in the FAQ?
>
>
>
> --
> View this message in context: http://repast.10935.n7.nabble.com/Control-the-Repast-Simphony-schedule-from-another-Java-program-tp11449p11503.html
> Sent from the repast-interest mailing list archive at Nabble.com.
>
> ------------------------------------------------------------------------------
> Find and fix application performance issues faster with Applications Manager
> Applications Manager provides deep performance insights into multiple tiers of
> your business applications. It resolves application problems quickly and
> reduces your MTTR. Get your free trial!
> https://ad.doubleclick.net/ddm/clk/302982198;130105516;z
> _______________________________________________
> Repast-interest mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/repast-interest


------------------------------------------------------------------------------
Find and fix application performance issues faster with Applications Manager
Applications Manager provides deep performance insights into multiple tiers of
your business applications. It resolves application problems quickly and
reduces your MTTR. Get your free trial!
https://ad.doubleclick.net/ddm/clk/302982198;130105516;z
_______________________________________________
Repast-interest mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/repast-interest
Loading...