Antares Simulator
Power System Simulator
create.hxx
1 /*
2  * Copyright 2007-2025, RTE (https://www.rte-france.com)
3  * See AUTHORS.txt
4  * SPDX-License-Identifier: MPL-2.0
5  * This file is part of Antares-Simulator,
6  * Adequacy and Performance assessment for interconnected energy networks.
7  *
8  * Antares_Simulator is free software: you can redistribute it and/or modify
9  * it under the terms of the Mozilla Public Licence 2.0 as published by
10  * the Mozilla Foundation, either version 2 of the License, or
11  * (at your option) any later version.
12  *
13  * Antares_Simulator is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16  * Mozilla Public Licence 2.0 for more details.
17  *
18  * You should have received a copy of the Mozilla Public Licence 2.0
19  * along with Antares_Simulator. If not, see <https://opensource.org/license/mpl-2-0/>.
20  */
21 #ifndef __ANTARES_LIBS_STUDY_ACTION_HANDLER_ANTARES_CONSTRAINT_CREATE_HXX__
22 #define __ANTARES_LIBS_STUDY_ACTION_HANDLER_ANTARES_CONSTRAINT_CREATE_HXX__
23 
24 namespace Antares::Action::AntaresStudy::Constraint
25 {
26 template<class StringT>
27 inline Create::Create(const StringT& areaname,
29  Data::BindingConstraint::Operator o):
30  pOriginalConstraintName(areaname),
31  pType(t),
32  pOperator(o)
33 {
34  pInfos.behavior = bhOverwrite;
35 }
36 
37 template<class StringT1, class StringT2>
38 inline Create::Create(const StringT1& areaname,
39  const StringT2& targetname,
41  Data::BindingConstraint::Operator o):
42  pOriginalConstraintName(areaname),
43  pTargetConstraintName(targetname),
44  pType(t),
45  pOperator(o)
46 {
47  pInfos.behavior = bhOverwrite;
48 }
49 
51 {
52 }
53 
54 inline bool Create::allowUpdate() const
55 {
56  return true;
57 }
58 
59 } // namespace Antares::Action::AntaresStudy::Constraint
60 
61 #endif // __ANTARES_LIBS_STUDY_ACTION_HANDLER_ANTARES_CONSTRAINT_CREATE_HXX__
Behavior behavior
Behavior of the action.
Definition: fwd.h:56
virtual ~Create()
Destructor.
Definition: create.hxx:50
Create(const StringT &areaname, Data::BindingConstraint::Type t, Data::BindingConstraint::Operator o)
Default constructor.
Definition: create.hxx:27
ActionInformations pInfos
All data related to the action.
Definition: action.h:170
Type
Definition: BindingConstraint.h:55