simulation

package
v0.8.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 13, 2025 License: GPL-3.0 Imports: 10 Imported by: 0

README

internal/simulation

Responsibility

  • Implements the core simulation logic.
  • Manages the simulation loop and updates the simulation state.

Scope

  • Simulation loop implementation.
  • State update logic.
  • Physics calculations.

Test Suite Overview

  • Tests should cover the simulation loop, state updates, and physics calculations.

Decisions & Potential Gotchas

  • Physics calculations may need to be optimized for performance.
  • State update logic should be well-defined and documented.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Manager

type Manager struct {
	// contains filtered or unexported fields
}

Manager handles the overall simulation lifecycle.

func NewManager

func NewManager(cfg *config.Config, log logf.Logger) *Manager

NewManager creates a new simulation manager.

func (*Manager) Close

func (m *Manager) Close() error

func (*Manager) GetStatus

func (m *Manager) GetStatus() ManagerStatus

func (*Manager) Initialize

func (m *Manager) Initialize(stores *storage.Stores) error

Initialize sets up the simulation manager. It now accepts the storage.Stores instance created externally.

func (*Manager) Run

func (m *Manager) Run() error

Run starts a new simulation if the manager is idle.

type ManagerStatus added in v0.3.6

type ManagerStatus string

ManagerStatus represents the status of the simulation manager.

const (
	StatusIdle         ManagerStatus = "idle"
	StatusInitializing ManagerStatus = "initializing"
	StatusRunning      ManagerStatus = "running"
	StatusCompleted    ManagerStatus = "completed"
	StatusFailed       ManagerStatus = "failed"
	StatusClosed       ManagerStatus = "closed"
)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL