Skip to main content
Have a personal or library account? Click to login
Use Of Ternary Optimization in the Integrated Energy Systems Cover

Full Article

1.
Introduction

The rapid development of Integrated Energy Systems (IES), which are a cornerstone of modern energy infrastructure and are designed to unify multiple energy technologies - such as electricity, heat, cooling, and sometimes even gas - into a single system, increases the importance of optimizing their operating modes [110]. The conceptual structure of such an Energy Hub is shown in Fig. 1. Therefore, it is natural that a vast number of publications are dedicated to this topic. [1123].

Figure 1.

Conceptual structure of the Energy Hub [11]

Optimization plays a crucial role in ensuring the sustainable operation and development of IES for several reasons:

  • enhanced efficiency and cost reduction;

  • integration of renewable energy sources;

  • multi-objective decision making;

  • real-time operation and control;

  • long-term planning and investment decisions.

The relevance of optimization in IES cannot be overstated. By addressing both short-term operational challenges and long-term strategic planning, optimization enables the full potential of IES to be realized, ensuring the integration of diverse energy sources, improving efficiency, reducing costs, and supporting the transition to a sustainable, low-carbon energy future. As research continues to advance [2437], the development of more sophisticated and reliable optimization models will further enhance the performance and reliability of IES.

2.
Ternary Optimization: Key Concepts

Ternary optimization is the process of optimizing models or systems in which variables or parameters are restricted to three possible values, typically {-1, 0, +1}. This form of discrete optimization serves as a compromise between binary optimization (e.g., {0,1}) and full-precision optimization (e.g., 32-bit floating point numbers) [38,39].

Key concepts:

  • Ternary representation. The elements used are restricted to three values, in the simplest case {-1, 0, +1}. This representation reduces computational complexity and memory usage.

  • Sparsity. The inclusion of the value “0” enables the creation of sparse structures, leading to more efficient storage and faster computations.

  • Quantization. Ternary optimization is a form of quantization—mapping continuous values to a predefined set of discrete values.

  • Optimization methods. Ternary Weight Networks (TWNs) [4042] and gradient-based methods for training models with ternary constraints [43].

Advantages:

  • Computational efficiency. Using ternary values simplifies arithmetic operations, reduces the computational complexity of matrix multiplications and convolutions, which is especially important for real-time implementations.

  • Memory savings. Storing ternary values requires fewer bits, significantly reducing memory consumption.

  • Energy efficiency. Ternary operations consume less energy, making them suitable for resource-constrained devices.

  • Sparsity. Ternary models create sparse matrices, accelerating computations, reducing hardware load, and helping to mitigate overfitting.

  • Balanced trade-off. Ternary optimization offers a balance between highly restrictive binary optimization and resource-intensive full-precision optimization.

Disadvantages:

  • Loss of accuracy. Ternary quantization can lead to accuracy loss and degrade model performance, especially for complex tasks.

  • Training complexity. Training ternary models requires specialized methods, such as gradient approximation and backpropagation adjustments.

  • Hardware support. Many hardware architectures are not optimized for ternary computations.

  • Convergence issues. Ternary constraints complicate the optimization process, potentially leading to slower convergence or suboptimal solutions.

Application:

  • Deep learning. Ternary optimization is widely used for model compression and acceleration, such as in Ternary Neural Networks (TNNs) [44] and Ternary Weight Networks (TWNs) [40,42].

  • Edge computing. Ternary models are ideal for deployment on resource-constrained devices, such as smartphones and loT (Internet of Things) devices.

  • Natural Language Processing (NLP). Ternary quantization is applied to transformer models to reduce their size and speed up inference.

  • Computer vision. Convolutional Neural Networks (CNNs) benefit from ternary optimization, especially in real-world applications like object detection and segmentation.

  • Hardware design. Ternary logic is used in the development of specialized hardware solutions for AI accelerators.

Latest achievements:

  • Improved Training Methods. Techniques such as Straight-Through Estimators (STEs) [45] and ternary gradient descent have been developed to enhance the training of ternary models [46].

  • Hybrid Approaches. Combining ternary optimization with methods like pruning and knowledge distillation shows promising potential [47]. Hardware Acceleration. Research is ongoing in hardware architectures that natively support ternary operations. Companies like Google and NVIDIA are actively exploring this field.

Main advantages, disadvantages, application and latest achievements of the ternary optimization are shown in the Table 1.

Table 1.

Ternary Optimization Key Concepts

AdvantagesDisadvantagesApplicationLatest achievements
Computational EfficiencyLoss of AccuracyDeep LearningImproved Training Methods
Memory SavingsTraining ComplexityEdge ComputingHybrid Approaches
Energy EfficiencyHardware SupportNLPHardware Acceleration
SparsityConvergence IssuesComputer Vision
Balanced Trade-offHardware Design

Ternary optimization is a powerful tool for model compression and acceleration, offering a balanced trade-off between efficiency and performance. While it comes with training complexity and potential accuracy loss, recent advancements in algorithms and hardware are making its application increasingly effective in real-world scenarios. As the demand for efficient AI models grows, ternary optimization is likely to play an even greater role in machine learning and deep learning processes.

3.
Ternary Optimization in the IES

The use of this promising approach in IES can significantly enhance energy resource management efficiency, reduce costs, and improve system resilience. Since IES incorporate various energy sources, including renewable (solar, wind), conventional (coal, gas), and energy storage systems, ternary optimization can be applied to address challenges in control, distribution, and optimization within these systems (Fig. 2).

Figure 2.

Architecture of the regional integrated energy system [14]

Advantages of ternary optimization in the IES:

  • Simplified energy flow management. Ternary values, such as {-1, 0, +1}, can represent energy flow directions: -1 for consumption, 0 for no energy flow, and +1 for generation. This simplifies the modeling and management of complex energy networks.

  • Reduced computational resources. Ternary optimization requires less memory and computing power compared to methods using continuous variables, which is crucial for real-time systems like smart grids.

  • Faster decision-making. In dynamically changing renewable energy conditions, ternary optimization enables quicker identification of optimal solutions.

  • Sparsity and computational efficiency. As previously highlighted, ternary models create sparse matrices, accelerating computations and reducing hardware load.

  • Flexibility in management. Ternary optimization facilitates seamless integration of various energy sources and storage systems, ensuring balance between supply and demand.

  • Cost reduction. By optimizing energy flows, ternary optimization minimizes generation and transmission costs.

  • Resilience to changes. Ternary models quickly adapt to fluctuations in energy production and consumption.

  • Scalability. Ternary optimization can be easily scaled for large energy systems, including regional and national grids.

Application of ternary optimization in the IES:

  • Energy distribution optimization. Ternary models can be used to optimize energy distribution among consumers, generators, and storage systems, minimizing transmission losses [48].

  • Microgrid management. In microgrids, which can operate both autonomously and as part of a larger grid, ternary optimization enhances the management of local energy sources and loads.

  • Renewable energy integration. Ternary optimization accounts for the stochastic nature of renewable energy sources (RES) and helps determine optimal utilization strategies.

  • Energy storage systems. Ternary models optimize charging and discharging cycles of batteries and other storage devices, minimizing degradation and maximizing efficiency.

  • Demand response management. Ternary optimization helps balance supply and demand, for example, by switching consumers to alternative energy sources during peak periods.

  • Optimization of fuel cells and hybrid systems. In systems using fuel cells, ternary optimization assists in managing operational modes (generation, storage, inactivity).

As example, the impact on photovoltaic efficiency via this ternary strategy is depicted in Fig. 3.

Figure 3.

Ternary strategy improves the photovoltaic efficiency of ternary devices [48]

Example of ternary optimization in the IES. As one of the simplest application examples, we can consider the management of a microgrid that includes solar panels, wind turbines, batteries, and consumers. In this case, ternary optimization can be applied to:

  • determine when to use energy from solar panels (+1), when to charge batteries (-1), and when to disconnect sources (0);

  • minimize energy costs from the external grid;

  • ensure network stability in response to load fluctuations.

Promising directions for ternary optimization in the IES:

  • Integration with AI and machine learning [44]. Ternary optimization is increasingly combined with machine learning methods for more accurate forecasting and energy system management.

  • Development of specialized algorithms. There is a growing need for algorithms that account for the specific characteristics of energy systems, such as nonlinear losses and transmission constraints [49].

  • Hardware support. The expansion of ternary optimization applications drives the demand for energy-efficient processors and controllers optimized for ternary computing [50]. Key benefits of these expanding applications are provided in Fig. 4.

Figure 4.

Expansion of ternary optimization applications [50]

4.
Proposed model

Below is an example of transforming specific elements of an optimization model for an integrated energy system in GMPL (GNU MathProg Language) into a ternary model by modifying individual variables, constraints, and the objective function. Ternary optimization assumes that variables can take only three values, typically: -1, 0, and +1. The transformation is performed step by step as follows:

1. Defining ternary variables in GMPL

In GMPL, variables are usually declared as continuous or integer. For ternary optimization, variables are restricted to three values: {-1, 0, +1}. The variable declaration is replaced with an integer type with a range constraint:

/*ampl*/

var x{i in I} integer, >= -1, <= 1; # Ternary variable

Here, I is the set of indices for the variable.

2. Modification of the objective function

The objective function is adapted to work with ternary variables. For example, the goal may be to minimize costs or energy losses.

/*ampl*/

minimize TotalCost: sum{i in I} (c[i] * x[i]); #

c[i] — cost, x[i] — ternary variable.

It is necessary to ensure that the objective function correctly accounts for ternary values.

3. Adaptation of constraints

The model constraints are modified to correctly work with ternary variables. For example, an energy balance constraint may look like this:

/*ampl*/

subject to EnergyBalance {t in T}:

sum{i in I} (x[i,t] * P[i]) = D[t]; # P[i] — power, D[t]

— demand.

Here, x[i, t] is a ternary variable that defines whether the energy source is active (+1), disconnected (0), or consuming energy (-1).

4. Considering ternary logic

Logical conditions used in the model (e.g., conditions for turning energy sources on/off) are modified to account for ternary variables. For example:

  • If x[i] = + 1, the source is operating.

  • If x[i] = -1, the source is consuming energy (e.g., charging a battery).

  • If x[i] = 0, the source is turned off.

5. Example of transformation

Here is a simple example of an energy system model in GMPL and its transformation to a ternary model.

Original model (continuous variables):

/*ampl*/

set I; # Set of energy sources

set T; # Set of time intervals

param P{I}; # Power of energy sources

param D{T}; # Energy Demand

param c{I}; # Cost of energy for each source

var x{I, T} >= 0; # Continuous variable - installed power utilization factor of each source at time t

minimize TotalCost: sum{i in I, t in T} (c[i] * x[i, t] * P[i]);

subject to EnergyBalance {t in T}: sum{i in I} (x[i,t]* P[i]) >=D[t];

Transformed Model (TernaryVariables):

/*ampl*/

set I; # Set of energy sources

set T; # Set of time intervals

param P{I}; # Power of energy sources

param D{T}; # Energy Demand

param c{I}; # Cost of energy for each source

var x{I, T} integer, >= -1, <= 1; # Ternary variable

minimize TotalCost: sum{i in I, t in T} (c[i] * x[i, t] * P[i]);

subject to EnergyBalance {t in T}: sum{i in I} (x[i,t]* P[i]) >=D[t];

6. Solving the Model

The transformed model can be solved using an integer programming solver, such as the GLPK solver, which is integrated within GMPL. To run the solution in GMPL, just like in the continuous model, the ‘solve’ command is used:

/*ampl*/

solve;

5.
Results and discussion

The analysis of the obtained results from the solution allows confirming that the ternary variables correctly reflect the behavior of the energy system. In particular:

  • the values of the ternary variables are indeed equal to -1, 0, or +1 (or other specified quantization values);

  • all specified constraints are correctly satisfied;

  • the computed value of the objective function (e.g., total costs) is adequate.

If the model is too complex and the solver takes too long or fails to solve the problem, the following techniques can be effective:

  • using heuristics for initial approximation;

  • applying relaxation (e.g., allowing variables to be continuous during the preliminary solving phase);

  • decomposing the problem into smaller subproblems, such as dividing by time intervals.

The article explores the application of ternary optimization in the IES by addressing both theoretical foundations and practical implementations. The discussion on ternary representation, sparsity, and quantization provides a conceptual framework, while the review of advantages and limitations offers a balanced perspective on its feasibility.

A GMPL-based example demonstrates a step-by-step transformation of an optimization model into a ternary format. This practical illustration enhances the article’s technical depth and makes it more applicable for researchers and engineers working in energy optimization and computational modeling.

Further research in the following areas seems useful:

  • comparative analysis between ternary, binary, and full-precision optimization methods in real-world energy systems;

  • case studies showcasing real-time implementation and performance metrics of ternary optimization in actual energy grids;

  • expanded discussion on the potential role of hardware advancements, such as ternary-compatible processors, in enhancing computational efficiency.

Overall, the article makes a valuable contribution to the field of energy optimization and highlights ternary optimization as a viable and innovative approach for enhancing the efficiency, scalability, and sustainability of modern energy systems.

6.
Conclusions

Ternary optimization presents a promising approach for managing IES by providing a balance between computational efficiency, speed, and resource utilization. By leveraging discrete values (-1, 0, +1), ternary optimization enables simplified energy flow management, reduces computational complexity, and enhances decision-making in dynamic energy environments. Pointed challenges remain in accuracy loss, training complexity, and limited hardware support. The article highlights key applications, including energy distribution, microgrid management, renewable energy integration, and energy storage optimization, demonstrating its versatility across various aspects of modern energy infrastructure. The transformation of GMPL optimization model into a ternary format showcases its practical implementation potential. Future advancements in AI integration, algorithm development, and hardware acceleration will be critical for realizing the full potential of ternary optimization in energy systems. As the demand for sustainable, efficient, and scalable energy solutions grows, ternary optimization is expected to play an increasingly significant role in the evolution of next-generation energy networks. Ternary optimization offers a powerful tool for managing IES, providing a balance between efficiency, speed, and resource consumption. Its application can significantly improve the management of energy flows, especially in the context of the increasing share of renewable energy sources and the complexity of modern energy grids. However, widespread adoption requires further development of algorithms and hardware support.

DOI: https://doi.org/10.14313/jamris-2026-025 | Journal eISSN: 2080-2145 | Journal ISSN: 1897-8649
Language: English
Page range: 118 - 125
Submitted on: Jun 22, 2025
Accepted on: Jul 9, 2025
Published on: Jun 22, 2026
In partnership with: Paradigm Publishing Services
Publication frequency: 4 issues per year

© 2026 Vitalii Babak, Mykhailo Kulyk, Artur Zaporozhets, Svitlana Kovtun, Viktor Denysov, published by Łukasiewicz Research Network – Industrial Research Institute for Automation and Measurements PIAP
This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 License.