Packages

  • package root
    Definition Classes
    root
  • package se
    Definition Classes
    root
  • package sics
    Definition Classes
    se
  • package kompics
    Definition Classes
    sics
  • package sl

    This package contains the Scala DSL for Kompics.

    This package contains the Scala DSL for Kompics.

    It is recommended to import this as import se.sics.kompics.sl._, since it contains a number of implicit conversions and convenience methods that are good to have in scope.

    Definition Classes
    kompics
  • package simulator

    The Kompics Simulator DSL for Scala

    The Kompics Simulator DSL for Scala

    Definition Classes
    sl
    Example:
    1. case object SimpleSimulation {
      
        import Distributions._
        // needed for the distributions, but needs to be initialised after setting the seed
        implicit val random = JSimulationScenario.getRandom();
      
        private def intToAddress(i: Int): Address = {
          try {
            new TAddress(new InetSocketAddress(InetAddress.getByName("192.193.0." + i), 10000));
          } catch {
            case ex: UnknownHostException => throw new RuntimeException(ex);
          }
        }
      
        val startResultSetterOp = Op { (self: Integer) =>
          val selfAddr = intToAddress(self);
          StartNode(selfAddr, Init[ResultSetter](selfAddr))
        };
        val startPongerOp = Op { (self: Integer) =>
          val selfAddr = intToAddress(self)
          StartNode(selfAddr, Init[PongerParent](selfAddr))
        };
        val startPingerOp = Op { (self: Integer, ponger: Integer) =>
          val selfAddr = intToAddress(self);
          val pongerAddr = intToAddress(ponger);
          StartNode(selfAddr, Init[PingerParent](selfAddr, pongerAddr))
        };
      
        val scenario = raise(5, startPongerOp, 1.toN)
          .arrival(constant(1000.millis))
          .andThen(1000.millis)
          .afterTermination(raise(5, startPingerOp, 6.toN, 1.toN).arrival(constant(1000.millis)))
          .inParallel(raise(1, startResultSetterOp, 1.toN).arrival(constant(1000.millis)))
          .andThen(10000.millis)
          .afterTermination(Terminate);
      }
  • ChangeNetwork
  • Distributions
  • IntDistributions
  • KillNode
  • Op
  • Setup
  • SimulationResult
  • StartNode
  • StochasticProcess
  • StochasticProcessBuilder
  • StochasticProcessChain
  • Terminate
o

se.sics.kompics.sl.simulator

Distributions

object Distributions

Convenience DSL objects for building different kinds of distributions.

Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Distributions
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  5. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @native() @HotSpotIntrinsicCandidate()
  6. def constant(value: BigInteger): Distribution[BigInteger]

    A constant distribution for big integer values

    A constant distribution for big integer values

    value

    the value to return on every sample

    returns

    a new distribution object

    See also

    se.sics.kompics.simulator.adaptor.distributions.ConstantDistribution

  7. def constant(value: Duration): Distribution[Long]

    A constant distribution for duration values

    A constant distribution for duration values

    Is translated internally to a long distribution of millisecond values.

    value

    the value to return on every sample

    returns

    a new distribution object

    See also

    se.sics.kompics.simulator.adaptor.distributions.ConstantDistribution

  8. def constant(value: Long): Distribution[Long]

    A constant distribution for long values

    A constant distribution for long values

    value

    the value to return on every sample

    returns

    a new distribution object

    See also

    se.sics.kompics.simulator.adaptor.distributions.ConstantDistribution

  9. def constant(value: Double): Distribution[Double]

    A constant distribution for double values

    A constant distribution for double values

    value

    the value to return on every sample

    returns

    a new distribution object

    See also

    se.sics.kompics.simulator.adaptor.distributions.ConstantDistribution

  10. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  11. def equals(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef → Any
  12. def exponential(mean: BigInteger)(implicit random: Random): Distribution[BigInteger]

    An exponential distribution over big integer values

    An exponential distribution over big integer values

    mean

    the mean sample value

    returns

    a new distribution object

    See also

    se.sics.kompics.simulator.adaptor.distributions.BigIntegerExponentialDistribution

  13. def exponential(mean: Duration)(implicit random: Random): Distribution[Long]

    An exponential distribution over duration values

    An exponential distribution over duration values

    Is translated internally to a long distribution of millisecond values.

    mean

    the mean sample value

    returns

    a new distribution object

    See also

    se.sics.kompics.simulator.adaptor.distributions.LongExponentialDistribution

  14. def exponential(mean: Long)(implicit random: Random): Distribution[Long]

    An exponential distribution over long values

    An exponential distribution over long values

    mean

    the mean sample value

    returns

    a new distribution object

    See also

    se.sics.kompics.simulator.adaptor.distributions.LongExponentialDistribution

  15. def exponential(mean: Double)(implicit random: Random): Distribution[Double]

    An exponential distribution over double values

    An exponential distribution over double values

    mean

    the mean sample value

    returns

    a new distribution object

    See also

    se.sics.kompics.simulator.adaptor.distributions.DoubleExponentialDistribution

  16. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  17. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  18. def intSeq(start: Int): Distribution[Integer]

    A natural sequence where sampling always returns the next value

    A natural sequence where sampling always returns the next value

    The first returned value is start and then it's always previous+1

    start

    the beginning of the sequence

    returns

    a new distribution object

    See also

    se.sics.kompics.simulator.adaptor.distributions.extra.BasicIntSequentialDistribution

  19. def intSeq(range: Range): Distribution[Integer]

    A concrete sequence where sampling always returns the next value

    A concrete sequence where sampling always returns the next value

    range

    the range of integers to sample from

    returns

    a new distribution object

    See also

    se.sics.kompics.simulator.adaptor.distributions.extra.GenIntSequentialDistribution

  20. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  21. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  22. def normal(mean: BigInteger, variance: BigInteger)(implicit random: Random): Distribution[BigInteger]

    A normal distribution over big integer values

    A normal distribution over big integer values

    mean

    the mean sample value

    variance

    the variance of sampled values

    returns

    a new distribution object

    See also

    se.sics.kompics.simulator.adaptor.distributions.BigIntegerNormalDistribution

  23. def normal(mean: Duration, variance: Long)(implicit random: Random): Distribution[Long]

    A normal distribution over duration values

    A normal distribution over duration values

    Is translated internally to a long distribution of millisecond values.

    mean

    the mean sample value

    variance

    the variance of sampled values

    returns

    a new distribution object

    See also

    se.sics.kompics.simulator.adaptor.distributions.LongNormalDistribution

  24. def normal(mean: Long, variance: Long)(implicit random: Random): Distribution[Long]

    A normal distribution over long values

    A normal distribution over long values

    mean

    the mean sample value

    variance

    the variance of sampled values

    returns

    a new distribution object

    See also

    se.sics.kompics.simulator.adaptor.distributions.LongNormalDistribution

  25. def normal(mean: Double, variance: Double)(implicit random: Random): Distribution[Double]

    A normal distribution over double values

    A normal distribution over double values

    mean

    the mean sample value

    variance

    the variance of sampled values

    returns

    a new distribution object

    See also

    se.sics.kompics.simulator.adaptor.distributions.DoubleNormalDistribution

  26. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  27. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  28. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  29. def toString(): String
    Definition Classes
    AnyRef → Any
  30. def uniform(numBits: Int)(implicit random: Random): Distribution[BigInteger]

    A uniform distribution over big integer values

    A uniform distribution over big integer values

    numBits

    the number of random bits to generate for each sample

    returns

    a new distribution object

    See also

    se.sics.kompics.simulator.adaptor.distributions.BigIntegerUniformDistribution

  31. def uniform(min: BigInteger, max: BigInteger)(implicit random: Random): Distribution[BigInteger]

    A uniform distribution over big integer values

    A uniform distribution over big integer values

    min

    the lower bound for sample values

    max

    the upper bound for sample values

    returns

    a new distribution object

    See also

    se.sics.kompics.simulator.adaptor.distributions.BigIntegerUniformDistribution

  32. def uniform(min: Duration, max: Duration)(implicit random: Random): Distribution[Long]

    A uniform distribution over duration values

    A uniform distribution over duration values

    Is translated internally to a long distribution of millisecond values.

    min

    the lower bound for sample values

    max

    the upper bound for sample values

    returns

    a new distribution object

    See also

    se.sics.kompics.simulator.adaptor.distributions.LongUniformDistribution

  33. def uniform(min: Long, max: Long)(implicit random: Random): Distribution[Long]

    A uniform distribution over long values

    A uniform distribution over long values

    min

    the lower bound for sample values

    max

    the upper bound for sample values

    returns

    a new distribution object

    See also

    se.sics.kompics.simulator.adaptor.distributions.LongUniformDistribution

  34. def uniform(min: Double, max: Double)(implicit random: Random): Distribution[Double]

    A uniform distribution over double values

    A uniform distribution over double values

    min

    the lower bound for sample values

    max

    the upper bound for sample values

    returns

    a new distribution object

    See also

    se.sics.kompics.simulator.adaptor.distributions.DoubleUniformDistribution

  35. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  36. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()
  37. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])

Deprecated Value Members

  1. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable]) @Deprecated @deprecated
    Deprecated

    (Since version ) see corresponding Javadoc for more information.

Inherited from AnyRef

Inherited from Any

Ungrouped