PROVIDE
From ASCEND
The PROVIDE statement is used to tell ASCEND that a particular model file (or 'module') can act, to some extent equivalently, in place of another module.
The best example of this in the ASCEND system is the pair of files system.a4l and ivpsystem.a4l. These are quite low-level files in ASCEND. The first sets up the basic structure of a solver_var in such a way that it can be used in regular steady-state modelling work. The latter sets up a slightly different basic structure, in such a way that there are some extra properties attached to variables so that they can be used in solving initial value problems (IVP), or in other words, solving dynamic problems. You only ever want one or other of these files to be used, never both, because they would cause clashes.
Another case where you might use a PROVIDE statement would be where you have a number of different, but substitutable, sub-models that you want to use in your flowsheet. Perhaps you have a detailed pump model as well as a rather simpler pump model. Then, in your flowsheet file, you might have something like this at the start:
(* REQUIRE "pump-model.a4c"; *) REQUIRE "complex-pump-model.a4c"; (* we're upgraded our simple model with a more complex one now, but we can switch back to the other one by just changing these couple of lines. *)
At the top of your complex-pump-model.a4c file, you would have the code:
PROVIDE "pump-model.a4c"; MODEL pump_model; (* declare a more complicated kind of pump_model here now... *) END pump_model;
and your simpler file pump-model.a4c would just contain:
MODEL pump_model; (* the simpler model of a pump *) END pump_model;
Then, if it should happen that any other files in your flowsheet happen to contain the code to REQUIRE "pump-model.a4c", that file will not be loaded, because ASCEND will see that it has already loaded a file that provides equivalent functionality.
See also REQUIRE.

