Class GettingStarted

java.lang.Object
jline.examples.java.GettingStarted

public class GettingStarted extends Object
Getting started examples
  • Constructor Details

    • GettingStarted

      public GettingStarted()
  • Method Details

    • tut01_mm1_basics

      public static Network tut01_mm1_basics()
      Getting started example 1: Basic M/M/1 queue.

      Features: - Simple M/M/1 queueing system - Exponential arrivals (rate 1.0) and service (rate 2.0) - FCFS scheduling with single server - JMT solver demonstration with result printing - Shows basic network construction and solution

      Returns:
      configured M/M/1 network model
    • tut02_mg1_multiclass_solvers

      public static Network tut02_mg1_multiclass_solvers()
      Getting started example 2: M/G/1 queue with two classes.

      Features: - Two open classes with different service distributions - Class1: Erlang service distribution (SCV = 1/3) - Class2: Trace-driven service using APH fitting - Demonstrates empirical data integration via Replayer - Manual routing matrix construction

      Returns:
      configured M/G/1 multi-class network model
    • tut03_repairmen

      public static Network tut03_repairmen()
      Getting started example 3: Machine Repair Problem (MRP).

      Features: - Closed network with 3 machines - Working state (delay) and repair queue with 2 servers - CTMC solver for exact state space analysis - Steady state probability computation - Demonstrates closed system modeling

      Returns:
      configured machine repair model
    • tut04_lb_routing

      public static Network tut04_lb_routing()
      Getting started example 4: Load balancing with routing strategies.

      Features: - Load balancer (router) distributing jobs to two PS queues - Demonstrates RAND (random) and RROBIN (round-robin) routing - Identical service rates for fair comparison - Shows how to change routing strategies dynamically - Model reset and re-solve for strategy comparison

      Returns:
      configured load balancing network model
    • tut05_completes_flag

      public static Network tut05_completes_flag()
      Getting started example 5: Class switching in single-node network.

      Features: - Three closed classes cycling through Class1→Class2→Class3→Class1 - Single FCFS queue with different Erlang service for each class - Demonstrates class switching routing matrix - Shows impact of setCompletes(false) on performance metrics - NC solver for exact normalizing constant computation

      Returns:
      configured class switching model
    • tut06_cache_lru_zipf

      public static Network tut06_cache_lru_zipf()
      Getting started example 6: Cache modeling with Zipf access pattern.

      Features: - LRU cache with 1000 items and capacity 50 - Zipf distribution (α=1.4) for realistic access patterns - Three classes: ClientClass, HitClass, MissClass - Different service times for cache hits vs misses - Demonstrates cache performance analysis

      Returns:
      configured cache network model
    • tut07_respt_cdf

      public static Network tut07_respt_cdf()
      Getting started example 7: Simple closed network for optimization.

      Features: - Basic closed network with delay and PS queue - Single closed class with 5 jobs - Demonstrates foundation for optimization studies - Shows basic structure for parameter analysis

      Returns:
      configured simple closed network model
    • tut08_opt_load_balancing

      public static Network tut08_opt_load_balancing()
      Getting started example 8: Optimization with COBYLA algorithm.

      Features: - Closed load balancing network with optimization - Two PS queues with different service rates - COBYLA optimizer to find optimal routing probability - Minimizes average system response time - Demonstrates integration of queueing models with optimization

      Returns:
      optimized load balancing network model
    • tut09_dep_process_analysis

      public static void tut09_dep_process_analysis()
      Getting started example 9: Studying a departure process.

      Features: - Analysis of departure process from M/E/1 queue - CTMC solver with system sampling (sampleSysAggr) - Departure event filtering and inter-departure time analysis - Comparison of empirical vs theoretical SCV (Marshall's formula) - Demonstrates advanced sampling and stochastic analysis The Java implementation fully supports departure process analysis including: - Filtering departure events from sampled trajectories - Computing inter-departure times and empirical SCV - Calculating theoretical SCV using Marshall's formula - Comparing empirical vs theoretical results

    • tut10_lqn_basics

      public static LayeredNetwork tut10_lqn_basics()
      Getting started example 10: Basic layered queueing network.

      Features: - Layered queueing network (LQN) modeling - Two-tier client-server application - Client processor and database processor - Reference task with think time - Synchronous calls between tasks - Multiple database calls per client request - Demonstrates hierarchical performance analysis

      Returns:
      configured layered network model
    • tut11_random_env

      public static Environment tut11_random_env() throws Exception
      Getting started example 11: Random environments and SolverENV.

      This tutorial has been moved to RandomEnvExamples.example_random_env_basics(). This method delegates to that implementation for backward compatibility.

      This tutorial illustrates how to model a queueing system operating in a random environment, where system parameters (e.g., service rates) change according to an underlying environmental process.

      Scenario: A server that alternates between "Fast" and "Slow" modes. In Fast mode, service rate is 4.0. In Slow mode, service rate is 1.0. The environment switches from Fast->Slow at rate 0.5 and Slow->Fast at rate 1.0.

      Features: - Random environment with two operational stages - Stage-dependent service rates - Exponential transitions between environment stages - ENV solver with Fluid (FLD) sub-solver - Environment-averaged performance metrics

      Returns:
      configured environment model
      Throws:
      Exception - if solver encounters an error
      See Also:
    • tut12_posterior_analysis

      public static Network tut12_posterior_analysis()
      Getting started example 12: Posterior analysis with uncertain parameters.

      Models an M/M/1 queue with arrival rate λ = 0.5 and an uncertain service rate represented by a Prior with 30 Gaussian-weighted alternatives over [0.7, 2.5] centred at μ = 1.3. The Posterior solver wraps an inner solver (here MVA), runs it once per alternative, and aggregates the per-alternative results into prior-weighted means and per-alternative empirical posterior CDFs.

      Returns:
      the M/M/1 network with the Prior service distribution
    • tut13_cluster

      public static Network tut13_cluster()
      Getting started example 13: Open cluster.

      Source -> Dispatcher (Router) -> Server[1..M] -> Sink, with a single open class. The example contrasts two equivalent ways to build the model: the one-liner

      invalid reference
      Network#clusterPs(Matrix, Matrix)
      factory, and the chainable Cluster builder, which also exposes helpers to compare dispatching policies on the same cluster.
      Returns:
      the open cluster Network built via the one-liner factory
    • main

      public static void main(String[] args) throws IllegalAccessException, ParserConfigurationException
      Main method for testing and demonstrating getting started examples.

      Currently configured to run tut09_dep_process_analysis() and solve it using the SSA solver with specified sampling parameters.

      Parameters:
      args - command line arguments (not used)
      Throws:
      IllegalAccessException - if access restrictions prevent execution
      ParserConfigurationException - if XML parsing configuration fails