Skip to content

Review of the SAMA paper submitted to JOSS #14

Open

Description

@gialmisi

I have collected my feedback related to the paper in this issue. My feedback is based on the pdf built on commit 694a395 . Line numbers (L) refer to the JOSS pdf draft. Review issue in JOSS: openjournals/joss-reviews#11403

General comments

Sadat, Takahashi & Pearce (2023), Energy Conversion and Management 298:117686, seems to be already a full software paper about SAMA ("this paper introduces and validates SAMA"). It describes many of the same features as in the current contribution, and the HOMER Pro validation. Much of the present manuscript re-presents this material, including the HOMER Pro pricing figures and the tool survey used as the State of the Field.

The repository history shows substantial work since then: the EV energy management with V2H/V2G (EMS_EV.py), heat pump models (Bosch/Goodman), the ADE and ABC optimizers and GWO in Python, the multi-cashflow analysis, and the pip-installable package with CLI and YAML configuration. Several of these are listed as future work in Section 5.4 of the 2023 paper. However, the JOSS manuscript never states what is new relative to 2023; it calls the 2023 paper "the primary paper [that] describes the core platform". I ask the authors to state explicitly which functionality is new since Sadat et al. (2023), to frame the JOSS paper around that contribution, and to present the rest as prior work.

Moreover, the claim that SAMA "has been validated against HOMER Pro across multiple U.S. climate zones" (L23–24, L31–32) refers to the 2023 validation of the earlier code base, as I understand it. Since then the dispatch engine has had its energy balance corrected (as the paper itself mentions), and the EV and heat pump modules have been added. Has the HOMER Pro comparison been re-run on the current version? This was not clear to me. If not, the claim should be qualified.

The title and the name ("Multi-Objective Advisor") present SAMA as a multi-objective optimization platform, but the implementation does not support this. In src/samapy/core/Fitness.py the objective is a fixed weighted sum:

objective = NPC_scale * NPC + EM_scale * EM * LEM   # NPC_scale = 1e-5, EM_scale = 1e2

EM is a 0/1 switch that defaults to 0 (cost only). The scaling weights are hard-coded (the code comment reads "adjust based on your typical values") and cannot be set through the configuration. No Pareto front or set of trade-off solutions is produced, and all four optimizers are single-objective. This is a scalarized single-objective problem with fixed, hidden weights. Either the multi-objective capability should be developed (e.g., Pareto front approximation, user-specified preferences, support for choosing among trade-offs), or the title and framing should be revised to match what the software does. I must also point out that using weighted sums to scalarize a problem will not let an optimizer find unsupported solutions. And with fixed weights, only one solution will be generated in any case. The choice of weighted sums, the fixed weights, and why the weights are hidden in the code, should be well justified and documented. As it stands, SAMA is not a multi-objective optimization platform in any meaningful sense.

Summary

  • L8-9 ("Solar Alone Multi-Objective Advisor (SAMA) is an open-source platform for the planning, design, and operation optimization…"): This conflicts with the title, which implies a multi-objective optimization platform, but the opening tells a different story. What is a "multi-objective advisor"? I do not understand. Relatedly, at L15-16 ("may optionally include a second objective"): this reads oddly given the title says "Multi-Objective Optimization", because it implies that having more than one objective is optional. See the general comment on multi-objective optimization above.
  • L17-19: Is this meant to be decision-support software, or planning software in general? I am not sure. Given the title, I would expect the conflicting nature of the objectives typically considered in this domain to be described at some level. What motivates the multi-objective optimization approach? This is not clear.
  • L19 ("the examples in the documentation"): Consider linking to the documentation here.
  • L23 ("HOMER Pro"): HOMER Pro appears here without introduction or citation; it is only explained at L43. Introduce and cite it at first mention.
  • L27-29 and L104-105 (the four metaheuristics, "enabling algorithmic comparison within a consistent evaluation framework"): These are single-objective algorithms, not multi-objective variants. There are plenty of mature open-source implementations of them (e.g., pymoo, DEAP, SciPy's differential_evolution), so I wonder why they are highlighted as contributions of the software. Re-implementing existing tools should be well motivated, and so should the inclusion of four of them. Why not use an established optimization library for this layer?

Statement of Need

  • L35-38: There is plenty of open-source optimization software, including multi-objective optimization software. Based on the manuscript as it stands, I do not understand what SAMA does that cannot be achieved with existing libraries. I appreciate that generic optimization libraries do not provide microgrid component models, dispatch, or tariff calculations; if that is SAMA's value, the paper should say so clearly and compare SAMA against domain tools (see below) rather than emphasize the optimizers.

  • L38-41 ("simultaneous optimization over competing objectives (minimizing lifecycle cost, meeting reliability constraints, maximizing renewable penetration)"): I would then expect SAMA to provide the necessary support for practitioners to select among the compromises. In the implementation, only cost is an objective by default; reliability and renewable fraction are penalty constraints.

  • L41-42 ("Without appropriate software…"): I am not sure what "appropriate" means here. Based on the description so far, these problems could be modeled with existing multi-objective optimization software. What makes existing software inappropriate?

  • L43-53: So is the main motivation for SAMA to be a free/libre alternative to HOMER Pro, providing a similar user experience and tooling? If so, this should be at the forefront of the paper, as it is the best motivation I have seen in the manuscript.

  • L54-59: I do not understand why contributing these features to an existing alternative was out of the question. The JOSS review checklist asks: "If related tools exist, do they provide a clear 'build vs. contribute' justification explaining their unique scholarly contribution and why alternatives are insufficient?" This is not explained.

  • L54-56 ("Open-source alternatives…"): Of the tools listed, only SAM and PVWatts are open source; PVsyst and RETScreen are not. More importantly, relevant open-source tools are missing:

    The landscape of similar open-source software is in fact quite rich, and some of these projects have thousands of commits, many contributors, and active development. The claims that "none implement the complex utility tariff structures" and "none support EVs or heat pumps" (L57–59) do not hold as stated. At this point, I would expect the need for SAMA to be very well justified.

State of the Field

  • L65-68: The section relies on the survey from Sadat et al. (2023), which predates and omits the open-source tools listed above. Please update it.
  • L93-105 ("SAMA's key differentiators within this landscape"): Does this mean that no other open-source energy-system tool offers these features? REopt, for example, covers much of (2), (4) and (5). The EV energy management (3) does appear to be distinctive; if so, it could be a strong point to build the paper around.

Software Design

  • L106-171: This section meets the JOSS requirements very poorly: "Does the paper include a 'software design' section that explains the trade-offs weighed, the design/architecture chosen, and why it matters? Is the content compelling and does it demonstrate meaningful design thinking?" It largely lists features and models without discussing the trade-offs behind them, for example metaheuristics versus mathematical programming (as used by REopt), or Numba JIT compilation versus the NumPy vectorization also mentioned in the paper. As a reader, this is where I expected to find the most important motivation for a new library instead of contributing to established ones; at the moment, I am not convinced this library is justified. The section also makes no reference to multi-objective optimization, which poses its own software challenges, especially if any decision-support aspects are to be considered.

Research Impact Statement

  • L172-188: The impact should be stated clearly in terms of which version of the software it comes from: what impact stems from the current code, and what stems from the version described in Sadat et al. (2023)? Going by the repository history, the EV/V2G management was added in October 2025 and the heat pump models and pip package in March 2026, while most of the six cited publications appeared before then. As written, the statement credits the current package with impact that largely belongs to the earlier software. Please indicate, for each publication, which version and features of SAMA were used, and what evidence of use (if any) exists for the functionality that is new since 2023.

Minor

  • L120: "chemistryies" -> "chemistries".
  • L133: "In each of annual hours" -> e.g., "In each hour of the year".

Closing remarks

SAMA does have unique contributions since the original 2023 paper. In its current state, however, the paper is a mess: it mixes material already published in 2023 with the new work, does not compare SAMA against the relevant open-source tools, and does not justify the design choices made. The paper should be reframed to clearly distinguish itself from its predecessor and to highlight its novelty.

Most importantly, in its current state the name of the framework and the title of the paper are misleading in their inclusion of the term "multi-objective optimization". This must be corrected, either by revising the title and framing, or by actually adding multi-objective optimization to the framework.

I will be happy to clarify on any of my point and answer any follow up questions. I will have a more through separate look at the repository a bit later, as the manuscript already took me almost a whole day to check.

Activity

  1. Sas1997 commented on Nov 3, 2026

    @Sas1997
    Owner

    Dear @gialmisi,

    Thank you for this thorough and constructive review. It led to substantial changes in both the paper and the software. Below we respond to each point in order. Line numbers in your review refer to the draft at commit 694a395; since the paper has been rewritten, we refer to its sections instead. All software changes are in the current release, SAMAPy 1.0.10 on PyPI, and the revised paper is in paper.md on the main branch.

    General comments

    1. Overlap with the 2023 paper.
    The 2023 paper in Energy Conversion and Management described the core methods of an earlier version: PV, wind, battery, generator and grid components, PSO and seven electricity tariffs. The JOSS paper is now framed around the software as it is today. The second paragraph of the Summary states what the 2023 paper covered and lists what has been added since, with dates:

    • 2023 to 2024: net metering, IRR, ROI and payback calculations.
    • 2025: ultra-low TOU rates, natural gas tariffs, the EV model with V2H/V2G dispatch, and three further optimizers.
    • Early 2026: Bosch and Goodman heat pump models, the pip package, the configuration wizard and the Windows interface.
    • Late 2026: the multi-objective mode, configurable weights, commercial demand charges, bi-facial PV modules, the test suite and continuous integration.

    The Statement of Need, State of the Field and Software Design sections now discuss these capabilities rather than repeating the 2023 material.

    2. HOMER Pro validation.
    The comparison was not re-run on the current version, so we qualified the claim. The Summary now says that the comparison with HOMER Pro covers the 2023 code. The current code is checked by the automated test suite: inputs, the energy balance of the dispatch, the optimizers against known optima, the multi-objective mode against an analytical Pareto front, and the command-line workflow.

    3. Multi-objective framing.
    You were right that the earlier objective was a scalarized single objective with fixed weights. We addressed this in the software and in the text:

    • A true multi-objective mode. samapy-run -m multi, or optimization_mode: multi in the configuration file, approximates the Pareto front of two or more objectives (NPC, LCOE, levelized emissions, LPSP and renewable fraction) with NSGA-II from pymoo.
      • Reliability, the renewable fraction, the budget and the capacity limits are passed to NSGA-II as constraints, not penalties.
      • The front is filtered by epsilon-dominance so that negligible differences are not reported as trade-offs. It is saved as a CSV file and a figure.
      • One design is selected for the detailed reports: a compromise (achievement scalarizing function), the best design in one objective, or a weighted choice.
      • The configuration wizard asks for all of these settings. The mode is off by default, so the standard single-objective calculation is unchanged.
    • Configurable weights. The single-objective weights are no longer hidden in the code. NPC_weight and EM_weight are set in the configuration file, and the Software Design section explains the default weights and why a fixed weighted sum cannot reach non-convex parts of a trade-off.
    • The name. "Solar Alone Multi-Objective Advisor" was originally chosen to describe the range of goals SAMA is applied to, such as off-grid and grid-connected system design, reducing energy costs and promoting sustainability, rather than multi-objective optimization alone. We kept the name for continuity with earlier publications and users. With the new mode, the title's "Multi-Objective Optimization Platform" now also describes an implemented capability.

    Summary

    • L8–9, L15–16 and L17–19 (framing and purpose).
      • The Summary now opens by stating that SAMA is a platform for the optimal planning and design of hybrid renewable energy systems for buildings and small communities.
      • It describes how each design is evaluated: hourly simulation, rule-based dispatch, bills under the selected tariff and lifecycle cash flows.
      • It distinguishes the single-objective and multi-objective modes.
      • The motivation for the multi-objective mode is given in the Statement of Need and the Software Design section.
    • L19. The Summary links to the documentation.
    • L23. HOMER Pro is now introduced and cited at its first mention.
    • L27–29, L104–105 (metaheuristics). We no longer present the four metaheuristics as contributions. The Software Design section states that they are not new algorithms. It gives their history in SAMA (PSO and GWO were written for the 2022 to 2023 MATLAB and Python versions; ADE, ABC and the Python GWO were added in 2025). It explains that they share one interface for settings, seeds, bounds and convergence output, so different algorithms can be compared on the same design problem. For the multi-objective mode we used pymoo rather than writing a new implementation, as you suggested. All optimizers accept bounds, population size, iterations, number of runs, a random seed and a custom cost function as arguments.

    Statement of Need

    • L35–38 and L41–42 (what SAMA adds, and why existing software does not fit). The Statement of Need now states SAMA's domain-specific value relative to HOMER Pro, and the State of the Field compares it with the open-source domain tools. Instead of calling other software "inappropriate", we describe the methodological difference. Programming-based tools optimize dispatch together with sizing. SAMA operates each design with explicit hourly rules and computes each bill as the tariff defines it, which handles nonlinear and conditional relations such as tiered bills, annual net-metering reconciliation and battery kinetics without reformulation. We also state the cost of this choice: many simulations per run and no proof of global optimality.
    • L38–41 (choosing among trade-offs). Addressed by the multi-objective mode and its selection rules (see general comment 3).
    • L43–53 (HOMER Pro as the motivation). The Statement of Need now leads with it. SAMA keeps HOMER Pro's simulate-and-search approach, is free and open under AGPL-3.0, and adds capabilities that HOMER Pro does not provide:
      • EVs with V2H/V2G dispatch and price arbitrage,
      • heat pumps coupling the thermal and electrical loads,
      • tiered electricity rates and tiered and seasonal natural gas tariffs,
      • a Pareto front,
      • a scriptable Python package.
    • L54–59 (build versus contribute). The State of the Field now ends with this justification. SAMA was started in 2022 to bring HOMER Pro's simulate-and-search approach into open code. Building it on one of the MILP frameworks would have replaced its rule-based dispatch with optimized dispatch, which changes the method rather than extending it.
    • L54–56 (missing tools and overstated claims). We added REopt/REopt.jl, MicroGridsPy, oemof.solph, PyPSA, Calliope, OSeMOSYS and pvlib, and corrected the claims about tariffs, EVs and heat pumps. For example, we now state that REopt.jl handles demand charges and heat pumps, and also models combined heat and power, ground-source heat pumps and thermal storage, which SAMA does not. Table 1 compares the capabilities of SAMA, HOMER Pro, REopt, MicroGridsPy and the general frameworks feature by feature. Each entry was checked against the tools' public documentation, with notes on partial support.

    State of the Field

    • L65–68. The survey has been rewritten and now includes the tools above.

    • L93–105. We agree that EV energy management is SAMA's most distinctive feature, and the paper now says so. A paragraph describes the rule-based V2H/V2G controller that is embedded in the sizing loop:

      • it charges from renewable surplus first,
      • it charges from the grid only when later sell prices cover the round-trip losses,
      • it sells only when the price covers battery wear,
      • it keeps a buffer so the departure state of charge is met,
      • it limits its look-ahead to the next departure.

      The section also includes a dedicated paragraph differentiating SAMA from REopt.jl, the closest open-source counterpart.

    Software Design

    The section now discusses design trade-offs rather than listing features:

    • Search method: metaheuristics versus mathematical programming. The objective is non-smooth, with replacements, the generator's minimum load, tiered and TOU bills and net-metering reconciliation, so it has no analytical gradient. Integer variables are handled by rounding inside the evaluation, and runs can be repeated with different seeds.
    • Performance: Numba versus NumPy. The hourly dispatch depends on the battery and EV states left by earlier hours, so it is sequential. An earlier NumPy-vectorized version was replaced by Numba-compiled loops. One evaluation takes a median of about 2.5 ms compiled versus 170 ms uncompiled. The benchmark script is benchmarks/fitness_timing.py, and the paper states the costs of this choice.
    • Objectives and constraints: the weighted sum and its limitation, constraint handling in the multi-objective mode, epsilon-dominance filtering of the front, and the rules for selecting a design.
    • Models, interfaces and testing: including the new bi-facial PV model (pvlib infinite sheds) with sub-arrays, demand charges and the minimum charge rule, the pytest suite and continuous integration on GitHub Actions.

    Research Impact Statement

    The statement now ties each study to the software version and features it used:

    • The 2023 paper describes and validates the 2023 code.
    • Five further studies used the sizing core with the tariff and financial calculators. They were published before the heat pump models, the pip package and the multi-objective mode were released, and none used the EV or heat pump modules.
    • A seventh, recently published study on self-funded agrivoltaic shield walls for citrus (Hayibo et al., 2026) used the bi-facial modules and demand charges, which were developed for it.

    Minor comments

    • L120: "chemistryies" was corrected.
    • L133: the sentence was reworded to "In each hour, ...".

    Further changes to the software

    While addressing the review we also:

    • added commercial demand charges with an optional minimum charge rule, and bi-facial PV modules with sub-arrays (see the Software Design section). These were developed for our recently published study on self-funded agrivoltaic shield walls for citrus (Hayibo et al., 2026, Processes, https://doi.org/10.3390/pr14213429), which is cited in the Research Impact Statement,
    • extended the test suite to 115 tests, covering the new features, the multi-objective mode and the configuration wizard, run on Python 3.10 and 3.12 with GitHub Actions,
    • extended the configuration wizard so that it asks about every new feature (all off by default),
    • changed the wizard so that input files are read from a folder the user chooses, and a missing file stops the run instead of falling back to the example data,
    • fixed console output on Windows when the output is redirected to a file.

    The documentation describes all new features and configuration keys.

    We would welcome your further review of the repository. Thank you again for your time and detailed feedback.

    Best regards,
    Ali

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions