Class StochasticModelsRegistry
Inheritance
Inherited Members
Namespace: SpiceSharpParser.ModelReaders.Netlist.Spice.Context.Models
Assembly: SpiceSharpParser.dll
Syntax
public class StochasticModelsRegistry : IStochasticModelsRegistry, IModelsRegistry
Constructors
| Improve this Doc View SourceStochasticModelsRegistry(IEnumerable<INameGenerator>, Boolean)
Initializes a new instance of the StochasticModelsRegistry class.
Declaration
public StochasticModelsRegistry(IEnumerable<INameGenerator> modelNamesGenerators, bool isModelNameCaseSensitive)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.IEnumerable<INameGenerator> | modelNamesGenerators | The enumerable of model name generators. |
System.Boolean | isModelNameCaseSensitive | Is model names case sensitive. |
Properties
| Improve this Doc View SourceAllModels
Gets or sets the list of all models in the registry.
Declaration
protected Dictionary<string, Model> AllModels { get; set; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.Dictionary<System.String, Model> |
IsModelNameCaseSensitive
Declaration
public bool IsModelNameCaseSensitive { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
ModelsGenerators
Gets or sets the dictionary of models generators.
Declaration
protected Dictionary<string, Func<string, Model>> ModelsGenerators { get; set; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.Dictionary<System.String, System.Func<System.String, Model>> |
ModelsWithDev
Gets or sets the dictionary of stochastic models with dev parameters.
Declaration
protected Dictionary<string, Dictionary<Parameter, ParameterRandomness>> ModelsWithDev { get; set; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.Dictionary<System.String, System.Collections.Generic.Dictionary<Parameter, ParameterRandomness>> |
ModelsWithLot
Gets or sets the dictionary of stochastic models with lot parameters.
Declaration
protected Dictionary<string, Dictionary<Parameter, ParameterRandomness>> ModelsWithLot { get; set; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.Dictionary<System.String, System.Collections.Generic.Dictionary<Parameter, ParameterRandomness>> |
NamesGenerators
Gets the object model name generators.
Declaration
protected IEnumerable<INameGenerator> NamesGenerators { get; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<INameGenerator> |
StochasticModels
Gets or sets the dictionary of stochastic models.
Declaration
protected Dictionary<Simulation, Dictionary<string, List<Model>>> StochasticModels { get; set; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.Dictionary<SpiceSharp.Simulations.Simulation, System.Collections.Generic.Dictionary<System.String, System.Collections.Generic.List<Model>>> |
Methods
| Improve this Doc View SourceCreateChildRegistry(List<INameGenerator>)
Declaration
public IModelsRegistry CreateChildRegistry(List<INameGenerator> generators)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.List<INameGenerator> | generators |
Returns
Type | Description |
---|---|
IModelsRegistry |
FindModel(String)
Declaration
public Model FindModel(string modelName)
Parameters
Type | Name | Description |
---|---|---|
System.String | modelName |
Returns
Type | Description |
---|---|
Model |
FindModelEntity(String)
Declaration
public IEntity FindModelEntity(string modelName)
Parameters
Type | Name | Description |
---|---|---|
System.String | modelName |
Returns
Type | Description |
---|---|
SpiceSharp.Entities.IEntity |
GetStochasticModelDevParameters(String)
Gets the stochastic model DEV parameters.
Declaration
public Dictionary<Parameter, ParameterRandomness> GetStochasticModelDevParameters(string baseModel)
Parameters
Type | Name | Description |
---|---|---|
System.String | baseModel | A base model. |
Returns
Type | Description |
---|---|
System.Collections.Generic.Dictionary<Parameter, ParameterRandomness> | A dictionary of DEV parameters and their tolerance value. |
GetStochasticModelLotParameters(String)
Gets the stochastic model LOT parameters.
Declaration
public Dictionary<Parameter, ParameterRandomness> GetStochasticModelLotParameters(string baseModel)
Parameters
Type | Name | Description |
---|---|---|
System.String | baseModel | A base model. |
Returns
Type | Description |
---|---|
System.Collections.Generic.Dictionary<Parameter, ParameterRandomness> | A dictionary of LOT parameters and their tolerance value. |
GetStochasticModels(Simulation)
Gets the stochastic models.
Declaration
public Dictionary<string, List<Model>> GetStochasticModels(Simulation simulation)
Parameters
Type | Name | Description |
---|---|---|
SpiceSharp.Simulations.Simulation | simulation |
Returns
Type | Description |
---|---|
System.Collections.Generic.Dictionary<System.String, System.Collections.Generic.List<Model>> | A dictionary of base models and their stochastic models. |
ProvideStochasticModel(String, Simulation, Model)
Provides a model for component.
Declaration
public Model ProvideStochasticModel(string componentName, Simulation simulation, Model model)
Parameters
Type | Name | Description |
---|---|---|
System.String | componentName | A component name. |
SpiceSharp.Simulations.Simulation | simulation | Simulation. |
Model | model | A model for component. |
Returns
Type | Description |
---|---|
Model | If a model is stochastic (dev, lot) then a copy of model with be returned. If a model is not stochastic then a raw model is returned. |
RegisterModelDev(Model, Func<String, Model>, Parameter, Parameter, String)
Registers that a model has a dev parameter.
Declaration
public void RegisterModelDev(Model model, Func<string, Model> generator, Parameter parameter, Parameter tolerance, string distributionName)
Parameters
Type | Name | Description |
---|---|---|
Model | model | A model. |
System.Func<System.String, Model> | generator | A model generator. |
Parameter | parameter | A parameter. |
Parameter | tolerance | A tolerance (value of dev). |
System.String | distributionName | Distribution name. |
RegisterModelInstance(Model)
Registers a model in the registry.
Declaration
public void RegisterModelInstance(Model model)
Parameters
Type | Name | Description |
---|---|---|
Model | model | A model to register. |
RegisterModelLot(Model, Func<String, Model>, Parameter, Parameter, String)
Registers that a model has a lot parameter.
Declaration
public void RegisterModelLot(Model model, Func<string, Model> generator, Parameter parameter, Parameter tolerance, string distributionName)
Parameters
Type | Name | Description |
---|---|---|
Model | model | A model. |
System.Func<System.String, Model> | generator | A model generator. |
Parameter | parameter | A parameter. |
Parameter | tolerance | A tolerance (value of lot). |
System.String | distributionName | Distribution name. |
SetModel(Entity, Simulation, Parameter, String, Action<Model>, IResultService)
Declaration
public void SetModel(Entity entity, Simulation simulation, Parameter modelNameParameter, string exceptionMessage, Action<Model> setModelAction, IResultService result)
Parameters
Type | Name | Description |
---|---|---|
SpiceSharp.Entities.Entity | entity | |
SpiceSharp.Simulations.Simulation | simulation | |
Parameter | modelNameParameter | |
System.String | exceptionMessage | |
System.Action<Model> | setModelAction | |
IResultService | result |