User Tools

Site Tools


Using Savepoints for Data Collection - an Example

$title data collection for scenarios
$eolcom //

variable obj, x; equation objdef; objdef.. obj =e= x;
model m / objdef /;

m.solvelink=2;  // will spawn optimizer
m.savepoint=2;  // will write solution to gdx file
set s / m_p1*m_p5 /;
parameter xsol(s);
scalar i;
*for(i=1 to 5,
*   x.fx = i;
   x.fx = ord(s);
   solve m us lp min obj;
   m.limrow=0; m.limcol=0; m.solprint=2 );

execute 'gdxmerge m_p*.gdx';
execute_load 'merged.gdx' xsol=x.l;
display xsol;
IMPRESSUM / LEGAL NOTICEPRIVACY POLICY interfaces/using_savepoints_for_data_collection_-_an_example.txt · Last modified: 2007/08/10 10:20 (external edit)