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

object StartNode

Utilities to start a node in a simulation

All of them are simply conveniences to create an instance of se.sics.kompics.simulator.events.system.StartNodeEvent.

Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. StartNode
  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. def apply[C <: kompics.ComponentDefinition, A](addresser: => Address, init: => kompics.Init[C], conf: Map[String, A], stringer: => String)(implicit arg0: scala.reflect.api.JavaUniverse.TypeTag[C]): StartNodeEvent

    Create a node with address and init event, as well as a custom config and a custom toString implementation

    Create a node with address and init event, as well as a custom config and a custom toString implementation

    C

    the component definition for the node

    A

    the value type of the config updates

    addresser

    a function that provides an address for the node

    init

    a function that provides an init event for the node

    conf

    config update values with config keys

    stringer

    a custom implementation for toString for the event (for debugging)

    returns

    a simulator event that starts a node

    See also

    se.sics.kompics.simulator.events.system.StartNodeEvent

  5. def apply[C <: kompics.ComponentDefinition](addresser: => Address, init: => kompics.Init[C], stringer: => String)(implicit arg0: scala.reflect.api.JavaUniverse.TypeTag[C]): StartNodeEvent

    Create a node with address and init event, and a custom toString implementation

    Create a node with address and init event, and a custom toString implementation

    C

    the component definition for the node

    addresser

    a function that provides an address for the node

    init

    a function that provides an init event for the node

    stringer

    a custom implementation for toString for the event (for debugging)

    returns

    a simulator event that starts a node

    See also

    se.sics.kompics.simulator.events.system.StartNodeEvent

  6. def apply[C <: kompics.ComponentDefinition, A](addresser: => Address, init: => kompics.Init[C], conf: Map[String, A])(implicit arg0: scala.reflect.api.JavaUniverse.TypeTag[C]): StartNodeEvent

    Create a node with address and init event, as well as a custom config

    Create a node with address and init event, as well as a custom config

    C

    the component definition for the node

    A

    the value type of the config updates

    addresser

    a function that provides an address for the node

    init

    a function that provides an init event for the node

    conf

    config update values with config keys

    returns

    a simulator event that starts a node

    See also

    se.sics.kompics.simulator.events.system.StartNodeEvent

  7. def apply[C <: kompics.ComponentDefinition](addresser: => Address, init: => kompics.Init[C])(implicit arg0: scala.reflect.api.JavaUniverse.TypeTag[C]): StartNodeEvent

    Create a node with address and init event

    Create a node with address and init event

    C

    the component definition for the node

    addresser

    a function that provides an address for the node

    init

    a function that provides an init event for the node

    returns

    a simulator event that starts a node

    See also

    se.sics.kompics.simulator.events.system.StartNodeEvent

  8. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  9. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @native() @HotSpotIntrinsicCandidate()
  10. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  11. def equals(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef → Any
  12. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  13. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  14. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  15. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  16. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  17. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  18. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  19. def toString(): String
    Definition Classes
    AnyRef → Any
  20. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  21. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()
  22. 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