Exporting external data
Describes how to export externally-initialized data.
The IDE also enables you to export
external data in a model to an output file (a .dat
file
in most cases). All data elements in a .mod
file
declared by means of the ellipsis syntax
= ...;
are external. For example, Products
, Components
, Demand
, Profit
, and Stock
are
external data in the following sample (gas.mod
).
{string} Products = ...;
{string} Components = ...;
float Demand[Products][Components] = ...;
float Profit[Products] = ...;
float Stock[Components] = ...;
Since these data elements are resolved from data sources
(such as databases, spreadsheets) when the OPL model is instantiated,
exporting external data amounts to dumping the data from such data
sources to a local .dat
file.
To export external data: