Giter Site home page Giter Site logo

ssj's People

Contributors

chwyean avatar florianpuchhammer avatar mdthiongane avatar mungerd avatar o-nc avatar pierrelecuyer avatar pierremarion23 avatar savamarc avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ssj's Issues

Compilation broken on fresh install in Linux

Calling ./gradlew on a new download of the repository does not perform the tests as expected. On Solus 4.0, I get the following output.

:compileJava
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
:processResources UP-TO-DATE
:classes
:dataHups
:dataRng
Creating the GenF2w32 state transition matrices.
:data
:jniCopy UP-TO-DATE
:jar
:distTar
:distZip
:assemble
:compileTestJava
/home/marc/Dropbox/Ecole/Maitrise/rng/code/ssj/src/test/java/CompareOutputs.java:22: error: cannot find symbol
                 { "tutorial", BankEv.class,       null },
                               ^
  symbol:   class BankEv
  location: class CompareOutputs
/home/marc/Dropbox/Ecole/Maitrise/rng/code/ssj/src/test/java/CompareOutputs.java:23: error: cannot find symbol
                 { "tutorial", CallCenter.class,   new String[]{"tutorial/CallCenter.dat"} },
                               ^
  symbol:   class CallCenter
  location: class CompareOutputs
/home/marc/Dropbox/Ecole/Maitrise/rng/code/ssj/src/test/java/CompareOutputs.java:25: error: cannot find symbol
                 { "tutorial", Collision.class,    null },
                               ^
  symbol:   class Collision
  location: class CompareOutputs
/home/marc/Dropbox/Ecole/Maitrise/rng/code/ssj/src/test/java/CompareOutputs.java:26: error: cannot find symbol
                 { "tutorial", InventoryCRN.class, null },
                               ^
  symbol:   class InventoryCRN
  location: class CompareOutputs
/home/marc/Dropbox/Ecole/Maitrise/rng/code/ssj/src/test/java/CompareOutputs.java:27: error: cannot find symbol
                 { "tutorial", Inventory.class,    null },
                               ^
  symbol:   class Inventory
  location: class CompareOutputs
/home/marc/Dropbox/Ecole/Maitrise/rng/code/ssj/src/test/java/CompareOutputs.java:28: error: cannot find symbol
                 { "tutorial", Nonuniform.class,   null },
                               ^
  symbol:   class Nonuniform
  location: class CompareOutputs
/home/marc/Dropbox/Ecole/Maitrise/rng/code/ssj/src/test/java/CompareOutputs.java:29: error: cannot find symbol
                 { "tutorial", PreyPred.class,     null },
                               ^
  symbol:   class PreyPred
  location: class CompareOutputs
/home/marc/Dropbox/Ecole/Maitrise/rng/code/ssj/src/test/java/CompareOutputs.java:30: error: cannot find symbol
                 { "tutorial", QueueEv.class,      null },
                               ^
  symbol:   class QueueEv
  location: class CompareOutputs
/home/marc/Dropbox/Ecole/Maitrise/rng/code/ssj/src/test/java/CompareOutputs.java:31: error: cannot find symbol
                 { "tutorial", QueueLindley.class, null },
                               ^
  symbol:   class QueueLindley
  location: class CompareOutputs
/home/marc/Dropbox/Ecole/Maitrise/rng/code/ssj/src/test/java/CompareOutputs.java:32: error: cannot find symbol
                 { "tutorial", QueueObs.class,     null },
                               ^
  symbol:   class QueueObs
  location: class CompareOutputs
/home/marc/Dropbox/Ecole/Maitrise/rng/code/ssj/src/test/java/CompareOutputs.java:33: error: cannot find symbol
                 { "probdistmulti/norta", ExampleNortaInitDisc.class, null }
                                          ^
  symbol:   class ExampleNortaInitDisc
  location: class CompareOutputs
/home/marc/Dropbox/Ecole/Maitrise/rng/code/ssj/src/test/java/ExamplesTest.java:17: error: cannot find symbol
            { BoxTest.class },
              ^
  symbol:   class BoxTest
  location: class ExamplesTest
/home/marc/Dropbox/Ecole/Maitrise/rng/code/ssj/src/test/java/ExamplesTest.java:18: error: cannot find symbol
            { ChartTest1.class },
              ^
  symbol:   class ChartTest1
  location: class ExamplesTest
/home/marc/Dropbox/Ecole/Maitrise/rng/code/ssj/src/test/java/ExamplesTest.java:19: error: cannot find symbol
            { ChartTest2.class },
              ^
  symbol:   class ChartTest2
  location: class ExamplesTest
/home/marc/Dropbox/Ecole/Maitrise/rng/code/ssj/src/test/java/ExamplesTest.java:20: error: cannot find symbol
            { ContDistPlot.class },
              ^
  symbol:   class ContDistPlot
  location: class ExamplesTest
/home/marc/Dropbox/Ecole/Maitrise/rng/code/ssj/src/test/java/ExamplesTest.java:21: error: cannot find symbol
            { DistIntTest.class },
              ^
  symbol:   class DistIntTest
  location: class ExamplesTest
/home/marc/Dropbox/Ecole/Maitrise/rng/code/ssj/src/test/java/ExamplesTest.java:22: error: cannot find symbol
            { EmpiricalChartTest.class },
              ^
  symbol:   class EmpiricalChartTest
  location: class ExamplesTest
/home/marc/Dropbox/Ecole/Maitrise/rng/code/ssj/src/test/java/ExamplesTest.java:23: error: cannot find symbol
            { HistogramChartTest.class },
              ^
  symbol:   class HistogramChartTest
  location: class ExamplesTest
/home/marc/Dropbox/Ecole/Maitrise/rng/code/ssj/src/test/java/ExamplesTest.java:24: error: cannot find symbol
            { HistogramTest1.class },
              ^
  symbol:   class HistogramTest1
  location: class ExamplesTest
/home/marc/Dropbox/Ecole/Maitrise/rng/code/ssj/src/test/java/ExamplesTest.java:25: error: cannot find symbol
            { NormalChart.class },
              ^
  symbol:   class NormalChart
  location: class ExamplesTest
20 errors
:compileTestJava FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':compileTestJava'.
> Compilation failed; see the compiler error output for details.

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

BUILD FAILED

Total time: 23.41 secs

I get a similar error in Debian. I cannot suggest a fix as I am not familiar enough with graddle.

Evaluate the spline function using knots and control points at a given point in time

Hi there,
We are trying to use the SSJ library to fit time series data using B-splines. The goal is simply to reduce the number of data points we are storing instead of storing the complete time series.
We are storing control points and knots in a DB and then with the use of those params we want to get estimated original time series. We have an evaluate function in BSpline class which we can use to get original time series but problem is one needs b-spline object created through createApproxBSpline function to use that function.

Is there any way by which we can make use of knots and control points (parameters we get by calling createApproxBSpline function) to create b-spline object which in turn can be used to call evaluate function and get estimate of original time series? If you have an example that shows how to actually evaluate the spline function using knots and control points at a given point in time it would
really help us. We are not sure right now if this is not possible in SSJ, or if we are using it incorrectly.Thanks for taking a look.Really appreciate it.

Remove static Entry in SplayTree, RedblackTree, ...

I have been running multiple simulators in parallel in the same JVM by using a ExecutorService like this:

ExecutorService ex = Executors.newFixedThreadPool(numThreads);
workList.forEach(r -> ex.submit(r));
ex.shutdown();
ex.awaitTermination(20, TimeUnit.HOURS);

where r is a Runnable class that executes a Simulator, and workList is a List that contains multiple runnable jobs.

I found that the Java program did not scale well when I increased the number of threads to run in parallel. I dug into the code of SSJ, and I found that the EventLists (SplayTree, RedblackTree, ...) use synchronized code like here.

To my understanding, the synchronized code is there because static Entry free is used to recycle the free node in the whole JVM. Also, we can see synchronized (SplayTree.class) will slow down the simulators running in parallel, instead of synchronized(this) (but this will not work with static Entry free).

I compiled a version of SSJ without static Entry nor synchronized, and the parallelized simulation time scaled well (and much better) with the number of cores.

In my opinion, we should remove the static keyword in here, because the memory usage should not be dramatic to have one free Entry per EventList. This will increase the performance when running multiple simulations in parallel in the same JVM.

init with event list clears the list

https://github.com/umontreal-simul/ssj/blob/master/src/main/java/umontreal/ssj/simevents/Simulator.java#L122

The method comment says 'To initialize the current Simulator with a not empty eventList is also possible, but the events scheduled in the eventList will be linked with the current simulator only.', but the method calls init() on line 129 which in turn clears the event list on line 110 so it does not look like it is possible to initialize the simulator with a non-empty event list.

Add link to the PDF documentation in the User's Guide

In the User's Guide the phrase "in the doc/pdf subdirectory of the SSJ distribution" appears repeatedly. However, as it is explained somewhere else

There is no detailed .pdf documentation (for now) for the new version, but the .pdf documentation of version 2.6.2 still (mostly) applies

Therefore, I would like to suggest that the User's Guide includes the above notice and a link to the PDF documentation located here.

Bug in DEDerivativeGaussian

I'm currently trying to calculate density on a dataset which consists of 585 double values.
First i created a new instance by:
DensityEstimator de = new DEDerivativeGaussian(bandwidth, scaledTime);
where bandwidth is a double, calculated by scotts rule and
scaledTime is a double array containing the 585 values, each value is between 0 and 1.

When calling
de.evalDensity(linspace);
an ArrayIndexOutOfBoundsException is thrown.
Original exception:
Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 200 at umontreal.ssj.stat.density.DEDerivativeGaussian.evalDensity(DEDerivativeGaussian.java:137) at modelseletion.MontrealDE.getPlotData(MontrealDE.java:21) at Main.main(Main.java:23)
linspace is a double array containing 200 values from 0 to 1 ascending in equal steps.

Calculating the density of a single value works perfectly fine.

I would propably try to fix it, as it seems to be an easy fix, but the project won't build locally and i currently don't have enough time.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.