Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
backbone
backbone
Commits
3c38c833
Commit
3c38c833
authored
Aug 11, 2021
by
Juha Kiviluoma
Browse files
Speeding up the pre-calculation of fuel price changes. Code by Antti Lehtilä.
parent
1ff03e61
Changes
1
Hide whitespace changes
Inline
Side-by-side
inc/3a_periodicInit.gms
View file @
3c38c833
...
...
@@ -629,12 +629,18 @@ loop(m,
* --- Calculating fuel price time series --------------------------------------
loop(commodity${ p_price(commodity, 'useTimeSeries') },
tmp_ = smin(t_full(t),ord(t));
loop(commodity$p_price(commodity, 'useTimeSeries'),
// Determine the time steps where the prices change
Option clear = tt;
tt(t)${ ts_priceChange(commodity,t) }
= yes;
ts_price(commodity, t_full(t)) = sum(tt(t_)${ ord(t_) <= ord(t) }, ts_priceChange(commodity, t_));
tt(t)$ts_priceChange(commodity,t) = yes;
tmp = sum(tt(t)$(ord(t) < tmp_),
ts_priceChange(commodity, t)
);
loop(t_full(t),
tmp = tmp + ts_priceChange(commodity, t);
ts_price(commodity, t) = tmp;
);
); // END loop(commodity)
* --- Slack Direction ---------------------------------------------------------
...
...
Niina Helistö
@nhniina
mentioned in issue
#152
·
Sep 15, 2021
mentioned in issue
#152
mentioned in issue #152
Toggle commit list
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment