[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Help-glpk] Loading model files
From: |
Manish Jain |
Subject: |
[Help-glpk] Loading model files |
Date: |
Tue, 16 Feb 2010 17:58:01 -0800 |
Hi all,I have my source code written in AMPL for Cplex, and I am currently porting it GLPK.
The models don't work as is, since the original source code has some AMPL/CPlex specific commands.
Besides, I am more comfortable writing scripts in C++ than with scripting in AMPL; however, I find that writing models in AMPL is easier.
I have been able to convert most of my models to GLPK my adding rows, columns and generating the model row by row, column by column.
I also saw in the manual that there is a function to load models and data files, however, I want to generate data on the fly i.e. I just want to load a model, and then
generate data segments in the code. The requirement is such because I have a custom Branch and Price routine, and have two independent models for the 'master'
and the 'slave'.
Example model:
param n;
set N := {1..n};
.
.
.
var x {N} >= 0;
.
.
.
maximize objective: ...
subject to:
.
.
.
What is the preferred way to do this, since I wasn't able to set the values of the parameters from the C++ code :|
Manish Jain
University of Southern California
- [Help-glpk] Loading model files,
Manish Jain <=