Skip to content

Latest commit

 

History

History
22 lines (19 loc) · 590 Bytes

File metadata and controls

22 lines (19 loc) · 590 Bytes

Electrical Circuit Solver

This project generates a random electrical circuit represented as a graph and computes branch currents using Kirchhoff’s laws.

Features:

  • Generates a connected random graph
  • Assigns random resistances to edges
  • Adds a voltage source (ε)
  • Find cycles in the graph
  • Builds equations using Kirchhoff’s laws
  • Solves the resulting linear system
  • Visualizes resistances and currents with directions

Usage

  1. Open Julia in the project folder
  2. Run the following commands:
using Pkg
Pkg.activate(".")
Pkg.instantiate()
include("main.jl")