Namespace: ILOG.CP
Assembly: ILOG.CP (in ILOG.CP.dll)
Syntax
| C# |
|---|
public virtual void ExportModel( string filename ) |
| Visual Basic |
|---|
Public Overridable Sub ExportModel ( _ filename As String _ ) |
Parameters
- filename
- Type: System..::..String
Remarks
This method exports the currently loaded model into the file named filename. This file name must have extension .cpo. The purpose of this method is to create human readable file, not to capture internal state of CP Optimizer. Please use the function DumpModel(String) if you want to send the model to IBM support.
If ExportModel is called during the search then the export contains the current domains of all variables (instead of initial domains) and the current objective cuts. Constraints that were added during the search (such as no-goods or constraints added during LNS moves) are not included in the export.
This method differs from function DumpModel(String) in several aspects:
- Produced file contains only the model, not additional internal data.
- The names of variables and constraints will be contained inside the file, regardless the value of the parameter CP.IntParam.ModelAnonymizer.
- An exported model is easier to read by a human in comparison to a dumped model.
- Both models can be imported back into CP Optimizer using the function ImportModel(String). However only the model dump guarantees that the behavior of CP Optimizer will be the same as on the original model.