# Changeset 2111

Ignore:
Timestamp:
Jan 2, 2010 6:14:54 PM (10 years ago)
Message:

drop scenariostrucutre.py and update the command line options for a few new ones

Location:
coopr.pysp/trunk/doc/pysp
Files:
2 edited

Unmodified
Removed
• ## coopr.pysp/trunk/doc/pysp/pyspbody.tex

 r1957 \item ReferenceModel.py  (A pyomo model file) \item ReferenceModel.dat (data for an arbitrary scenario) \item ScenarioStructure.py (do not edit this file) \item ScenarioStructure.dat (among other things: the scenario names: Sname) \item *Sname.dat   (full data for now) one file for each scenario \subsection{ScenarioStructure.dat} The file ScenarioStructure.py defines the python sets and parameters needed to describe stochastic elements. This file should not be edited. Data to instantiate these sets and parameters is provided by users in the file ScenarioStructure.dat, which can be given in AMPL \cite{ampl} format. This file contains the following data: The file ScenarioStucture.dat contains the following data: \begin{itemize} \end{itemize} Data to instantiate these sets and parameters is provided by users in the file ScenarioStructure.dat, which can be given in AMPL \cite{ampl} format. The default behavior is one file per scenario and each file has the full data for the scenario. An alternative is to specify just the data that changes from the root node in one file per tree node. This will set it up to want a per-node file, something along the lines of what's in \verb|examples/pysp/farmer/NODEDATA|. Advanced users may be interested in seeing the file \verb|coopr/pysp/utils/scenariomodels.py|, which defines the python sets and parameters needed to describe stochastic elements. This file should not be edited. \section{Command Line Arguments \label{cmdargsec}} \item CanSlamToMax: True or False. If True, then slamming can be to the maximum across scenarios for any variable. \item CanSlamToUB: True of False. If True, then slamming can be to the upper bound for any variable. \item DisableCycleDetection: True or False. If True, then cycle detection and the associated slamming are completely disabled. This cannot be changed to False on the fly because a value of True at startup causes creation of the cycle detection storage to be bypassed. \end{itemize} A user defined extension file can be incorporated by using the command line option: \verb|--user-defined-extension=EXTENSIONFILE|. Here, "EXTENSIONFILE" is the module name, which is in either the current directory (most likely) or somewhere on your PYTHONPATH. A simple example is "testphextension" plugin that simply prints a message to the screen for each callback. The file testphextension.py can be found in the sources directory and given in Section~\ref{callbacksec}. An easy test of this would be to specify "-user-defined-extension=testphextension" and you should \verb|--user-defined-extension=EXTENSIONFILE|. Here, "EXTENSIONFILE" is the module name, which is in either the current directory (most likely) or somewhere on your PYTHONPATH. A simple example is "testphextension" plugin that simply prints a message to the screen for each callback. The file testphextension.py can be found in the sources directory and given in Section~\ref{CallbackSec}. An easy test of this would be to specify "-user-defined-extension=testphextension" and you should note the the .py'' file extension is not included on the runph command line. Here are the callbacks: \begin{itemize} \item post\_ph\_initialization: Called after PH data structures have been intialized but before iteration zero solves. \item post\_iteration\_0\_solves: Called after iteration zero solutions and some statistics such as averages have been computed, but before weights are updated. \item post\_iteration\_0: Called after all processing for iteration zero is complete. \item ReferenceModel.py: a single-scenario model for the SP \item ReferenceModel.dat: a single-scenario data file for the SP (any scenario will do - used to flush out variable and constraint index sets) \item ScenarioStructure.py: defines the scenario tree structure for the SP. SHOULD NOT BE MODIFIED. \item ScenarioStructure.dat: data file defining the scenario tree. \item AboveAverageScenario.dat: one of the scenario data files. \begin{itemize} \item phdriver.ph: executes ph. Do not modify this file unless you an algorithm developer and you need to edit a line to speficy a plug-in that you have written. It is presently configured to use the WWPHExtensions.py plug-in the implements the Watson and Woodruff extensions. \item wwph.cfg: replace default algorithm parameter values for the Watson and Woodruff extensions. \item wwph.suffixes: sets algorithm parameter values at the variables level for the Watson and Woodruff extensions. \item ReferenceModel.py: a single-scenario model for the SP \item ReferenceModel.dat: a single-scenario data file for the SP (any scenario will do - used to flush out variable and constraint index sets) \item ScenarioStructure.py: defines the scenario tree structure for the SP. SHOULD NOT BE MODIFIED. \item ScenarioStructure.dat: data file defining the scenario tree. \item Scenario1.dat: one of the scenario data files. \end{itemize} The file phdriver.py executes PH, assuming the ReferenceModel.* and ScenarioStructure.* files are present and correct. This example is probably in a directory with a name something like: \begin{itemize} \item phdriver.ph: executes ph. Do not modify this file unless you an algorithm developer and you need to edit a line to specify a plug-in that you have written. It is presently configured to use the WWPHExtensions.py plug-in the implements the Watson and Woodruff extensions. \item wwph.cfg: replace default algorithm parameter values for the Watson and Woodruff extensions. \item wwph.suffixes: sets algorithm parameter values at the variables level for the Watson and Woodruff extensions. \item ReferenceModel.py: a single-scenario model for the SP \item ReferenceModel.dat: a single-scenario data file for the SP (any scenario will do - used to flush out variable and constraint index sets) \item ScenarioStructure.py: defines the scenario tree structure for the SP. SHOULD NOT BE MODIFIED. \item ScenarioStructure.dat: data file defining the scenario tree. \item Scenario1.dat: one of the scenario data files. \end{itemize} The file phdriver.py executes PH, assuming the ReferenceModel.* and ScenarioStructure.* files are present and correct. This example is probably in a directory with a name something like:
Note: See TracChangeset for help on using the changeset viewer.