Skip to content

Commit 1d3943a

Browse files
committed
Corrected indexing
1 parent 146916a commit 1d3943a

File tree

62 files changed

+80148
-677
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

62 files changed

+80148
-677
lines changed
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# Three Zones
2+
3+
**Three Zones**, a one-year example with hourly resolution, contains zones representing Massachusetts, Connecticut, and Maine. The ten represented resources include natural gas, solar PV, wind, and lithium-ion battery storage.
4+
5+
To run the model, first navigate to the example directory:
6+
7+
- Using a Julia REPL:
8+
9+
```bash
10+
$ julia
11+
julia> cd("example_systems/1_three_zones/")
12+
```
13+
14+
- Using a terminal or command prompt:
15+
```bash
16+
$ cd example_systems/1_three_zones/
17+
```
18+
19+
Next, ensure that your settings in `settings/genx_settings.yml` are correct. The default settings use the solver `HiGHS`, time domain reduced input data (`TimeDomainReduction: 1`) and minimum capacity requirement policy (`MinCapReq: 1`) as specified in the `policies/Minimum_capacity_requirement.csv` file. Other optional policies include a capacity reserve margin, an energy share requirement (such as renewable portfolio standard (RPS) or clean electricity standard (CES) policies), a CO2 emissions cap, and a maximum capacity requirement policy (see the documentation for more details). For this example, a rate-based carbon cap of 50 gCO<sub>2</sub> per kWh is specified in the `policies/CO2_cap.csv` input file.
20+
21+
Once the settings are confirmed, run the model with the `Run.jl` script in the example directory:
22+
23+
- Using a Julia REPL (recommended)
24+
```julia
25+
julia> include("Run.jl")
26+
```
27+
- Using a terminal or command prompt:
28+
```bash
29+
$ julia Run.jl
30+
```
31+
32+
Once the model has completed, results will write to the `results` directory.
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
using GenX
2+
3+
run_genx_case!(dirname(@__FILE__))
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
,Network_zones,CO_2_Cap_Zone_1,CO_2_Cap_Zone_2,CO_2_Cap_Zone_3,CO_2_Max_tons_MWh_1,CO_2_Max_tons_MWh_2,CO_2_Max_tons_MWh_3,CO_2_Max_Mtons_1,CO_2_Max_Mtons_2,CO_2_Max_Mtons_3
2+
MA,z1,1,0,0,0.05,0,0,0.018,0,0
3+
CT,z2,0,1,0,0,0.05,0,0,0.025,0
4+
ME,z3,0,0,1,0,0,0.05,0,0,0.025
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
MinCapReqConstraint,ConstraintDescription,Min_MW
2+
1,MA_PV,5000
3+
2,CT_Wind,10000
4+
3,All_Batteries,6000
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
Resource,Zone,Model,New_Build,Can_Retire,Existing_Cap_MW,Existing_Cap_MWh,Max_Cap_MW,Max_Cap_MWh,Min_Cap_MW,Min_Cap_MWh,Inv_Cost_per_MWyr,Inv_Cost_per_MWhyr,Fixed_OM_Cost_per_MWyr,Fixed_OM_Cost_per_MWhyr,Var_OM_Cost_per_MWh,Var_OM_Cost_per_MWh_In,Self_Disch,Eff_Up,Eff_Down,Min_Duration,Max_Duration,Reg_Max,Rsv_Max,Reg_Cost,Rsv_Cost,region,cluster
2+
MA_battery,1,1,1,0,0,0,-1,-1,0,0,19584,22494,4895,5622,0.15,0.15,0,0.92,0.92,1,10,0,0,0,0,MA,0
3+
CT_battery,2,1,1,0,0,0,-1,-1,0,0,19584,22494,4895,5622,0.15,0.15,0,0.92,0.92,1,10,0,0,0,0,CT,0
4+
ME_battery,3,1,1,0,0,0,-1,-1,0,0,19584,22494,4895,5622,0.15,0.15,0,0.92,0.92,1,10,0,0,0,0,ME,0
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
Resource,Zone,Model,New_Build,Can_Retire,Existing_Cap_MW,Max_Cap_MW,Min_Cap_MW,Inv_Cost_per_MWyr,Fixed_OM_Cost_per_MWyr,Var_OM_Cost_per_MWh,Heat_Rate_MMBTU_per_MWh,Fuel,Cap_Size,Start_Cost_per_MW,Start_Fuel_MMBTU_per_MW,Up_Time,Down_Time,Ramp_Up_Percentage,Ramp_Dn_Percentage,Min_Power,Reg_Max,Rsv_Max,Reg_Cost,Rsv_Cost,region,cluster
2+
MA_natural_gas_combined_cycle,1,1,1,0,0,-1,0,65400,10287,3.55,7.43,MA_NG,250,91,2,6,6,0.64,0.64,0.468,0.25,0.5,0,0,MA,1
3+
CT_natural_gas_combined_cycle,2,1,1,0,0,-1,0,65400,9698,3.57,7.12,CT_NG,250,91,2,6,6,0.64,0.64,0.338,0.133332722,0.266665444,0,0,CT,1
4+
ME_natural_gas_combined_cycle,3,1,1,0,0,-1,0,65400,16291,4.5,12.62,ME_NG,250,91,2,6,6,0.64,0.64,0.474,0.033333333,0.066666667,0,0,ME,1
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
Resource,Zone,Num_VRE_Bins,New_Build,Can_Retire,Existing_Cap_MW,Max_Cap_MW,Min_Cap_MW,Inv_Cost_per_MWyr,Fixed_OM_Cost_per_MWyr,Var_OM_Cost_per_MWh,Reg_Max,Rsv_Max,Reg_Cost,Rsv_Cost,region,cluster
2+
MA_solar_pv,1,1,1,0,0,-1,0,85300,18760,0,0,0,0,0,MA,1
3+
CT_onshore_wind,2,1,1,0,0,-1,0,1,1,0.1,0,0,0,0,CT,1
4+
CT_solar_pv,2,1,1,0,0,-1,0,1,1,0,0,0,0,0,CT,1
5+
ME_onshore_wind,3,1,1,0,0,-1,0,97200,43205,0.1,0,0,0,0,ME,1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
Resource,Min_Cap_1,Min_Cap_2,Min_Cap_3
2+
MA_solar_pv,1,0,0
3+
CT_onshore_wind,0,1,0
4+
MA_battery,0,0,1
5+
CT_battery,0,0,1
6+
ME_battery,0,0,1
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# Clp Solver parameters https://github.com/jump-dev/Clp.jl
2+
# Common solver settings
3+
Feasib_Tol: 1e-5 # Primal/Dual feasibility tolerance
4+
TimeLimit: -1.0 # Terminate after this many seconds have passed. A negative value means no time limit
5+
Pre_Solve: 0 # Set to 1 to disable presolve
6+
Method: 5 # Solution method: dual simplex (0), primal simplex (1), sprint (2), barrier with crossover (3), barrier without crossover (4), automatic (5)
7+
8+
#Clp-specific solver settings
9+
DualObjectiveLimit: 1e308 # When using dual simplex (where the objective is monotonically changing), terminate when the objective exceeds this limit
10+
MaximumIterations: 2147483647 # Terminate after performing this number of simplex iterations
11+
LogLevel: 1 # Set to 1, 2, 3, or 4 for increasing output. Set to 0 to disable output
12+
InfeasibleReturn: 0 # Set to 1 to return as soon as the problem is found to be infeasible (by default, an infeasibility proof is computed as well)
13+
Scaling: 3 # 0 -off, 1 equilibrium, 2 geometric, 3 auto, 4 dynamic(later)
14+
Perturbation: 100 # switch on perturbation (50), automatic (100), don't try perturbing (102)
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# CPLEX Solver Parameters
2+
Feasib_Tol: 1.0e-05 # Constraint (primal) feasibility tolerances.
3+
Optimal_Tol: 1e-5 # Dual feasibility tolerances.
4+
Pre_Solve: 1 # Controls presolve level.
5+
TimeLimit: 110000 # Limits total time solver.
6+
MIPGap: 1e-3 # Relative (p.u. of optimal) mixed integer optimality tolerance for MIP problems (ignored otherwise).
7+
Method: 2 # Algorithm used to solve continuous models (including MIP root relaxation).
8+
BarConvTol: 1.0e-08 # Barrier convergence tolerance (determines when barrier terminates).
9+
NumericFocus: 0 # Numerical precision emphasis.
10+
SolutionType: 2 # Solution type for LP or QP.

0 commit comments

Comments
 (0)