SEEngineStabilization.h
1/* Distributed under the Apache License, Version 2.0.
2 See accompanying NOTICE file for details.*/
3
4#pragma once
5class SECondition;
9
10class CDM_DECL SEEngineStabilization : public Loggable
11{
12public:
13
14 static constexpr char const* Resting = "Resting";
15 static constexpr char const* AdvanceUntilStable = "AdvanceUntilStable";
16
18 {
19 public:
20 virtual bool AdvanceTime() = 0;
22 virtual double GetTimeStep(const TimeUnit& unit) = 0;
23 virtual double GetSimulationTime(const TimeUnit& unit) = 0;
24 };
26 virtual ~SEEngineStabilization();
27
28 virtual void Clear();
29
30 virtual bool SerializeToString(std::string& output, eSerializationFormat) const = 0;
31 virtual bool SerializeToFile(const std::string& filename) const = 0;
32 virtual bool SerializeFromString(const std::string& src, eSerializationFormat) = 0;
33 virtual bool SerializeFromFile(const std::string& filename) = 0;
34
35 virtual bool HasConvergenceCriteria(const std::string& criteria) const = 0;
36 virtual void RemoveConvergenceCriteria(const std::string& name) = 0;
37
38 virtual bool Stabilize(Controller& engine, const std::string& criteria)=0;
39 virtual bool StabilizeConditions(Controller& engine, const SEConditionManager& conditions)=0;
40
41 virtual void LogProgress(bool b);
42
43 virtual void CancelStabilization();
44
45 virtual void TrackStabilization(eSwitch state);
46 virtual bool IsTrackingStabilization();
47
48 virtual bool HasStabilizationDuration();
49 virtual SEScalarTime& GetStabilizationDuration();
50
51protected:
52
56 std::stringstream m_ss;
57
59 std::vector<const SECondition*> m_Conditions;
60};
Definition: Logger.h:23
Definition: Logger.h:71
Definition: SECondition.h:8
Definition: SEConditionManager.h:26
Definition: SEEngineConfiguration.h:8
Definition: SEEngineStabilization.h:18
virtual double GetTimeStep(const TimeUnit &unit)=0
virtual SEEngineTracker * GetEngineTracker()=0
virtual double GetSimulationTime(const TimeUnit &unit)=0
Definition: SEEngineStabilization.h:11
virtual bool HasConvergenceCriteria(const std::string &criteria) const =0
std::stringstream m_ss
Definition: SEEngineStabilization.h:56
eSwitch m_TrackingStabilization
Definition: SEEngineStabilization.h:55
bool m_LogProgress
Definition: SEEngineStabilization.h:54
virtual bool SerializeFromFile(const std::string &filename)=0
virtual bool SerializeToString(std::string &output, eSerializationFormat) const =0
virtual bool SerializeToFile(const std::string &filename) const =0
virtual bool SerializeFromString(const std::string &src, eSerializationFormat)=0
virtual void RemoveConvergenceCriteria(const std::string &name)=0
bool m_Cancelled
Definition: SEEngineStabilization.h:53
virtual bool StabilizeConditions(Controller &engine, const SEConditionManager &conditions)=0
std::vector< const SECondition * > m_Conditions
Definition: SEEngineStabilization.h:59
virtual bool Stabilize(Controller &engine, const std::string &criteria)=0
SEScalarTime * m_StabilizationDuration
Definition: SEEngineStabilization.h:58
Definition: SEEngineTracker.h:66
Definition: SEScalarTime.h:28
Definition: SEScalarTime.h:8

Distributed under the Apache License, Version 2.0.

See accompanying NOTICE file for details.