Skip to content

Getting Started with SimLab

Welcome to the getting started guide for SimLab, a toolkit for simulating various business scenarios including stock market fluctuations, resource price dynamics, and product popularity. This guide will walk you through the installation options and different ways to use SimLab.

Installation Options

SimLab offers flexible installation options depending on your needs:

Basic Installation

For core simulation functionality only:

pip install simnexus

Full Installation

For all features including CLI, web interface, and development tools:

pip install simnexus[dev]

Component-Specific Installation

For specific interfaces:

# Command-line interface
pip install simnexus[cli]

# Web interface
pip install simnexus[web]

Install from GitHub

For the latest development version:

pip install git+https://github.com/michael-borck/simnexus.git

Verify Installation

To ensure that SimLab was installed correctly:

python -c "import simnexus; print(simnexus.__version__)"

Or using the CLI:

simnexus --version

Usage Methods

SimLab offers multiple ways to run simulations:

1. Python Library

Import SimLab in your Python code:

from simnexus import StockMarketSimulation

# Create a simulation instance
sim = StockMarketSimulation(
    start_price=100,
    days=365,
    volatility=0.03,
    drift=0.001,
    event_day=180,
    event_impact=-0.2,
    random_seed=42
)

# Run the simulation
prices = sim.run_simulation()

# Use the results
print(f"Final price: ${prices[-1]:.2f}")

2. Command Line Interface

Run simulations directly from the command line:

# Stock market simulation
simnexus sim stock run --days 365 --event-day 180 --event-impact -0.2 --output results.csv

# Resource fluctuations simulation
simnexus sim resource run --volatility 0.05 --disruption-day 100 --disruption-severity 0.3

3. Web Interface

Launch the web interface for interactive simulation:

simnexus ui web

Then open your browser at http://localhost:8000.

4. Terminal UI

Launch the terminal user interface (TUI):

simnexus ui tui

Example Resources

SimLab includes comprehensive examples to help you get started:

  • Python Examples: Basic scripts showing simulation usage
  • CLI Examples: Shell scripts demonstrating command-line capabilities
  • Jupyter Notebooks: Interactive examples for data analysis

See the examples directory in the repository.

Next Steps

Getting Help

If you encounter any issues or have questions:

  • Check the documentation
  • Run simnexus --help for CLI assistance
  • Contact information is available on the Contact page

Happy simulating with SimLab!