\begin{algorithm}[H]
\begin{algorithmic}

\For{$t\in\{-1,\dots,-T^{traceback}\}$}\Comment{Retrieve the values of $P_{u,t}$}
\State $P_{u,t}\leftarrow\textrm{{\tt Power.GetValue}}(t)$
\EndFor

\For{$t\in\{-1,\dots,-T^{traceback}\}$}\Comment{Initial conditions on the state variables}

\If{$P_{u,t} > \textrm{{\tt MinimumPower.GetValue}}(t)$}
    \State $S_{u,t}^{OFF} \leftarrow 0$
    \State $S_{u,t}^{STOP} \leftarrow 0$
    \State $S_{u,t}^{START} \leftarrow 0$
    \If{$P_{u,t} < P_{u,t-1}$}\Comment{Exact initialization required only if the FLAT state is defined.}
        \State $S_{t-1}^{ON\_UP} \leftarrow 0$
        \State $S_{t-1}^{ON\_DOWN} \leftarrow 1$
        \State $S_{t-1}^{ON\_FLAT} \leftarrow 0$
    \ElsIf{$P_{u,t} > P_{u,t-1}$}
        \State $S_{t-1}^{ON\_UP} \leftarrow 1$
        \State $S_{t-1}^{ON\_DOWN} \leftarrow 0$
        \State $S_{t-1}^{ON\_FLAT} \leftarrow 0$
    \ElsIf{$P_{u,t} = P_{u,t-1}$}
        \State $S_{t-1}^{ON\_UP} \leftarrow 0$
        \State $S_{t-1}^{ON\_DOWN} \leftarrow 0$
        \State $S_{t-1}^{ON\_FLAT} \leftarrow 1$
    \EndIf
\ElsIf{$P_{u,t} > 0$}\Comment{Reconstruct the startups and shutdowns}
    \If{$P_{u,t} < P_{u,t-1}$}
        \State $S_{t}^{STOP} \leftarrow 1$
        \State $S_{t}^{START} \leftarrow 0$
    \Else
        \State $S_{t}^{STOP} \leftarrow 0$  
        \State $S_{t}^{START} \leftarrow 1$
    \EndIf
\Else\Comment{Final possibility: the unit is OFF.}
    \State $S_{u,t}^{OFF} \leftarrow 1$
    \State $S_{u,t}^{STOP} \leftarrow 0$
    \State $S_{u,t}^{START} \leftarrow 0$
    \State $S_{t-1}^{ON\_UP} \leftarrow 0$
    \State $S_{t-1}^{ON\_DOWN} \leftarrow 0$
    \State $S_{t-1}^{ON\_FLAT} \leftarrow 0$
\EndIf
\EndFor

\end{algorithmic}
\caption{Initialization of the control and state variables}\label{alg:init_q_t_state_var}
\end{algorithm}

\begin{algorithm}
[H]
\begin{algorithmic}
\For{$t\in\{-1,\dots,-T^{traceback}\}$}\Comment{Retrieve the values of $P_{u,t}$}
\State $P_{u,t}\leftarrow\textrm{{\tt Power.GetValue}}(t)$
\EndFor
\For{$t\in\{-1,\dots,-T^{traceback}\}$}\Comment{Initial conditions on the state variables}
\If{$P_{u,t} > \textrm{{\tt MinimumPower.GetValue}}(t)$}
\State $S_{u,t}^{OFF} \leftarrow 0$
\State $S_{u,t}^{STOP} \leftarrow 0$
\State $S_{u,t}^{START} \leftarrow 0$
\If{$P_{u,t} < P_{u,t-1}$}\Comment{Exact initialization required only if the FLAT state is defined.}
\State $S_{t-1}^{ON\_UP} \leftarrow 0$
\State $S_{t-1}^{ON\_DOWN} \leftarrow 1$
\State $S_{t-1}^{ON\_FLAT} \leftarrow 0$
\ElsIf{$P_{u,t} > P_{u,t-1}$}
\State $S_{t-1}^{ON\_UP} \leftarrow 1$
\State $S_{t-1}^{ON\_DOWN} \leftarrow 0$
\State $S_{t-1}^{ON\_FLAT} \leftarrow 0$
\ElsIf{$P_{u,t} = P_{u,t-1}$}
\State $S_{t-1}^{ON\_UP} \leftarrow 0$
\State $S_{t-1}^{ON\_DOWN} \leftarrow 0$
\State $S_{t-1}^{ON\_FLAT} \leftarrow 1$
\EndIf
\ElsIf{$P_{u,t} > 0$}\Comment{Reconstruct the startups and shutdowns}
\If{$P_{u,t} < P_{u,t-1}$}
\State $S_{t}^{STOP} \leftarrow 1$
\State $S_{t}^{START} \leftarrow 0$
\Else
\State $S_{t}^{STOP} \leftarrow 0$
\State $S_{t}^{START} \leftarrow 1$
\EndIf
\Else\Comment{Final possibility: the unit is OFF.}
\State $S_{u,t}^{OFF} \leftarrow 1$
\State $S_{u,t}^{STOP} \leftarrow 0$
\State $S_{u,t}^{START} \leftarrow 0$
\State $S_{t-1}^{ON\_UP} \leftarrow 0$
\State $S_{t-1}^{ON\_DOWN} \leftarrow 0$
\State $S_{t-1}^{ON\_FLAT} \leftarrow 0$
\EndIf
\EndFor
\end{algorithmic}
\caption{Initialization of the control and state variables}\end{algorithm}
{
    "title": "atlas: a model of short-term european electricity market processes under   uncertainty",
    "id": "2402.12848",
    "abstract": "the atlas model simulates the various stages of the electricity market chain in europe, including the formulation of offers by different market actors, the coupling of european markets, strategic optimization of production portfolios and, finally, real-time system balancing processes. atlas was designed to simulate the various electricity markets and processes that occur from the day ahead timeframe to real-time with a high level of detail. its main aim is to capture impacts from imperfect actor coordination, evolving forecast errors and a high-level of technical constraints--both regarding different production units and the different market constraints.",
    "categories": "econ.gn math.oc q-fin.ec",
    "doi": "",
    "created": "2024-02-20",
    "updated": "",
    "authors": [
        "emily little",
        "florent cogen",
        "quentin bustarret",
        "virginie dussartre",
        "maxime l\u00e2asri",
        "gabriel kasmi",
        "marie girod",
        "frederic bienvenu",
        "maxime fortin",
        "jean-yves bourmaud"
    ],
    "affiliation": [],
    "url": "https://arxiv.org/abs/2402.12848"
}
{
    "ToxicityFilter": {
        "text_to_toxicity_attributes": {
            "Sections/FurtherWork.tex": {
                "toxicity_score": 0.0073197307,
                "severe_toxicity_score": 0.00074386597,
                "identity_attack_score": 0.0024603575,
                "insult_score": 0.006325369,
                "profanity_score": 0.012517073,
                "threat_score": 0.0068999166,
                "sexually_explicit_score": 0.0087286215,
                "flirtation_score": 0.23059085
            },
            "Sections/Modules/5_IDO.tex": {
                "toxicity_score": 0.0055918973,
                "severe_toxicity_score": 0.0006866455,
                "identity_attack_score": 0.0015076627,
                "insult_score": 0.0060498673,
                "profanity_score": 0.011475217,
                "threat_score": 0.0061296434,
                "sexually_explicit_score": 0.008256803,
                "flirtation_score": 0.25870383
            },
            "Sections/ExampleResults.tex": {
                "toxicity_score": 0.0058432184,
                "severe_toxicity_score": 0.00061035156,
                "identity_attack_score": 0.0017851467,
                "insult_score": 0.006163868,
                "profanity_score": 0.0118680475,
                "threat_score": 0.0060908063,
                "sexually_explicit_score": 0.008197826,
                "flirtation_score": 0.24409175
            },
            "main.bbl": {
                "toxicity_score": 0.012314741,
                "severe_toxicity_score": 0.0012016296,
                "identity_attack_score": 0.0041067624,
                "insult_score": 0.007797878,
                "profanity_score": 0.015181494,
                "threat_score": 0.007586042,
                "sexually_explicit_score": 0.011264639,
                "flirtation_score": 0.20508216
            },
            "header.tex": {
                "toxicity_score": 0.019980038,
                "severe_toxicity_score": 0.0017261505,
                "identity_attack_score": 0.0046987277,
                "insult_score": 0.009450888,
                "profanity_score": 0.021603432,
                "threat_score": 0.008000307,
                "sexually_explicit_score": 0.020995872,
                "flirtation_score": 0.49595475
            },
            "Sections/MarketClearing.tex": {
                "toxicity_score": 0.005277746,
                "severe_toxicity_score": 0.00066280365,
                "identity_attack_score": 0.0011746819,
                "insult_score": 0.0059833666,
                "profanity_score": 0.0118680475,
                "threat_score": 0.005818945,
                "sexually_explicit_score": 0.007726009,
                "flirtation_score": 0.20037636
            },
            "Sections/OptimalDispatch.tex": {
                "toxicity_score": 0.009236055,
                "severe_toxicity_score": 0.0007724762,
                "identity_attack_score": 0.0027378413,
                "insult_score": 0.0068098716,
                "profanity_score": 0.013302735,
                "threat_score": 0.0069905366,
                "sexually_explicit_score": 0.009908165,
                "flirtation_score": 0.24522157
            },
            "Sections/Appendices/CapacityCalc.tex": {
                "toxicity_score": 0.004900764,
                "severe_toxicity_score": 0.0006198883,
                "identity_attack_score": 0.0012209293,
                "insult_score": 0.0058361157,
                "profanity_score": 0.011475217,
                "threat_score": 0.0059678215,
                "sexually_explicit_score": 0.0080798725,
                "flirtation_score": 0.3013494
            },
            "style.tex": {
                "toxicity_score": 0.0038326487,
                "severe_toxicity_score": 0.00069618225,
                "identity_attack_score": 0.00085557543,
                "insult_score": 0.0055986145,
                "profanity_score": 0.012346277,
                "threat_score": 0.005754216,
                "sexually_explicit_score": 0.010262027,
                "flirtation_score": 0.20146784
            },
            "Sections/OrderCreation.tex": {
                "toxicity_score": 0.0062516155,
                "severe_toxicity_score": 0.00064849854,
                "identity_attack_score": 0.0019146391,
                "insult_score": 0.0062303683,
                "profanity_score": 0.012107162,
                "threat_score": 0.0064079775,
                "sexually_explicit_score": 0.009141461,
                "flirtation_score": 0.22277433
            },
            "Sections/Appendices/EUPHEMIA.tex": {
                "toxicity_score": 0.008859074,
                "severe_toxicity_score": 0.0012493134,
                "identity_attack_score": 0.0024788564,
                "insult_score": 0.0069048726,
                "profanity_score": 0.014669105,
                "threat_score": 0.00666042,
                "sexually_explicit_score": 0.012385205,
                "flirtation_score": 0.29516837
            },
            "main.tex": {
                "toxicity_score": 0.009047564,
                "severe_toxicity_score": 0.0009059906,
                "identity_attack_score": 0.0030153254,
                "insult_score": 0.0069238725,
                "profanity_score": 0.013780965,
                "threat_score": 0.0071847234,
                "sexually_explicit_score": 0.01020305,
                "flirtation_score": 0.2085626
            },
            "Sections/ForecastModel.tex": {
                "toxicity_score": 0.005686143,
                "severe_toxicity_score": 0.0007390976,
                "identity_attack_score": 0.0016464046,
                "insult_score": 0.0060498673,
                "profanity_score": 0.012448754,
                "threat_score": 0.0061166976,
                "sexually_explicit_score": 0.009082484,
                "flirtation_score": 0.24446987
            },
            "Sections/Introduction.tex": {
                "toxicity_score": 0.006188785,
                "severe_toxicity_score": 0.00061511993,
                "identity_attack_score": 0.0021643746,
                "insult_score": 0.0062303683,
                "profanity_score": 0.012073003,
                "threat_score": 0.0064015044,
                "sexually_explicit_score": 0.008669644,
                "flirtation_score": 0.25973216
            },
            "bibliography.bib": {
                "toxicity_score": 0.017969469,
                "severe_toxicity_score": 0.002040863,
                "identity_attack_score": 0.0037922803,
                "insult_score": 0.008766884,
                "profanity_score": 0.022559889,
                "threat_score": 0.008336896,
                "sexually_explicit_score": 0.02205746,
                "flirtation_score": 0.20944923
            }
        },
        "reason": null
    }
}
{
    "num_done": {
        "table": 1,
        "figure": 0,
        "algorithm": 3,
        "plot": 0
    }
}
{
    "NonTrivialRenderingFilter": {
        "white_pixels_ratio": 94.90016142143322,
        "hash": "00079f9f9f9fbf3f",
        "most_frequent_color_ratio": 94.90016142143322
    }
}