| 1585 | |
| 1586 | |
| 1587 | void StochasticPanel::UpdateFromSimInfo() |
| 1588 | { |
| 1589 | m_N->SetValue(m_sd.N); |
| 1590 | m_seed->SetValue(m_sd.Seed); |
| 1591 | |
| 1592 | int i; |
| 1593 | |
| 1594 | m_outputList->Freeze(); |
| 1595 | m_outputList->Clear(); |
| 1596 | wxArrayString vars, labels; |
| 1597 | Simulation::ListAllOutputs(m_case->GetConfiguration(), &vars, &labels, NULL, NULL, NULL, true); |
| 1598 | |
| 1599 | for (size_t i = 0; i < m_sd.Outputs.Count(); i++) |
| 1600 | { |
| 1601 | int idx = vars.Index(m_sd.Outputs[i]); |
| 1602 | if (idx >= 0) |
| 1603 | m_outputList->Append(labels[idx]); |
| 1604 | else |
| 1605 | m_outputList->Append("<Error - remove this>"); |
| 1606 | } |
| 1607 | |
| 1608 | m_outputList->Thaw(); |
| 1609 | |
| 1610 | m_inputList->Freeze(); |
| 1611 | m_inputList->Clear(); |
| 1612 | for (i = 0; i < (int)m_sd.InputDistributions.Count(); i++) |
| 1613 | { |
| 1614 | wxArrayString parts = wxStringTokenize(m_sd.InputDistributions[i], ":"); |
| 1615 | if (parts.Count() < 2) |
| 1616 | continue; |
| 1617 | |
| 1618 | wxString item = GetVarNameFromInputDistribution(parts[0]); |
| 1619 | int disttype = atoi(parts[1].c_str()); |
| 1620 | if (disttype < 0) disttype = 0; |
| 1621 | if (disttype >= LHS_NUMDISTS) disttype = LHS_NUMDISTS - 1; |
| 1622 | |
| 1623 | if (item == m_weather_folder_varname) |
| 1624 | { |
| 1625 | continue; |
| 1626 | /* |
| 1627 | wxArrayString wff = wxStringTokenize(parts[0], "="); |
| 1628 | if (wff.Count() == 2) |
| 1629 | { |
| 1630 | wxString path = wff[1]; |
| 1631 | path.Replace(";", ":"); |
| 1632 | if (m_folder->GetValue().IsEmpty()) |
| 1633 | m_folder->SetValue(path); |
| 1634 | if (path.Lower() != m_folder->GetValue().Lower()) |
| 1635 | { |
| 1636 | wxString fld = m_folder->GetValue(); |
| 1637 | fld.Replace(":", ";"); |
| 1638 | wff[1] = fld; |
| 1639 | parts[0] = wff[0] + "=" + wff[1]; |
| 1640 | UpdateWeatherFileList(); |
| 1641 | } |
| 1642 | if (m_weather_files.Count() == 0) |
| 1643 | UpdateWeatherFileList(); |
| 1644 | item = m_weather_folder_displayname; |
nothing calls this directly
no test coverage detected