-
Notifications
You must be signed in to change notification settings - Fork 1
Add support for time-coupled RAO implementation #124
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
Draft
vbochetRTE
wants to merge
14
commits into
master
Choose a base branch
from
intertemporal-rao
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Changes from 12 commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
5a13431
First steps to implement intertemporal RAO handling
vbochetRTE c44fdb6
Next steps to implement intertemporal RAO handling
vbochetRTE 0b85d9c
Reword intertemporal -> time-coupled & code improvements
vbochetRTE 36d8dcf
Some improvements and some more tests
vbochetRTE d40dd09
Fix some bugs, rework FileExporter and improve general test coverage
vbochetRTE 1d022e5
Final developments for rao-runner-spring-boot-starter + some new tests
vbochetRTE aa21d46
Merge branch 'master' into intertemporal-rao
vbochetRTE d081382
Remove instant parameter from time-coupled rao request and response o…
vbochetRTE 234fc81
Code review
vbochetRTE 692500d
Merge branch 'master' into intertemporal-rao
vbochetRTE 698338f
Fix post-merge problems
vbochetRTE c5bab9f
CodeRabbit is bipolar...
vbochetRTE c046af2
Code review
vbochetRTE a5cc984
Code review
vbochetRTE File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18 changes: 18 additions & 0 deletions
18
...runner-api/src/main/java/com/farao_community/farao/rao_runner/api/RaoRunnerConstants.java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,18 @@ | ||
| /* | ||
| * Copyright (c) 2026, RTE (http://www.rte-france.com) | ||
| * This Source Code Form is subject to the terms of the Mozilla Public | ||
| * License, v. 2.0. If a copy of the MPL was not distributed with this | ||
| * file, You can obtain one at http://mozilla.org/MPL/2.0/. | ||
| */ | ||
| package com.farao_community.farao.rao_runner.api; | ||
|
|
||
| /** | ||
| * @author Vincent Bochet {@literal <vincent.bochet at rte-france.com>} | ||
| */ | ||
| public final class RaoRunnerConstants { | ||
| private RaoRunnerConstants() { | ||
|
|
||
| } | ||
|
|
||
| public static final String TIME_COUPLED_ROUTING_KEY = "TIME-COUPLED"; | ||
| } |
107 changes: 107 additions & 0 deletions
107
...i/src/main/java/com/farao_community/farao/rao_runner/api/resource/AbstractRaoRequest.java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,107 @@ | ||
| /* | ||
| * Copyright (c) 2026, RTE (http://www.rte-france.com) | ||
| * This Source Code Form is subject to the terms of the Mozilla Public | ||
| * License, v. 2.0. If a copy of the MPL was not distributed with this | ||
| * file, You can obtain one at http://mozilla.org/MPL/2.0/. | ||
| */ | ||
| package com.farao_community.farao.rao_runner.api.resource; | ||
|
|
||
| import com.fasterxml.jackson.annotation.JsonProperty; | ||
| import com.fasterxml.jackson.databind.annotation.JsonDeserialize; | ||
| import com.github.jasminb.jsonapi.annotations.Id; | ||
|
|
||
| import java.time.Instant; | ||
| import java.util.Optional; | ||
|
|
||
| /** | ||
| * @author Vincent Bochet {@literal <vincent.bochet at rte-france.com>} | ||
| */ | ||
| @JsonDeserialize(builder = AbstractRaoRequest.AbstractRaoRequestBuilder.class) | ||
| public abstract class AbstractRaoRequest { | ||
|
|
||
| @Id | ||
| private final String id; | ||
| private final String runId; | ||
| private final String raoParametersFileUrl; | ||
| private final String resultsDestination; | ||
| private final Instant targetEndInstant; | ||
| private final String eventPrefix; | ||
|
|
||
| protected AbstractRaoRequest(AbstractRaoRequestBuilder builder) { | ||
| this.id = builder.id; | ||
| this.runId = builder.runId; | ||
| this.raoParametersFileUrl = builder.raoParametersFileUrl; | ||
| this.resultsDestination = builder.resultsDestination; | ||
| this.targetEndInstant = builder.targetEndInstant; | ||
| this.eventPrefix = builder.eventPrefix; | ||
| } | ||
|
|
||
| public abstract static class AbstractRaoRequestBuilder<T extends AbstractRaoRequestBuilder> { | ||
| private String id; | ||
| private String runId; | ||
| private String raoParametersFileUrl; | ||
| private String resultsDestination; | ||
| private Instant targetEndInstant; | ||
| private String eventPrefix; | ||
|
|
||
| @JsonProperty("id") | ||
| public T withId(String id) { | ||
| this.id = id; | ||
| return (T) this; | ||
| } | ||
|
|
||
| @JsonProperty("runId") | ||
| public T withRunId(String runId) { | ||
| this.runId = runId; | ||
| return (T) this; | ||
| } | ||
|
|
||
| @JsonProperty("raoParametersFileUrl") | ||
| public T withRaoParametersFileUrl(String raoParametersFileUrl) { | ||
| this.raoParametersFileUrl = raoParametersFileUrl; | ||
| return (T) this; | ||
| } | ||
|
|
||
| @JsonProperty("resultsDestination") | ||
| public T withResultsDestination(String resultsDestination) { | ||
| this.resultsDestination = resultsDestination; | ||
| return (T) this; | ||
| } | ||
|
|
||
| @JsonProperty("targetEndInstant") | ||
| public T withTargetEndInstant(Instant targetEndInstant) { | ||
| this.targetEndInstant = targetEndInstant; | ||
| return (T) this; | ||
| } | ||
|
|
||
| @JsonProperty("eventPrefix") | ||
| public T withEventPrefix(String eventPrefix) { | ||
| this.eventPrefix = eventPrefix; | ||
| return (T) this; | ||
| } | ||
| } | ||
|
|
||
| public String getId() { | ||
| return id; | ||
| } | ||
|
|
||
| public String getRunId() { | ||
| return runId; | ||
| } | ||
|
|
||
| public String getRaoParametersFileUrl() { | ||
| return raoParametersFileUrl; | ||
| } | ||
|
|
||
| public Optional<String> getResultsDestination() { | ||
| return Optional.ofNullable(resultsDestination); | ||
| } | ||
|
|
||
| public Optional<Instant> getTargetEndInstant() { | ||
| return Optional.ofNullable(targetEndInstant); | ||
| } | ||
|
|
||
| public Optional<String> getEventPrefix() { | ||
| return Optional.ofNullable(eventPrefix); | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
67 changes: 67 additions & 0 deletions
67
...rc/main/java/com/farao_community/farao/rao_runner/api/resource/TimeCoupledRaoRequest.java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,67 @@ | ||
| /* | ||
| * Copyright (c) 2026, RTE (http://www.rte-france.com) | ||
| * This Source Code Form is subject to the terms of the Mozilla Public | ||
| * License, v. 2.0. If a copy of the MPL was not distributed with this | ||
| * file, You can obtain one at http://mozilla.org/MPL/2.0/. | ||
| */ | ||
| package com.farao_community.farao.rao_runner.api.resource; | ||
|
|
||
| import com.fasterxml.jackson.annotation.JsonCreator; | ||
| import com.fasterxml.jackson.annotation.JsonProperty; | ||
| import com.fasterxml.jackson.databind.annotation.JsonDeserialize; | ||
| import com.github.jasminb.jsonapi.annotations.Type; | ||
| import org.apache.commons.lang3.builder.ToStringBuilder; | ||
|
|
||
| import java.util.List; | ||
|
|
||
| /** | ||
| * @author Vincent Bochet {@literal <vincent.bochet at rte-france.com>} | ||
| */ | ||
| @Type("time-coupled-rao-request") | ||
| @JsonDeserialize(builder = TimeCoupledRaoRequest.RaoRequestBuilder.class) | ||
| public final class TimeCoupledRaoRequest extends AbstractRaoRequest { | ||
|
|
||
| private final String icsFileUrl; | ||
| private final List<TimedInput> timedInputs; | ||
|
|
||
| private TimeCoupledRaoRequest(RaoRequestBuilder builder) { | ||
| super(builder); | ||
| this.icsFileUrl = builder.icsFileUrl; | ||
| this.timedInputs = builder.timedInputs; | ||
| } | ||
|
|
||
| public static class RaoRequestBuilder extends AbstractRaoRequestBuilder<RaoRequestBuilder> { | ||
| private String icsFileUrl; | ||
| private List<TimedInput> timedInputs; | ||
|
|
||
| @JsonProperty("icsFileUrl") | ||
| public RaoRequestBuilder withIcsFileUrl(String icsFileUrl) { | ||
| this.icsFileUrl = icsFileUrl; | ||
| return this; | ||
| } | ||
|
|
||
| @JsonProperty("timedInputs") | ||
| public RaoRequestBuilder withTimedInputs(List<TimedInput> timedInputs) { | ||
| this.timedInputs = timedInputs; | ||
| return this; | ||
| } | ||
|
|
||
| @JsonCreator | ||
| public TimeCoupledRaoRequest build() { | ||
| return new TimeCoupledRaoRequest(this); | ||
| } | ||
| } | ||
|
|
||
| public String getIcsFileUrl() { | ||
| return icsFileUrl; | ||
| } | ||
|
|
||
| public List<TimedInput> getTimedInputs() { | ||
| return timedInputs; | ||
| } | ||
|
|
||
| @Override | ||
| public String toString() { | ||
| return ToStringBuilder.reflectionToString(this); | ||
| } | ||
| } |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.