Skip to content

Commit

Permalink
Add instructions for new methods of running GenX (#422)
Browse files Browse the repository at this point in the history
* Add docs for using run_genx_case!

* Add docs section on running separate TDR
  • Loading branch information
cfe316 authored and sambuddhac committed Apr 27, 2023
1 parent ffff9c6 commit c6d748f
Showing 1 changed file with 41 additions and 1 deletion.
42 changes: 41 additions & 1 deletion docs/src/how_to_run_genx.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ The following are the main steps performed in that function:

If your needs are more complex, it is possible to use a customized run script in place of simply calling `run_genx_case!`; the contents of that function could be a starting point.

### Using commercial solvers: Gurobi or CPLEX
## Using commercial solvers: Gurobi or CPLEX
If you want to use the commercial solvers Gurobi or CPLEX:

1. Make sure you have a valid license and the actual solvers for either of Gurobi or CPLEX installed on your machine
Expand Down Expand Up @@ -119,3 +119,43 @@ GenX includes a modeling to generate alternatives (MGA) package that can be used
6. Solve the model using `Run.jl` file.

Results from the MGA algorithm would be saved in `MGA_max` and `MGA_min` folders in the `Example_Systems/` folder.

## Additional method for running GenX cases
_Added in 0.3.4_

The `GenX` module exports a function called `run_genx_case!`.
This function is designed to be used in a script; in fact it is used in each `Run.jl` file.
If one wants to run multiple GenX cases in sequence, this can be especially useful, as `GenX` needs only to be compiled by Julia once, and can be somewhat faster.


Start julia pointed at the appropriate Project, and then proceed as follows:
```
> julia --project=/home/youruser/GenX
julia> using GenX
julia> run_genx_case!("/path/to/case")
```
All output will be written in that case's folder, as usual.

## Performing time domain reduction (TDR) separately from optimization
_Added in 0.3.4_

It may be useful to perform time domain reduction (TDR) (or "clustering") on a set of inputs before using them as part of full GenX optimization case.
For example, a user might want to test various TDR settings and examine the resulting clustered inputs.
This can now be performed using the `run_timedomainreduction!` function.

```
> julia --project=/home/youruser/GenX
julia> using GenX
julia> run_timedomainreduction!("/path/to/case")
```

This function will obey the settings in `path/to/case/Settings/time_domain_reduction_settings.yml`.
It will output the resulting clustered time series files in the case.

Running this function will *overwrite* these files in the case.
(Note that when running a case normally, if these clustered files exist they will *not* be overwritten.)


0 comments on commit c6d748f

Please sign in to comment.