AlgebraicJulia / ASKEM-demos

6 stars 1 forks source link

Error in display functions: display_uwd(), Graph() #11

Closed RajDandekar closed 1 year ago

RajDandekar commented 1 year ago

Here is the code snippet I'm trying to run:

using ModelingToolkit
using AlgebraicPetri
using AlgebraicPetri.Epidemiology
using AlgebraicPetri.BilayerNetworks

using Catlab
using Catlab.CategoricalAlgebra
using Catlab.Graphics
import Catlab.CategoricalAlgebra: migrate!
using Catlab.WiringDiagrams
using Catlab.Programs.RelationalPrograms
display_uwd(ex) = to_graphviz(ex, box_labels=:name, junction_labels=:variable, edge_attrs=Dict(:len=>".75"));

sir = @relation (s,i,r) begin
    infection(s,i)
    recovery(i,r)
end
display_uwd(sir)

psir = apex(oapply_epi(sir))
psir
Graph(psir)

I get an error with the display_uwd(sir), Graph(psir) functions..

What am I missing here?

jpfairbanks commented 1 year ago

Is the error from dot not being installed? You have to use the system package manager to install graphviz. Like apt, brew or the exe from https://graphviz.org/download/

RajDandekar commented 1 year ago

Thanks @jpfairbanks It works after installing graphviz..Closing this issue