Stupid is what stupid does: I forgot to limit the release parameter and there were some problems with the index (e.g. initial fill level assigned too late etc.). Therefore the problem was unbounded The objective should look like this (see last line): # objective: Maximize profit maximize obj: sum{i in...

c++,visual-studio-2010,armadillo,glpk,openblas

libopenblas.dll was the cause of the problem - for some reason linking in VS2010 caused errors. I am not sure why, but linking against the lapack libraries in the Armadillo distribution (pre v4) fixed the issue.

You need to change this constraint: # Terminal vertexes constraints s.t. Pconstraint{i in P: i != 1}: sum{(i,j) in E} x[i,j] - sum{(k,i) in E} x[k,i] = -1; That's because the first node is where flows from in this flow based formulation....

Yes, you can set a custom basis by using glp_set_col_stat(). You will have to set each column to be Basic (GLP_BS) or Non-basic (GLP_NL). You could also use the API glp_adv_basis method, though I don't think it lets you customize the basis. I recommend the very readable Section 2.6 in...

matlab,octave,linear-programming,glpk

I could sort out my problem. It is happening because of some of the variables are having value 0.000000000000000027773 or 0.99999999999999999. So if I do some pre-processing like making those 0.000000000000027773 values 0 or 0.99999999999999999 1 then GLPK gives feasible solution

Glpk uses GNU MathProg, a subset of AMPL, so given the following parameter and set declarations: set N := 1..2; param cx{i in N}; param cy{i in N}; you can read the data as follows data; param: cx cy := 1 1 2 2 3 4; Note that in this...

Versions of the solver built with different compilers can take different paths during the optimization process which can result in the behavior you observe. Things that can affect this are: differences in floating-point semantics (possibly caused by -ffast-math), different implementations of sort (qsort is normally not a stable sort) -...

gnu,linear-programming,linear,ampl,glpk

You can do it as follows: s.t. rest: x['Persones'] >= 7; ...

matlab,octave,linear-programming,glpk

If you look at the octave help you will find this lpsolver (default: 1) Select which solver to use. If the problem is a MIP problem this flag will be ignored. 1 Revised simplex method. 2 Interior point method. So really in only differs on terms of efficiency in certain...

sum,constraints,ampl,glpk,mathprog

This is just a syntax problem. The constraint should look like the following: s.t. c1: sum{i in I, j in I}(Y[i,j]) = 6; The first brackets after the name of your constraints imply that the constraint is applied to every single [I, I]. What you want is to fix the...