Changes Report

Release History

Version Date Description
3.00.08 2019-01-17 javadoc
3.00.07 2018-08-11 setDisplayUnit method added to all value types
3.00.06 2018-08-10 hashCode and equals for MoneyUnit changed
3.00.05 2018-08-10 hashCodes for Units changed
3.00.04 2018-08-09 get(r,c) added to Matrix interface
3.00.03 2018-01-28 toArray() function added to Vector and FloatVector
3.00.02 2018-01-28 Iterator added to Vector and FloatVector
3.00.01 2017-04-29 Several absolute base units added
3.00.00 2017-04-27 Absolute units separate from relative units
2.02.00 2017-04-17 Units added to create consistency
2.01.03 2017-01-30 createSI() method added to scalars; scalar constants added
2.01.02 2017-01-24 Small changes to AbstractDoubleScalar and AbstractFloatScalar
2.01.01 2016-11-14 neg() function added; cleaned up code
2.01.00 2016-11-01 Increased speed of instantiation
2.00.00 2016-10-16 Major upgrade of type hierarchy
1.03.01 2016-05-28 Min and max functions added for scalars
1.03.00 2016-04-23 Abs and Rel for detailed versions removed
1.02.06 2015-12-23 Dependency on reflections package removed
1.02.05 2015-12-22 ZERO constants for scalars

Release 3.00.08 – 2019-01-17

Type Changes By
Add The ParamComments utility class has been added to the djunits-generator project. It adds or updates the type for each parameter in the javadoc of all java files in /src/main/java in all or in selected projects in the workspace. averbraeck
Update Copyright message changed to 2019. averbraeck

Release 3.00.07 – 2018-08-11

Type Changes By
Add All scalars, vectors and matrices now have a setDisplayUnit method. The unit is just for display purposes; it used to be final, although the value is stored in the SI or standard unit. When a value was instantiated using an SI value, but the display unit had to be different, methods like:
   FloatDensity fd = new FloatDensity(FloatDensity.createSI(si).getInUnit(unit), unit);
had to be used. Now this can easily been done as follows:
   FloatDensity fd =(FloatDensity.createSI(si);
Add For Scalar, FloatScalar, Vector, FloatVector, Matrix, and FloatMatrix, a generic instantiate method is added to a utility class (e.g., DoubleScalarUtil), which instantiates values based on the unit type it is provided with. So you can use:
  Acceleration = DoubleScalarUtil.instantiate(12960.0, AccelerationUnit.KM_PER_HOUR_2);
but also with a more 'anonymous' unit:
  Unit unitUSDm2 = new MoneyPerAreaUnit(MoneyUnit.USD, AreaUnit.SQUARE_METER, "USD/m2", "$/m2");
  MoneyPerArea moneyPerArea = DoubleScalarUtil.instantiateAnonymous(10.0, unitUSDm2);
This can be especially useful in data driven simulations where various types of data can be sent through messages, and where the message contains the unit as well.

Release 3.00.06 – 2018-08-10

Type Changes By
Update hashCode and equal for the MoneyUnit added. equalsIgnoreNaming(...) works on the basis of the numeric code of the currency. averbraeck

Release 3.00.05 – 2018-08-10

Type Changes By
Update hashCode and equal for the units worked only on the basis of abbreviations and names. For LinearUnit and AbsoluteLinearUnit, the scale has been added to hashCode and equals. averbraeck
Add for equals() a unit with Dutch names is different from the same unit with English names. Now, the units that have the same 'scale factor' and/or offset, have the same equalsIgnoreNaming(). This means, for instance, that although a METRIC_TON and a MEGAGRAM are different MassUnits, equalsIgnoreNaming() will now state that they are the same, as each represents 1000 kg. This also means that hand-made units that correspond numerically to an existing unit, will be considered equal according to equalsIgnoreNaming (but not to the equals method). averbraeck

Release 3.00.04 – 2018-08-09

Type Changes By
Add Matrix and FloatMatrix interface now have the get(r, c) function that was already implemented. averbraeck

Release 3.00.03 – 2018-01-28

Type Changes By
Add Typed Scalar[] toArray() function added for all vectors. averbraeck
Add VectorToArrayExample added to djunits-demo. averbraeck

Release 3.00.02 – 2018-01-28

Type Changes By
Add Iterator added to Vector and FloatVector, so statements like "for (Speed s : speedVector)" are possible. averbraeck
Fix Bug for instantiateMD() and instantiate() on the basis of a sparse Map in FloatVector solved:
  IntStream.range(0, values.size()).parallel().forEach(index -> valuesSI[index] 
    = values.get(indices[index]).getSI());
instead of
  values.keySet().parallelStream().forEach(index -> valuesSI[index] 
    = values.get(index).getSI());
Add VectorIteratorExample added to djunits-demo. averbraeck
Update Copyright statement extended to 2018. averbraeck

Release 3.00.01 – 2017-04-29

Type Changes By
Add For DirectionUnit, EAST_RADIAN and EAST_DEGREE have been added. averbraeck
Add For TimeUnit, several BASE units with e.g., SECOND, MINUTE, HOUR, DAY, WEEK have been added. averbraeck
Update In the TimeUnit, Time, and FloatTime classes a warning has been placed that indicates that precision is limited. For floatTime it states: Note that when the offset of a stored absolute Time becomes large, precision of a float might not be enough for the required resolution of a Time. A float has around 7 significant digits (23 bit mantissa). This means that when we need to have a float time that is precise to microseconds, the Time value should not go above 2^22 = 4.0E6. This is not enough to store Epoch values that are in the order of magnitude of 2E12 ms! So feeding System.TimeInMillis() to a FloatTime with TimeUnit.BASE as its unit is not having the required precision. At best, a FloatTime can store TimeUnit.BASE or TimeUnit.EPOCH values with real calendar values with a precision of several minutes. averbraeck
Add The GenerateUNITs has a replacement option that can insert the above precision warnings in the automatically generated Time and FloatTime (and other) classes. averbraeck

Release 3.00.00 – 2017-04-27

Type Changes By
Add Abolute units and relative units have been separated. They are truly different. In DJUNITS version 2, absolute and separate variables use the same unit. E.g., a Time and a Duration both use a TimeUnit. In classes that have to enforce that all components are of unit TimeUnit, Duration as well as Time can be used. This is not desirable. Therefore we need to split the TimeUnit, AngleUnit, LengthUnit and TemperatureUnit into an absolute and a relative version. averbraeck
Update has been made consistent with the absolute/relative unit changes. averbraeck
Update Unit tests have been made consistent with the absolute/relative unit changes. averbraeck
Update Documentation has been made consistent with the absolute/relative unit changes. averbraeck
Update OffsetLinearScale now extends LinearScale. averbraeck
Update MoneyPerTimeUnit renamed to MoneyPerDurationUnit; same for all other types refering to MoneyPerTime. averbraeck
Update Removed the methods to multiply and divide absolute values with absolute values. How can I multiply a position on this planet with another position on the planet? Or a time with another time? Just doesn't make sense, so removed the methods and the corresponding tests. averbraeck
Update the toAbs() and toRel() methods are removed. I don't understand how to translate 1-4-2017 at 12:00 to a relative value. The only thing that makes sense is to subtract a value (some kind of offset) from the absolute value to get a relative value. averbraeck

Release 2.02.00 – 2017-04-17

Type Changes By
Add For many Unit classes, standard units have been added to make the unit list more internally consistent. averbraeck
Update has been made consistent with the added units. averbraeck
Add The content can be generate with the GenerateStaticUNITS program in djunits-generator. averbraeck

Release 2.01.03 – 2017-01-30

Type Changes By
Update Scalars with the exception of Money scalars can now be created with e.g., Length len = Length.createSI(5.0). OTS-297. averbraeck
Update Constants NaN, POSITIVI_INFINITY, NEGATIVE_INFINITY, POS_MAXVALUE and NEG_MAXVALUE have been added to scalars, with the exception of Money scalars. OTS-298. averbraeck

Release 2.01.02 – 2017-01-24

Type Changes By
Update hashCode of Units are cached, as these are calculated in every compare of scalars. OTS-289. averbraeck
Update AbstractDoubleScalar.compareTo and AbstractFloatScalar.compareTo should use static compare method. OTS-290. averbraeck
Add Add eq0, ne0, gt0, lt0, ge0, and le0 methods to DoubleScalars and FloatScalars. OTS-293. averbraeck

Release 2.01.01 – 2016-11-14

Type Changes By
Add A neg() function has been added to the Scalar, MutableVector and MutableMatrix classes. The neg functions changes the value(s) to minus the value(s). OTS-216. averbraeck
Update Code has been cleaned for @Override and open warnings for formatting of comments. averbraeck

Release 2.01.00 – 2016-11-01

Type Changes By
Update Several changes have been made to increase the speed of instantiation of scalars. Especially the need to use espessAsUnit(...) when the unit is the SI-unit has been decreased. This leads to a major speed improvement of the use of scalars. averbraeck
Update A start has been made to increase the speed of instantiation of vectors. Further speed improvements will be made in the next version. averbraeck
Add The Unit has a new method 'boolean isBaseSIUnit()' to help determine the need for conversion of a value into a standard (usually SI) unit. averbraeck
Add The Scale has a new method 'boolean isBaseSIScale()' to help determine the need for conversion of a value into a standard (usually SI) unit. averbraeck

Release 2.00.00 – 2016-10-16

Type Changes By
Update A major upgrade has been made to the type hierarchy. Instead of the TypedXXX template functions, abstract classes and interfaces have been introduced that are more natural to implement and have faster execution than the typed templates. averbraeck
Update The DoubleScalar, DoubleVector, DoubleMatrix classes are not at the root of the typed classes anymore. Rather, they are an implementation of the Abstract classes, next to the typed classes in the type hierarchy. So a Length does not extend a DoubleScalar.Rel anymore. Rather, Length and DoubleScalar.Rel both extend AbstractDoubleScalarRel. Same for the Float classes. averbraeck

Release 1.03.01 – 2016-05-28

Type Changes By
Add min and max functions have been added for scalars, for combinations of abs, rel, dimensionless, money, and float. averbraeck
Update Copyright notice has been extended to 2016. averbraeck

Release 1.03.00 – 2016-04-23

Type Changes By
Update The following changes have been made: Time.Abs, Time.Rel --) Time, Duration (TimeUnit) Length.Abs, Length.Rel --) Position, Length (LengthUnit) Temperature.Abs, Temperature.Rel --) AbsoluteTemperature, Temperature (TemperatureUnit) Angle.Abs, Angle.Rel --) Direction, Angle (AngleUnit) averbraeck

Release 1.02.06 – 2015-12-23

Type Changes By
Update DJUNITS is no longer dependent on 'reflections'. Instead, the 'Unit' class now defines an array of standard units that exist in the package. This list is also used in the unit tests (it is public static final). averbraeck

Release 1.02.05 – 2015-12-22

Type Changes By
Add Added ZERO constants for double and float scalars, with the exception of Money scalars. averbraeck