Skip to content

Commit

Permalink
add minimum spanning tree docs to README
Browse files Browse the repository at this point in the history
  • Loading branch information
jbytecode committed Nov 19, 2023
1 parent b8b82b1 commit 6568c65
Showing 1 changed file with 28 additions and 3 deletions.
31 changes: 28 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,33 @@ result = game(mat)

## Minimum Spanning Tree

```julia
julia> conns = Connection[
Connection(1, 2, 10),
Connection(2, 3, 10),
Connection(3, 4, 10),
Connection(1, 4, 10)
]
4-element Vector{Connection}:
Connection(1, 2, 10, "x12")
Connection(2, 3, 10, "x23")
Connection(3, 4, 10, "x34")
Connection(1, 4, 10, "x14")

julia> result = mst(conns)
MstResult(Connection[Connection(3, 4, 10, "x34"), Connection(1, 4, 10, "x14"), Connection(2, 3, 10, "x23")], 30.0)

julia> result.distance
30.0

julia> result.connections
3-element Vector{Connection}:
Connection(3, 4, 10, "x34")
Connection(1, 4, 10, "x14")
Connection(2, 3, 10, "x23")

```

## CPM (Critical Path Method)

## PERT (Project Evaluation and Review Technique)
Expand Down Expand Up @@ -177,10 +204,8 @@ All variables are non-negative
```

```julia
simplexpretty(problem)
```
julia> simplexpretty(problem)

```
[ Info: The problem:
Maximize -> 2.0x1 + 3.0x2
S.t:
Expand Down

0 comments on commit 6568c65

Please sign in to comment.