• User Guide
  • Calculation
  • Automation
  • Web API
  • Validation
  • Contact Us
Search Results for

    Show / Hide Table of Contents
    • Introduction
    • –––––––––––––––––––
    • Snippets - General
      • Write to Log
    • Snippets - Set up workbook
      • Site
      • Climate
      • Shading objects
      • Components
      • Layout
      • Energy
      • Report
    • Snippets - Calculation
      • Run Energy Calculation
      • Analyse Results
    • Snippets - Layout
      • Set the pitch value
      • Vary pitch by slope
      • Define inverter blocks
      • Specify site
      • Set the tracker system
      • Import regions from files
    • Snippets - Maps
      • Elevation Profile Tool
      • Projections
    • Snippets - Optimisation
      • Optimisation
    • Snippets - Trackers
      • Importing tracker positions
      • Using custom tracker rotations
    • –––––––––––––––––––
    • Class References
      • Scripting
        • AcWiring
        • AddableCollection<T>
        • AddCentralInverterAndAssignStringsParameters
        • Angle
        • AngularModelEnum
        • AnnualEnergyYieldResults
        • AreaLimitation
        • AreaLimitationType
        • Azimuth
        • AzimuthVsAltitude
        • BackgroundImage
        • CalculationSettings
        • CellTempModelParameters
        • CentralInverterLocationParameters
        • CircumsolarType
        • Climate
        • ComponentLibrary
        • ComponentStatistic
        • CustomDateTimeTrackerPositionAlgorithmBase
        • DiffuseMultipliers
        • DiffuseShadingScheme
        • DiffuseTranspositionModel
        • DigitalTerrainResultsSummary
        • DiodeModel
        • DisabledModels
        • DistanceType
        • DistributionType
        • Domain
        • Efficiency
        • EfficiencyBase
        • EfficiencyCurve
        • EfficiencyCurveType
        • ElectricalLimitation
        • ElectricalLimitationType
        • ElectricalPower
        • Elevation
        • ElevationContours
        • ElevationGrid
        • ElevationProfileSamplePoint
        • ElevationProfileStatistics
        • EnergyYieldCalculationScenario
        • EnergyYieldCalculationType
        • EnergyYieldEffects
        • EnumTechnology
        • ExceedanceLevel
        • ExclusionRegion
        • Export
        • FillOptionComponentOptions
        • FillOptionIndividualComponentsOptions
        • FillOptionInverterBlockOptions
        • FillOptionRackLayoutOptions
        • FillOptionsSpacingType
        • FillOptionsType
        • FillOptionTrackerLayoutOptions
        • FillOptionUseExistingLayoutOptions
        • FlatTerrainParameters
        • GenericLayout
        • GenericLayoutFillOption
        • GenericLayoutSettings
        • Geography
        • HorizonData
        • I2DLocation
        • I3DLocation
        • IAddableEnumerable<T>
        • IAddableKeyedEnumerable<TKey, TValue>
        • IClearableCollection<T>
        • IEditableKeyedCollection<tKeyType, tContainedType>
        • IEditableKeyedEnumerable<TKeyType, TContainedType>
        • IElevationSource
        • Import
        • INamedItem
        • InstantaneousCondition
        • InverterBlockSpecification
        • InverterEfficiencyType
        • InverterInputInstance
        • InverterInputSpecification
        • InverterInstance
        • InverterSpecification
        • InverterSpecificationDocumentType
        • InverterTemperatureCurveEntry
        • InverterType
        • IReadable2DLocation
        • IReadable3DLocation
        • IReadableKeyedCollection<tKeyType, tContainedType>
        • IReadableKeyedEnumerable<TKey, TValue>
        • IRemovableKeyedEnumerable<TKey, TValue>
        • IResolution
        • Irradiance
        • ISpeed
        • IvCurve
        • KeyedCollection<TKeyType, TContainedType>
        • LayoutBoundary
        • LayoutBoundaryMarginParameter
        • LayoutBoundaryMarginParameters
        • LayoutChoiceType
        • LayoutParamsPitchModel
        • LayoutStatistic
        • Location
        • Location3D
        • LogLevel
        • MarginType
        • ModuleCellLayoutType
        • ModuleOrientation
        • ModuleSpecification
        • ModuleSpecificationDocumentType
        • MonteCarloSettings
        • MonthlyAlbedo
        • MonthlyEnergyYieldEffects
        • MonthlyEnergyYieldResults
        • MonthlySoilingValue
        • PerformanceStatistics
        • Projection
        • ProjectionInformation
        • PvsystCellTempModelParameters
        • PvsystInputIrradianceType
        • PVsystModelParameters
        • Quad
        • RackInstanceInfo
        • RackLayoutDefinition
        • RackLayoutParameters
        • RackSpecification
        • RackSystemSpecification
        • ReadOnly3DLocation
        • ReadOnlyLocation
        • Rectangle
        • Region
        • ReportCategory
        • Reporting
        • Resolution
        • RoadLocationParameters
        • RoughnessContours
        • RowPositionParameters
        • ScenarioAlbedoData
        • ScenarioMonthlyAlbedo
        • ScriptingException
        • ShadingTargetPointPattern
        • SiteLayout
        • SiteLayoutStatistics
        • SiteLayoutType
        • SiteReferencePoint
        • SoilingEffectData
        • SolarResource
        • SpacingZone
        • SpecifySiteConfiguration
        • SpecifySiteDefinition
        • SpecifySiteLayoutRegionFillChoice
        • Speed
        • StringPatternType
        • SubArray
        • SunGeography
        • SunPosition
        • SunriseSunset
        • Temperature
        • TimeStepCalculation
        • Toolbox
        • TrackerGroup
        • TrackerImport
        • TrackerInfo
        • TrackerLayoutDefinition
        • TrackerLayoutParameters
        • TrackerPlacementModeType
        • TrackerPositionAlgorithmBase
        • TrackerRotations
        • TrackerRotationsTimeStep
        • TrackerSystemSpecification
        • TrackerTemplateSpecification
        • TransformerInstance
        • TransformerModelType
        • TransformerSpecification
        • TransformerSpecificationDocumentType
        • TwoDiodeParameters
        • Uncertainty
        • UncertaintyAnnualVariabilities
        • Workbook
        • WorkbookSettings
        • WorkbookSpecificModuleSpecification
        • YearRange
        • YieldResult
        • YieldResults

    Analyse Calculation Results

    If calculation results have been saved after running a calculation (as described in Write Result Files) it is useful to analyse them.

    This allows you to access and manipulate the data from one or more results - allowing you to compare multiple results together.

    The files containing the data are in XML format. There are some useful scripting utility functions available to help you read and make sense of their content.

    ResultsShared library

    These examples use a library called ResultsShared.cslib (included in the installation). This library file contains the following C# classes and code that you can use - reducing the amount of code you have to write.

    Class Description
    Utils Useful utility functions

    Walkthrough of analysing results

    1. Run multiple energy yield calculations

    Make sure that calculation results are being written out after a calculation has finished (as described in Write Result Files).

    Run multiple energy yield calculations (either manually - changing parameters yourself) or using a script (such as for each site layout as described in the snippet Run calculation on each site layout).

    You should end up with a Results folder containing multiple folders, each of which contain various result files generated by the calculation.

    2. Import the ResultsShared.cslib Library

    • Right-click on this link (ResultsShared.cslib) and choose 'Save link as' and save the file as ResultsShared.cslib.
    • Open the Scripting Editor and click on the 'Import Scripts from Files' button. Import Scripts
    • Find the folder you saved the ResultsShared.cslib file above and select and import the file
    • The 'ResultsShared' User Library script should be loaded into the workbook and appear on the left-hand side. You don't need to look at the contents (but it is recommended if you want to learn!). Scripts that you write can now use functionality provided in this user library.

    3. Use a utility function to create a summary file

    In a normal script (create a new empty default script if required) copy the following snippet:

    const string baseResultsFolderPath = @"C:\Data\Results";
    UserLibs.ResultsShared.Utils.SummariseResultsToTsv(baseResultsFolderPath);
    

    IMPORTANT: Make sure to replace the path with your own folder path (the one containing the folders of result files).

    Run this script.

    Two files should be generated in the folder containing the result folders:

    1. "Results (column per result).tsv"
    2. "Results (row per result).tsv"

    Open "Results (row per result).tsv" in Excel if you have it installed. There will be a row of different column headers and a row for each of the results (from each of the folders).

    You can then analyse and compare the results in Excel.

    In This Article
    Back to top DNV SolarFarmer Home