Skip to content

Commit

Permalink
Merge pull request #53 from sstroemer/config-csv-file-format
Browse files Browse the repository at this point in the history
feat: expose configuring input CSV file formatting options
  • Loading branch information
sstroemer authored Jan 22, 2025
2 parents 36ac0da + 39b3285 commit 57b3d60
Show file tree
Hide file tree
Showing 7 changed files with 8,941 additions and 17 deletions.
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name = "IESopt"
uuid = "ed3f0a38-8ad9-4cf8-877e-929e8d190fe9"
version = "2.3.0"
version = "2.4.0"

[deps]
ArgCheck = "dce04be8-c92d-5529-be00-80e4d2c0e197"
Expand Down
106 changes: 106 additions & 0 deletions assets/examples/49_csv_formats.iesopt.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,106 @@
# This is identical to example "07_csv_filestorage.iesopt.yaml".

config:
general:
version:
core: 2.2.0
optimization:
problem_type: LP
snapshots:
count: 8760
solver:
name: highs
files:
_csv_config:
comment: "#" # Lines starting with `#` are comments.
delim: ";" # "German-style" delimiter.
decimal: "," # "German-style" decimal separator.
data: 49/example_data.csv
results:
enabled: true
memory_only: true
paths:
files: files

carriers:
electricity: {unit: MWh}
gas: {unit: MWh}
co2: {unit: t}
wind: {unit: MWh}

components:
node1:
type: Node
carrier: electricity

node2:
type: Node
carrier: electricity
has_state: true
state_lb: 0
state_ub: 10

conn:
type: Connection
capacity: 5
node_from: node1
node_to: node2

availability:
type: Profile
mode: create
carrier: wind
node_to: wind

wind:
type: Node
carrier: wind

plant_wind:
type: Unit
inputs: {wind: wind}
outputs: {electricity: node2}
conversion: 1 wind -> 1 electricity
capacity: 10 out:electricity
availability_factor: ex07_plant_wind_availability_factor@data

plant_gas:
type: Unit
inputs: {gas: gas_grid}
outputs: {electricity: node1, co2: total_co2}
conversion: 1 gas -> 0.4 electricity + 0.2 co2
capacity: 10 out:electricity

demand1:
type: Profile
carrier: electricity
node_from: node1
value: ex07_demand1_value@data

demand2:
type: Profile
carrier: electricity
node_from: node2
value: ex07_demand2_value@data

gas_grid:
type: Node
carrier: gas

total_co2:
type: Node
carrier: co2

create_gas:
type: Profile
carrier: gas
node_to: gas_grid
mode: create
cost: 50.0

co2_emissions:
type: Profile
carrier: co2
node_from: total_co2
mode: destroy
cost: 100.0
Loading

0 comments on commit 57b3d60

Please sign in to comment.