diff --git a/doc/Installation.md b/doc/Installation.md index 8087147..c4c748e 100644 --- a/doc/Installation.md +++ b/doc/Installation.md @@ -5,7 +5,6 @@ This gensas repository uses [Bazel](https://bazel.build/) as the build tool. The There are also [other ways to install Bazel](https://bazel.build/start). -[//]: # (TODO - rygx: build on other OS (Windows and MacOS) to be verified as a part of https://github.com/ANL-CEEESA/gensas/issues/2) ### Build Gensas At the root of the repository, execute command: ```shell @@ -44,5 +43,23 @@ Json file /tmp/solution.json written. ``` ### Run a power flow -[//]: # (TODO - https://github.com/ANL-CEEESA/gensas/issues/4: fix HDF5 runtime issue) -This is still working in progress (WIP). \ No newline at end of file + +Power flow can be run using the `-p` mode. There are sample input data representing some test models, with sizes ranging from 14 buses to 210,000 buses. + +An example for running the synthetic 210,000-bus system: +``` shell +bazel run //app:app -- -p -f $(pwd)/resources/psat_mat/d_210k.mat -l 25 -s 0.2 +``` + +You should see output like +``` +compMode=-p +Step=0.19375, added=0.19375, (maxDiff<1e-06). +Step=0.39375, added=0.2, (maxDiff<1e-06). +Step=0.553125, added=0.159375, (maxDiff<1e-06). +Step=0.740625, added=0.1875, (maxDiff<1e-06). +Step=0.9, added=0.159375, (maxDiff<1e-06). +Step=1, added=0.1, (maxDiff<1e-06). +Computation No.1 +Computation time: 89.9048 s. +``` \ No newline at end of file diff --git a/doc/Usage.md b/doc/Usage.md index d8a0985..dadec7b 100644 --- a/doc/Usage.md +++ b/doc/Usage.md @@ -4,12 +4,12 @@ Current version only provides AC power flow. Assume the executable is gensas.out, then the power flow computation can be called as follows. ```bash -gensas.out -p - -f/--file - -o/--output - [-l/--level ] - [-s/--segment ] - [-a/--alphatol ] +bazel run //app:app -- -p \ + -f/--file \ + -o/--output \ + [-l/--level ] \ + [-s/--segment ] \ + [-a/--alphatol ] \ [-d/--difftol ] ``` @@ -23,25 +23,25 @@ Explanations: * `-d/--difftol ` (optional) specifies the error tolerance of the equations. If not specified, the error tolerance is set as 1e-6. Example: -Try running power flow of the modified synthetic eastern-interconnection (EI) 70,000-bus system: +Try running power flow of the modified synthetic eastern-interconnection (EI) 70,000-bus system in the project root directory: ```bash -./gensas.out -p -f resources/psat_mat/d_70k_070.mat -s 0.5 -l 28 -d 1e-5 -o res.mat +bazel run //app:app -- -p -f $(pwd)/resources/psat_mat/d_70k_070.mat -s 0.5 -l 28 -d 1e-5 -o res.mat ``` ### ModelicaSAS Currently, ModelicaSAS supports simulation of a single Modelica .mo model without discrete events. The simulation can be called as follows: ```bash -gensas.out -g - -m/--mode file/string - -i/--input - -o/--output - [-j/--json ] - [-l/--level ] - [-s/--segment ] - [-a/--aTol ] - [-e/--eTol ] - [-t/--outStep ] +bazel run //app:app -- -g \ + -m/--mode file/string \ + -i/--input \ + -o/--output \ + [-j/--json ] \ + [-l/--level ] \ + [-s/--segment ] \ + [-a/--aTol ] \ + [-e/--eTol ] \ + [-t/--outStep ] \ [-v/--verbose] ``` @@ -60,11 +60,11 @@ Explanations: * `-v/--verbose` (optional) if used, will print intermediate result in SAS computation. Example: -Try running simulation of the model in `resources/mofile/test_solve_ode.mo`. +Try running simulation of the model in `resources/mofile/test_solve_ode.mo` in the project root directory. ```bash - ./gensas.out -g - -m file -i resources/mofile/test_solve_ode.mo - -o resources/mofile/test_solve_ode.mat + bazel run //app:app -- -g \ + -m file -i $(pwd)/resources/mofile/test_solve_ode.mo \ + -o resources/mofile/test_solve_ode.mat \ -t 15 ``` \ No newline at end of file