[Coin-SMI] smps to mps

Matthew Galati Matthew.Galati at sas.com
Thu Feb 2 11:18:23 EST 2006


Hi,

I know there is a method for translating SMPS to MPS (deterministic equivalent). I was wondering if anyone had already done this for some benchmark instances. For example, from: 
http://www2.isye.gatech.edu/~sahmed/siplib/ ? 

I tried one example from SIPLIB, I first had to change the names to .core, .stoch, .time. But, it failed:


#include "SmiScnModel.hpp"
#include "OsiClpSolverInterface.hpp"

int main(int argc, char ** argv){
  SmiScnModel smi;

  const char * base = argv[1];

  // read SMPS model from files
  //	<name>.core, <name>.time, and <name>.stoch
  smi.readSmps(base);		

  // generate OSI solver object
  // 	here we use OsiClp
  OsiClpSolverInterface *clp = new OsiClpSolverInterface();
  
  // set solver object for SmiScnModel
  smi.setOsiSolverHandle(*clp);	
  
  // load solver data
  // 	this step generates the deterministic equivalent 
  //	and returns an OsiSolver object 
  OsiSolverInterface *osiStoch = smi.loadOsiSolverData();
  
  // set some nice Hints to the OSI solver
  osiStoch->writeMps(base);
  return 0;
}	



magala at ordsrv3 /cygdrive/d/ormpdata/milp/siplib
$ gdb ./coin_smps2mps
GNU gdb 6.3.50_2004-12-28-cvs (cygwin-special)
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "i686-pc-cygwin"...
(gdb) set args sslp_15_45_15
(gdb) r
Starting program: /cygdrive/d/ormpdata/milp/siplib/coin_smps2mps.exe sslp_15_45_
15
Coin0001I At line 1 NAME           SSLP_15_45_15
Coin0001I At line 2 ROWS
Coin0001I At line 65 COLUMNS
Coin0001I At line 1447 RHS
Coin0001I At line 1471 BOUNDS
Coin0001I At line 2162 ENDATA
Coin0002I Problem SSLP_15_45_15 has 61 rows, 705 columns and 1379 elements
Coin0001I At line 1 TIME   SSLP_15_45_15
Coin0001I At line 2 PERIODS      LP
Coin0001I At line 5 ENDATA
Coin0001I At line 1 STOCH SSLP_15_45_15
Coin0001I At line 2 SCENARIOS   DISCRETE
Coin0001I At line 693 ENDATA

Program received signal SIGSEGV, Segmentation fault.
0x00406bac in SmiNodeData::combineWithCoreDoubleArray ()
(gdb) where
#0  0x00406bac in SmiNodeData::combineWithCoreDoubleArray ()
#1  0x00406d94 in SmiNodeData::copyColLower ()
#2  0x00401621 in SmiScnModel::addNode ()
#3  0x005a9cca in std::for_each<__gnu_cxx::__normal_iterator<SmiScnNode**, std::
vector<SmiScnNode*, std::allocator<SmiScnNode*> > >, SmiScnModelAddNode> ()
    at /usr/lib/gcc/i686-pc-cygwin/3.4.4/include/c++/iostream:77
#4  0x004019ca in SmiScnModel::loadOsiSolverData ()
#5  0x004012ed in main ()
(gdb)


Matthew Galati - Optimization Developer
SAS Institute - Analytical Solutions
Phone 919-531-0332, R5327 
Fax   919-677-4444
http://coral.ie.lehigh.edu/~magh
http://ordlnx2.na.sas.com/projects/OptWiki
http://www.sas.com/technologies/analytics/optimization/






More information about the Coin-SMI mailing list