/// <summary> /// Initializes a variable with a workspace, variable name and domain expression. /// </summary> protected VariableModel(WorkspaceModel theModel, ModelName variableName, InlineDomainModel theDomain) : base(variableName) { Workspace = theModel; Parent = theModel.Model; Domain = theDomain; }
/// <summary> /// Initializes a variable with a workspace, variable name and domain expression. /// </summary> protected VariableModel(BundleModel bundle, ModelName variableName, InlineDomainModel theDomain) : base(variableName) { Workspace = bundle.Workspace; Parent = bundle; Domain = theDomain; }
public AggregateVariableModel(BundleModel bundle, ModelName newVariableName, int aggregateSize, InlineDomainModel theDomain) : base(bundle, newVariableName, theDomain) { if (aggregateSize < DefaultSize) { throw new ArgumentOutOfRangeException(nameof(aggregateSize)); } Domain = theDomain; this.variables = new VariableModel[aggregateSize]; for (var i = 0; i < aggregateSize; i++) { this.variables[i] = CreateNewVariableAt(i + 1); } }
/// <summary> /// Initialize a variable with a variable name and domain expression. /// </summary> public SingletonVariableModel(ModelModel theModel, ModelName variableName, InlineDomainModel theDomain) : base(theModel.Workspace, variableName, theDomain) { }
/// <summary> /// Initialize a variable with a variable name and domain expression. /// </summary> public SingletonVariableModel(BundleModel bundle, ModelName variableName, InlineDomainModel theDomain) : base(bundle, variableName, theDomain) { }