OldExamples.jl icon indicating copy to clipboard operation
OldExamples.jl copied to clipboard

Making examples self contained

Open jd-lara opened this issue 3 years ago • 2 comments

Several examples, specially the PSI ones, depend on previous code and include calls like this one:

pkgpath = dirname(dirname(pathof(SIIPExamples)))
include(
    joinpath(pkgpath, "test", "3_PowerSimulations_examples", "01_operations_problems.jl"),
)

we should make the scripts independent and not rely on calling another script in the test folder to run.

jd-lara avatar Dec 17 '21 02:12 jd-lara

To the point, runnning 02_sequential_simulations.jl looks like this:

image

jd-lara avatar Dec 17 '21 02:12 jd-lara

With previous versions of PSI, this was useful because some of the examples were quite repetitive with a lot of repeated code and substantial overhead. With the addition of PowerSystemCaseBuilder, and the interface improvements in PowerSimulations, I agree that each example should be self contained. I'll address with the PSI updates.

claytonpbarrows avatar Dec 20 '21 22:12 claytonpbarrows