Skip to content
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

AMPL executor #2455

Merged
merged 44 commits into from
Mar 14, 2023
Merged
Show file tree
Hide file tree
Changes from 33 commits
Commits
Show all changes
44 commits
Select commit Hold shift + click to select a range
7ab7acf
AmplNetworkReader: extract info about ampl outputs
Jan 24, 2023
ed8405c
ampl executor : pom
Jan 24, 2023
0286b41
Ampl executor with interface on IAmplModel
Jan 24, 2023
0c62cda
cleaned AmplModelRunner
Jan 24, 2023
b338ada
cleaned pom
Jan 24, 2023
ebab0cd
Merge branch 'main' into ampl-solver
geofjamg Jan 30, 2023
d04c841
Fix
geofjamg Jan 30, 2023
185ea5b
amplNetworkReader: refactor shunts svc vsc battery
Jan 27, 2023
a6a65af
formatting errors
Jan 30, 2023
f471f39
better optional handling
Jan 30, 2023
a3aee49
IAmplModel format and AbstractAmplModel for some default values
Feb 3, 2023
bf94979
PlatformConfig injection in AmplConfig for testing purposes
Feb 3, 2023
aa237e1
Tests for AmplConfig and AmplExecutionHandler
Feb 3, 2023
462f1c2
test depÃendencies
Feb 3, 2023
cbdc4d7
format issues
Feb 3, 2023
7df6294
adding ampl-executor module to coverage
Feb 3, 2023
abdcbd4
swap actual and expected in test
Feb 3, 2023
b6904a1
NetworkApplier refactor for all network elements + factory
Feb 9, 2023
5d5c873
using NetworkApplier factory and reading all values
Feb 9, 2023
3903c8d
added AmplReadableElement
Feb 10, 2023
2e8c9c1
IAmplModel defines network elements read
Feb 10, 2023
0d3c38e
copyrights and author
Feb 10, 2023
c69e6a8
fix test and copyrights and author on test classes
Feb 10, 2023
f28b8cb
missing svc in AmplReadableElement
Feb 10, 2023
bb63623
added ReactiveSlack reader and network to NetworkApplier
Feb 14, 2023
1c5af5a
First version for reactive slack, but temporary.
annetill Feb 15, 2023
073fac6
Added IAmplParameters IAmplInputFile and IAmplOutputFile for better c…
Feb 15, 2023
f551016
removing reactive slack reader from the generic AmplNetworkReader
Feb 15, 2023
8946d60
Merge branch 'main' into ampl-solver
annetill Mar 8, 2023
b15218b
Small fixes.
annetill Mar 8, 2023
83f0755
adding amplMapper as argument for additional input/output file
Mar 8, 2023
9445d8b
switch junit to jupyter junit
Mar 8, 2023
344d402
Merge branch 'main' into ampl-solver
geofjamg Mar 13, 2023
28e9ee7
remove I from interfaces name
Mar 14, 2023
cdeb8f9
minor fixes: licence, renaming, coding style
Mar 14, 2023
d2005c5
replace abstract factory with interface
Mar 14, 2023
8068cc7
added AbstractAmplNetworkUpdater for utilty functions
Mar 14, 2023
ae3ea0a
rename variable
Mar 14, 2023
0991db6
Merge branch 'main' into ampl-solver
nicolas-pierr Mar 14, 2023
4747551
update naming in AmplNetworkUpdater, missing licence, update copyrigh…
Mar 14, 2023
6e5b693
Merge branch 'main' into ampl-solver
geofjamg Mar 14, 2023
209d3e5
Add author
geofjamg Mar 14, 2023
71950a3
Clean
geofjamg Mar 14, 2023
0ba053f
Merge branch 'main' into ampl-solver
annetill Mar 14, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
/**
* Copyright (c) 2023, 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.powsybl.ampl.converter;

import com.powsybl.commons.util.StringToIntMapper;
import com.powsybl.iidm.network.Network;
import org.apache.commons.lang3.NotImplementedException;

/**
* Factory pattern to create {@link NetworkApplier}.
* <p>
* Used by {@link AmplNetworkReader} to create the {@link NetworkApplier} and pass some data.
*
* @apiNote One must override exactly one method to define a child class extending NetworkApplierFactory.
* <p>
* One must always call the public of function (calling protected ones will break some implementations).
*/
public abstract class AbstractNetworkApplierFactory {
nicolas-pierr marked this conversation as resolved.
Show resolved Hide resolved
protected NetworkApplier of() {
throw new NotImplementedException("At least one of the methods of NetworkApplierFactory must be redefined");
}

protected NetworkApplier of(StringToIntMapper<AmplSubset> mapper) {
return of();
}

public NetworkApplier of(StringToIntMapper<AmplSubset> mapper, Network network) {
nicolas-pierr marked this conversation as resolved.
Show resolved Hide resolved
return of(mapper);
}

}
Loading