-
Notifications
You must be signed in to change notification settings - Fork 5
Load Scenario File #46
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: nicholson/scopflow-fix-rebased
Are you sure you want to change the base?
Changes from all commits
5a7587a
818f9a2
6a1449b
525daa2
1707362
0fb78c5
542ef69
f6beca1
9945012
ef220e1
42ced77
97dfc85
85b54b0
32e1cbd
f6738ca
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| scenario_nr,weight,kv_list | ||
| 1,0.101,8_Load_1_185.0_1000,6_Load_1_105.5_2000 | ||
| 2,0.102,6_Load_1_105.0_10 | ||
| 3,0.103,8_Load_1_75.0_20 | ||
|
Comment on lines
+1
to
+4
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is somewhat strange string format. Can't we use simple csv?
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Okay, the issue is similar to the argument for CSR type of file format. For example, say we have a test case, where we want to add a large load to each bus and say we have 30k eligible buses. So we have 30k such scenarios. In old format, we need to have 30k columns for each CSV file, and all will have original model values except 1 column for each scenario of the existing CSV format. In this new format, we are just keeping the bus which need to be changes. But I agree the format is a bit strange and I am open to suggestions for input format. We can rewrite the parser accordingly.
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. How about we use JSON format? @PhilipFackler, please chime in. |
||
| 4,0.104,6_Load_1_95.0_30 | ||
| 5,0.105,8_Load_1_115.0_40 | ||
| 6,0.106,6_Load_1_65.0_50 | ||
| 7,0.107,8_Load_1_33.0_60 | ||
| 8,0.108,6_Load_1_125.0_70 | ||
| 9,0.109,8_Load_1_55.0_80 | ||
| 10,0.1110,6_Load_1_250.0_90 | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -21,7 +21,7 @@ typedef enum { | |
| typedef enum { | ||
| FORECAST_WIND = 1, | ||
| FORECAST_LOAD_P = 2, | ||
| FORECAST_LOAD_Q = 3 | ||
| FORECAST_LOAD_PQ = 3 | ||
|
Comment on lines
23
to
+24
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why is
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I wanted to have the ability to change PQ value as a set. In later iterations, we can drop
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I don't see why one would want to change P and Q as a set. They can and they occasionally do change separately. @hambrickjc and @tsybinae: please chime in. |
||
| } ForecastType; | ||
|
|
||
| /** | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -18,7 +18,8 @@ struct _p_Forecast { | |
| PetscInt nele; /* Number of devices/elements involved in this forecast */ | ||
| PetscInt *buses; /* Bus numbers */ | ||
| char **id; /* Device ids */ | ||
| PetscScalar *val; /* forecast values */ | ||
| PetscScalar *val1 = nullptr; /* forecast values */ | ||
| PetscScalar *val2 = nullptr; /* 2nd set of forecast values */ | ||
|
Comment on lines
+21
to
+22
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. What are forecast values and "2nd set of forecast values"? This is somewhat counterintuitive.
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. In current format, Forecast have a single value. But for a load, we want to change P and Q values simultaneously. So, either we can change the data type of
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I am not sure we want to change P & Q simultaneously. They often change together but sometimes they don't as far as I know. |
||
| }; | ||
|
|
||
| typedef struct _p_Forecast Forecast; | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why are load files and scenario files different? Shouldn't there be single scenario file format including generation and load?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, the
loadfilevariable name is not necessary actually. A single name is fine. I did not want to touch the variable name in the first implementation. I will drop the loadfile and use scenfile only.Regarding Load and Generator together: It can be done but will require little bit more modification. The first cut focused on changing Load P and Q values. But I see I can use the same template to have different forecast types. Will try to submit the changes.