API Questions
Can we use a hotstart in EPANET?
Yes, We need to make a run and save the Hydraulic State. This will be the HotStart file. After that you just need to load the HotStart file.
from epanet.toolkit import EPANET2 as en
# Create and save a hotstart file
en.EN_open("network.inp", "report.rpt", "out.bin")
en.EN_solveH()
en.EN_savehydfile("initial_hotstart.hsf")
en.EN_close()
# Use the hotstart file for a new simulation
en.EN_open("network.inp", "report_new.rpt", "out_new.bin")
en.EN_usehydfile("initial_hotstart.hsf")
en.EN_solveH()
en.EN_close()



What formats can we read into a EPANET? Can we push in a network as a memory object or are we going to need to create a temp inp or network file?
We are going to need to have an INP file or re-write a lot of code. writing a temp INP file might just be easier.
Does EPANET have the ability to write an INP file from the API?
Yes, it does the method is called EN_saveinpfile()
