Skip to content

Commit 525803d

Browse files
committed
start the feature [skpi ci]
1 parent 7b31c39 commit 525803d

2 files changed

Lines changed: 63 additions & 0 deletions

File tree

src/light_env/light_env.h

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
// Copyright (c) 2025, RTE (https://www.rte-france.com)
2+
// See AUTHORS.txt
3+
// This Source Code Form is subject to the terms of the Mozilla Public License, version 2.0.
4+
// If a copy of the Mozilla Public License, version 2.0 was not distributed with this file,
5+
// you can obtain one at http://mozilla.org/MPL/2.0/.
6+
// SPDX-License-Identifier: MPL-2.0
7+
// This file is part of LightSim2grid, LightSim2grid implements a c++ backend targeting the Grid2Op platform.
8+
9+
#ifndef LIGHT_ENV_H
10+
#define LIGHT_ENV_H
11+
12+
13+
#endif // LIGHT_ENV_H

src/light_env/topo_action.h

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
// Copyright (c) 2025, RTE (https://www.rte-france.com)
2+
// See AUTHORS.txt
3+
// This Source Code Form is subject to the terms of the Mozilla Public License, version 2.0.
4+
// If a copy of the Mozilla Public License, version 2.0 was not distributed with this file,
5+
// you can obtain one at http://mozilla.org/MPL/2.0/.
6+
// SPDX-License-Identifier: MPL-2.0
7+
// This file is part of LightSim2grid, LightSim2grid implements a c++ backend targeting the Grid2Op platform.
8+
9+
#ifndef TOPO_ACTION_H
10+
#define TOPO_ACTION_H
11+
12+
#include <vector>
13+
#include "GridModel.h"
14+
15+
class TopoAction
16+
{
17+
18+
public:
19+
// TODO
20+
TopoAction() {}
21+
22+
// TODO
23+
void apply_to_gridmodel(GridModel & grid) const {
24+
25+
}
26+
27+
// TODO check compliance (correct sub, correct bus)
28+
void check_validity(const GridModel & grid) const {
29+
30+
}
31+
32+
protected:
33+
int sub_id;
34+
35+
// bus id should be global (lightsim2grid / gridmodel) bus and
36+
// not local bus id
37+
std::vector<std::pair<int, int> > loads_bus;
38+
std::vector<std::pair<int, int> > gens_bus;
39+
std::vector<std::pair<int, int> > static_gens_bus;
40+
std::vector<std::pair<int, int> > shunts_bus;
41+
std::vector<std::pair<int, int> > lines_or_bus;
42+
std::vector<std::pair<int, int> > lines_ex_bus;
43+
std::vector<std::pair<int, int> > trafo_hv_bus;
44+
std::vector<std::pair<int, int> > trafo_lv_bus;
45+
std::vector<std::pair<int, int> > dc_lines_or_bus;
46+
std::vector<std::pair<int, int> > dc_lines_ex_bus;
47+
48+
};
49+
50+
#endif // TOPO_ACTION_H

0 commit comments

Comments
 (0)