Skip to content

Commit

Permalink
Update results handling and labeling for hybrids
Browse files Browse the repository at this point in the history
  • Loading branch information
sjanzou committed Jul 15, 2023
1 parent 1094b11 commit 1f73a21
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 14 deletions.
26 changes: 13 additions & 13 deletions src/results.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -155,12 +155,12 @@ void PopulateSelectionList(wxDVSelectionListCtrl* sel, wxArrayString* names, Sim
}

// TODO: hybrid processing
if (sim->GetCase()->GetConfiguration()->Technology.size() > 1) {
steps_per_hour_lt = steps_per_hour / (an_period - 1);
lifetime = true;
if (steps_per_hour_lt * 8760 * (an_period - 1) != (int)row_length)
steps_per_hour_lt = -1;
}
// if (sim->GetCase()->GetConfiguration()->Technology.size() > 1) {
// steps_per_hour_lt = steps_per_hour / (an_period - 1);
// lifetime = true;
// if (steps_per_hour_lt * 8760 * (an_period - 1) != (int)row_length)
// steps_per_hour_lt = -1;
// }


// I know we do not want to start this again but wanted lifetime subhourly output
Expand Down Expand Up @@ -975,8 +975,8 @@ void ResultsViewer::Setup(Simulation* sim)
use_lifetime = true;

// TODO: hybrid use_lifetime
if (cfg->Technology.size() > 1)
use_lifetime = true;
// if (cfg->Technology.size() > 1)
// use_lifetime = true;

// by default, no valid time shift specified so default to 0.0
// for subhourly simulation and 0.5 for hourly simulation
Expand Down Expand Up @@ -2230,11 +2230,11 @@ class TabularBrowser::ResultsTable : public wxGridTableBase
}

// TODO: hybrid processing
if (results->GetCase()->GetConfiguration()->Technology.size() > 1) {
UseLifetime = true;
if (VarValue* vv = results->GetValue("analysis_period"))
Years = (int)vv->Value();
}
// if (results->GetCase()->GetConfiguration()->Technology.size() > 1) {
// UseLifetime = true;
// if (VarValue* vv = results->GetValue("analysis_period"))
// Years = (int)vv->Value();
// }

MinCount = 10000000;

Expand Down
7 changes: 6 additions & 1 deletion src/simulation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1193,7 +1193,12 @@ bool Simulation::InvokeWithHandler(ISimulationHandler *ih, wxString folder)
wxString units(ssc_info_units(p_inf));
wxString ui_hint(ssc_info_uihint(p_inf));
wxString sam_output_name = prepend_name + name; // TODO: hybrid processing
label = prepend_name + " " + label;
if (prepend_name.Lower() != label.Left(prepend_name.length()).Lower()) { // check for "Battery Battery..."
if (label.Left(2) == "AC" || label.Left(2) == "DC") // e.g. PVWatts AC..."
label = prepend_name + " " + label;
else
label = prepend_name + " " + label.Left(1).Lower() + label.Right(label.length()-1);
}

if (/*(var_type == SSC_OUTPUT || var_type == SSC_INOUT) &&*/ data_type == SSC_NUMBER)
{
Expand Down

0 comments on commit 1f73a21

Please sign in to comment.