protected override BaseOutput NewOutputSpaceTime(string engineVariable, string description, OpenMI.Standard.IOutputExchangeItem output1, Utilities.Standard1.ExchangeItemV1ModelXml v1Model, int elementCount) { var output = new OutputSpaceTimeUserVariables( new Identity(engineVariable, engineVariable, description), this, new Quantity(output1.Quantity, typeof(double), -999.999), ConvertElementSet(output1.ElementSet, v1Model), engineVariable, -999.999, elementCount); //foreach (var kv in v1Model.UserVariables) // output.UserVariables.Add(kv.Key, kv.Value); return output; }
/// <summary> /// Convert a OpenMI 1.4 output exchange item into corresponding OpenMI 2.0 base output. /// </summary> /// <param name="item1">OpenMI version 1.4 output exchange item</param> /// <returns>OpenMI 2.0 base output</returns> protected override IBaseOutput Convert(OpenMI.Standard.IOutputExchangeItem item1) { var engineVariable = string.Format("Output{0}.{1}.{2}", ++_nOutputs, item1.Quantity.ID, item1.ElementSet.ID); var describes = new Describes(engineVariable, string.Format("{0}\r\n\r\n{1}", item1.Quantity.Description, item1.ElementSet.Description)); var v1Xml = V1ModelXmlItem(item1); var elementSet = ConvertElementSet(item1.ElementSet, v1Xml); var output = new OutputSpaceTimeUserVariables( new Identity(engineVariable, describes), this, new Quantity(item1.Quantity, typeof(double), -999.999), elementSet, engineVariable, -999.999, elementSet.ElementCount); if (v1Xml != null) foreach (var kv in v1Xml.UserVariables) output.UserVariables.Add(kv.Key, kv.Value); return output; }