[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Help-glpk] problem with lpx_read_model
From: |
address@hidden |
Subject: |
[Help-glpk] problem with lpx_read_model |
Date: |
Wed, 6 Aug 2008 05:29:25 -0400 |
Dear all,
I am trying the following code in C++:
glp_prob *mip;
mip = glp_create_prob();
lpx_read_model("model.mod", "data.dat", "output.out");
lpx_simplex(mip);
lpx_integer(mip);
lpx_print_prob(mip, "problem.dat");
The program runs without errors and gives:
Reading model section from Mode.mod...
38 lines were read
Reading data section from data.dat...
67 lines were read
Generating cost...
Generating traffic....
(et cetera)
Model has been successfully created
~ 0: objval = 0.000000e+000 infeas = 0.0000000e+000
OPTIMAL SOLUTION FOUND
Integer optimization begins...
(et cetera)
Which should not be the case, for some reason, both the model and data is
not read correctly.
problem.dat gives:
Problem: (unnamed)
Class: LP
Rows: 0
Columns: 0
Non-zeros: 0
*** OBJECTIVE FUNCTION ***
Minimize: (unnamed)
*** ROWS (CONSTRAINTS) ***
*** COLUMNS (VARIABLES) ***
End of output
output.out is completely empty.
Does anyone have any idea?
The reason I want to use C++ is to solve the problem for different
datasets, furthermore I wish to find the total number of nodes in the
branch and bound tree. Do I need to use control parameters and store
information on every branch for that or is there an easier way to get the
total number of examined nodes?
Thanks,
Timo
--------------------------------------------------------------------
myhosting.com - Premium Microsoft® Windows® and Linux web and application
hosting - http://link.myhosting.com/myhosting
- [Help-glpk] problem with lpx_read_model,
address@hidden <=