Friday April 19, 2024, 6:11 am
Email
IT 
EN 

  packVol Integrable Application provides a load optimizer module that can be integrated into third-party software. The application is available as unmanaged C++ dll for Microsoft Windows operating systems, or as command line program. Data exchange in implemented via ODBC exchange tables or via XML input/output files.

packVol Integrable Application is not available for public download. Please contact us to get a free trial demo of the software.

REQUIREMENTS

packVol Integrable Application can be used on Windows XP SP3 or later Microsoft operating systems and comes for both 32 bit (x86) and 64 bit (x64) architecture. The application does not depend on any external library. For ODBC data exchange you must create and set up a data source to an external database.

INTERFACE

The dll version of the application is callable from any programming language with support for dynamic loading of external libraries (e.g. C, C++, C#, VB, Delphi). The interface exposes a few methods for connection, execution, logging and data exchange, as detailed below.

METHODS

SolvClass* Expose(HWND hWnd = NULL)
creates an instance of the application. Parameters: the handle [hWnd] of the caller. Currently the parameter is not used. Returns a pointer to the application class.

void Dispose(SolvClass* pvsolv)
releases the memory and resources allocated by the application. Parameters: [pvsolv] pointer to the application class. Because the application is unmanaged, the caller is responsible for deallocation of memory.

bool Connect(SolvClass* pvsolv, const wchar_t* dsnname, const wchar_t* dsnuser, const wchar_t* dsnpass)
establishes a connection to the ODBC data source. Parameters: [pvsolv] pointer to the application class, the name [dsnname] of the data source, username [dsnuser] and password [dsnpass] for authentication to the data source. Returns true if the connection is successfully established, false if it fails.

void Disconnect(SolvClass* pvsolv)
closes the ODBC connection. Parameters: [pvsolv] pointer to the application class.

int ExecuteODBC(SolvClass* pvsolv, int jobID, int* pcont)
performs the optimization of the load list acquired via ODBC and writes back the results. Parameters: [pvsolv] pointer to the application class, the identifier [jobID] of the load list, a pointer [pcont] to an integer to control execution.

int Execute_XML(SolvClass* pvsolv, const wchar_t* xml_filename, int* pcont)
performs the optimization of the load list acquired via xml file and writes the results on file. Parameters: [pvsolv] pointer to the application class, the xml filename [xml_filename] of the load list (see documentation on the xml file format), a pointer [pcont] to an integer to control execution.

The variable [pcont] provides an easy way to check running of the solver in multithreaded applications. Execution is continued throughout the time interval as defined in input as long as the value of the variable pointed to by [pcont] is not zero. If it is zero, the execution is interrupted.

// global or member variable
int cont = 0;

OnExecute() // start execution
{// method called from or
 // assigned to a worker thread
   cont = 1;
   ExecuteXXXX(pvsolv, jobID, &cont);
}

OnStop() // stop execution
{
  cont = 0;
}

int SetWorkDir(SolvClass* pvsolv, const wchar_t* dirname)
sets the working directory in which the application can read/write files. Parameters: [pvsolv] pointer to the application class, the path [dirname] of the working directory.

void UseLogging(SolvClass* pvsolv, bool uselog, bool appendlog)
sets logging of operations. Parameters: [pvsolv] pointer to the application class, flag [uselog] to set logging, a flag [appendlog] to handle writing.

int SetLogFilename(SolvClass* pvsolv, const wchar_t* filename)
assigns a name to the log file. Parameters: [pvsolv] pointer to the application class, the name of the filename [filename].

int SetNamedBasename(SolvClass* pvsolv, const wchar_t* basename)
assigns a name to the output file. Parameters: [pvsolv] pointer to the application class, the name of the filename [filename].

int SetAutoBasename(SolvClass* pvsolv, int flag)
assigns an automatic name to the output file. Parameters: [pvsolv] pointer to the application class, a flag [flag] to define the fields forming the automatic name.

 

Sitemap

© 2006-2024
Dr. Antimo Angelucci, PhD
Via Giulia n. 1
I-30026 Portogruaro (VE) - Italy
P.IVA IT03756330274

Privacy | Contact us
close  ❌ 

email

web form