compareSimulations: Compare two simulations

View source: R/utilities-simulation.R

compareSimulationsR Documentation

Compare two simulations

Description

Compare two simulations

Usage

compareSimulations(simulation1, simulation2, compareFormulasByValue = FALSE)

Arguments

simulation1

First Simulation to compare

simulation2

Second Simulation to compare

compareFormulasByValue

If FALSE (default), parameters are considered not equal if the have the same value but different formulas (e.g., a constant vs. explicit formula). If TRUE, only values are compared.

Details

The function compares two simulations and returns a list of entities that differ:

  • Parameters: a named list with a list of all Parameter entities that are:

  • in simulation1 but not in simulation 2 (In1NotIn2)

  • in simulation 2 but not in simulation 1 (I21NotIn1)

  • a list Different with all parameters which values differ between the simulations. Two parameters are considered different if their formulas or values differ.

Value

Named list with following levels:

  • Parameters with named lists In1NotIn2, In2NotIn1, and Different, holding the Parameter objects that are present in the first but not in the second simulation, present in the second but not in the first simulation, and present in both simulations but with different formulas and/or values, respectively.

See Also

isParametersEqual

Examples

## Not run: 
humanSim <- loadSimulation(file.path(modelFolder, "DefaultHuman.pkml"))
ratSim <- loadSimulation(file.path(modelFolder, "DefaultRat.pkml"))
diffParams <- compareSimulationParameters(humanSim, ratSim)

## End(Not run)

esqLABS/esqlabsR documentation built on April 17, 2025, 10:51 a.m.