/* MOD_V2.0
* Copyright (c) 2012 OpenDA Association
* All rights reserved.
*
* This file is part of OpenDA.
*
* OpenDA is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as
* published by the Free Software Foundation, either version 3 of
* the License, or (at your option) any later version.
*
* OpenDA is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with OpenDA. If not, see .
*/
using System;
namespace OpenDA.DotNet.Interfaces
{
public interface IExchangeItem
{
///
/// The identifier for the exchangeItem (must be unique within the context of a model instance).
///
string Id { get; }
///
/// Optional additional description for the exchange item.
///
string Description { get; }
///
/// Ask which object type will be returned by the Value property.
///
Type ValueType { get; }
///
/// The role of the exchange item (input, output, or both)
///
Role Role { get; }
///
/// Get/set the values of the exchange item, returning/providing the type as defined in the
/// ValueType property.
///
Object Values { get; set; }
///
/// Get/set the values of the exchange item as an array of doubles.
///
double[] ValuesAsDoubles { get; set; }
///
/// Perform a values += alpha * axpyValues operation on each value in the exchange item.
///
/// The alpha in values += alpha * vector.
/// The values for the Axpy-operation on all values in the exchange item.
void AxpyOnValues(double alpha, double[] axpyValues);
///
/// Multiply each value in the exchange item's value with the related multiplication factor.
///
/// The multiplication factors for all exchange time values.
void MultiplyValues(double[] multiplicationFactors);
///
// Get/Set the times for the exchangeItem as Modified Julian Days
// Setting the times property is only allowed if Times != null
// and if the exchangeItem has role Input or InOut
///
double[] Times { get; set; }
}
}