changed tariff class to accept any charge rule, resolving issue #9
This update changes the tariff structure entirely so that tariffs are now much more versatile and can apply any charging rule (such as volumetric), in addition to capacity bandwidth tariffs. This is implemented by adding a time_charge_fct as an attribute on the tariff. The time charge function computes the charge of the tariff at any given (time, load) pair from a time series. In addition to time and load, the time charge function requires a set of parameters, based on the type of tariff that is implemented. E.g., a capacity subscription tariff requires the capacity bandwidth, the fixed charge and the penalty for exceeding the bandwidth. A volumetric, time-differentiated tariff requires a list of times and corresponding charges. This set of parameters is implemented as a dictionary, which is also saved as a tariff attribute and used in the time charge function. I think another way to implement different tariffs could have been to make a tariff superclass that can be subclassed by different tariffs (like volumetric or capacity subscription). The main reason that I chose not to do this, is that there may be hybrid tariffs, which implement partly volumetric and partly capacity-based charges (this is currently the tariff in Flandern). I think these will be easier to implement with the rule-based method.
The changes also make some progress towards issue #14 (closed), by removing the hard-coded 12 (for 12 months) in some places. The compute_total_tariff_charge function now always computes the total charge over the duration of the supplied load time series, not over the duration of one year anymore. This was implemented by dividing the value of the fixed charge of the tariff (192, 252 and 480 Euro in the current tariffs) by the total number of time steps and converting all fixed charge computation to a single time step basis. This means every time step is now treated as contributing the same fixed amount (in addition to possible extra charges, in case the capacity bandwidth is exceeded.)