
An S4 class to represent commodity export to the rest of the world.
Source:R/class-export.R
class-export.RdExport object represent commodity export to the Rest of the World (RoW).
The method replaces slots of the export object with new values.
Details
export is a type of process that adds an "external" source to a commodity
to the model. The Rest of the World (RoW) is not modeled explicitly,
export and import objects define and control the exchange with the RoW.
The operation of the export object is similar to the demand objects,
the two different classes are used to distinguish domestic and external
sources of final consumption.
The export is controlled by the exp data frame, which specifies
bounds and fixed values for the export of the export flow.
The exp.fx column is used to specify fixed values of the export flow,
making the export flow exogenous. The exp.lo and exp.up columns are used
to specify lower and upper bounds of the export flow, making the export flow
endogenous. The price column is used to specify the exogenous price
for the export commodity.
The reserve slot is used to set limits on the total export over the
model horizon.
Slots
namecharacter. Name of the export object, used in sets.
desccharacter. Description of the export object.
commoditycharacter. Name of the exported commodity.
unitcharacter. Unit of the exported commodity.
reservedata.frame. Cumulative limit over the whole model horizon, summed across ALL regions, years and timeslices. A data.frame (rather than the bare number it was before 0.85) so it can carry a
clustercolumn and be split across price steps; without that every step would inherit the FULL limit and the model would quietly holdnstepstimes the resource. A plain number is still accepted by the constructor and read asres.up. There is deliberately noregioncolumn: adding one would turn this into a per-region cap and LOSE the all-region total, which is what it means today.- cluster
character. Price step this row applies to, NA for every step.
- res.lo
numeric. Lower bound on the cumulative volume.
- res.up
numeric. Upper bound on the cumulative volume.
- res.fx
numeric. Fixed cumulative volume. Overrides
res.loandres.up.
clusterdata.frame. Declaration of the object's parallel sub-objects. For export a cluster is a PRICE STEP of a stepped curve: its own share of the quantity, at its own price. A single price cannot express a curve – real resource grades get dearer as they are exhausted, and a real export market pays less as more volume is pushed into it. This slot declares WHAT the steps are; the per-step values live in the
clustercolumn of the other slots. Build both withasExportCurve(), which also computes the prices and checks the direction of the curve. Optional. When empty, step labels are harvested from theclustercolumns of the other slots. When populated it is AUTHORITATIVE. LIMITATION – there is deliberately nocap.share.fxcolumn. A capacity share ties the variants' capacities to fixed proportions, and this class has no capacity variable for the tie to act on. The column is absent rather than present-and-ignored, so the mistake is rejected at construction instead of silently doing nothing. Bound the split withact.share.lo/up/fx, which acts on the quantity this class does have, or fix it directly in the per-step bounds. The share columns are different levers, not substitutes.cap.share.fxfixes the ratio of the variants' CAPACITIES in every year: loss tranches need it, because each tranche efficiency is calibrated to its place in the capacity stack and the flow must stay free to fill the cheapest first.act.share.lo/up/fxbounds a variant share of the family THROUGHPUT instead, which is what stops a clustered family collapsing to its cheapest member once regional borders are aggregated away. Both are optional; a variant with neither sizes and runs freely.- cluster
character. Step label, used in the expanded object name.
- desc
character. Description of the step.
- share
numeric. The step's fraction of the object's quantity. DESCRIPTIVE, not enforced: unlike
technologyortradethis class has no capacity variable to tie, soasExportCurve()writes the split straight into the quantity bounds and records here what it did.- order
integer. Fill order, 1 = the cheapest step (or, for export, the best paid). Without it labels sort alphabetically and "S10" would precede "S2".
exportdata.frame. Export parameters.
- cluster
character. Price step this row applies to, NA for every step. See the
clusterslot.- region
character. Region name to apply the parameter; use NA to apply to all regions.
- year
integer. Year to apply the parameter; use NA to apply to all years.
- timeslice
character. Time timeslice to apply the parameter; use NA to apply to all timeslices.
- exp.lo
numeric. Export lower bound.
- exp.up
numeric. Export upper bound.
- exp.fx
numeric. Fixed export volume, ignored if NA. This parameter overrides
exp.loandexp.up.- price
numeric. Price received per unit exported. Export revenue is a NEGATIVE cost – the minus sits inside
eqExportRowCost– so a higher price is a better outcome for the objective.
regioncharacter. Regions where the export process exists. Empty (or NA) means every region of the model. A region named in any other slot must be one of these; the other slots place VALUES and never change where the process exists.
misclist. Additional information.