From: Bjørnar Ness
Sent: Wednesday, March 20, 2024 10:26 AM
To: Meketon, Marc
Cc: Dušan Plavák ; help-glpk@gnu.org
Subject: Re: diet problem disregarding cost
CAUTION: This email originated outside the company. Do not click links or open
attachments unless you are expecting them from the sender
In general, if you have variables rpos_i and rneg_i (the ith constraint), and
you have:
[linear equation i] = rpos_i – rneg_i
Then (rpos_i + rneg_i) is the absolute value
If you then have
rpos_i + rneg_i <= z
z would be the maximum absolute value, and then you just minimize z.
From: help-glp
If you are trying to install GLPK on windows, and you only need the binaries,
do a search for "winglpk" and use that site to download the binaries. I
believe the link is https://winglpk.sourceforge.net
-Original Message-
From: help-glpk-bounces+marc.meketon=oliverwyman@gnu.org
On
Two comments:
1. GLPK is a linear solver. If x and y are variables, then (x^i)(y^j) is
a non-linear term in the unknowns x and y.
2. It is not clear from your description what is i and j.
-Marc
From: Help-glpk On Behalf Of Andrew Makhorin
Sent: Tuesday, November 1, 2022 6:04 AM
To
Hello Mingyue,
Typically when I see that many coefficients, it suggests that you need to
reformulate your problem.
One example. Suppose that X1, X2, X3, …, X20 are non-negative integers, and
you have equations like X1 <= b1, X1 + X2 <= b2, X1 + X2 + X3 <= b3, …, X1 + X2
+ X3 + … + X20 <= b20.
First check out:
https://spokutta.wordpress.com/the-gnu-linear-programming-kit-glpk/
and search the document for ‘excel’. Notice in their example that have a DSN.
You would need to setup an DSN that connects to Excel. If you go into
Start/Windows Administrative Tools/ODBC data sources (64 bit)
There are other fast solvers. Two open source instances are CBC and SCIP. And
there are faster commercial solvers (Gurobi, Xpress, Ilog/Cplex). And more.
However, if you want to get a 5-10 times speedup, is it because you intend to
solve many of these types of problems? If so, consider:
- U
My guess: You have a numerically unstable constraint.
If x=20, y=10 and x - y + 100 * z = 100, then z = 0.9. This is
most likely 'close enough' for the solver to believe z is 1.0.
I'm not aware of any parameter using glpsol.exe to set a tolerance. Also,
using '--exact' math als
Hi Manuel,
You should sign into the help-glpk group for these types of problems.
I was able to reconstruct and fix your immediate answer.
You had something like:
param FlexibleLoadEfficiency := 1.0;
var FlexibleLoadIncrease{1..(48*365)} >= 0;
var FlexibleLoadDecrease{1..(48*365)} >= 0;
subjec
On a more serious note...
I don’t think local set/param declaration is that useful. In the example
given, you could create a one-dimensional array of sets and params that does
the same thing.
-Marc
-Original Message-
From: Help-glpk On
Behalf Of Andrew Makhorin
Sent: Tuesday, August
additional maintanece as the
languages and extensive libraries evolve. With GMPL one doesn’t have to worry
about that.
On Aug 24, 2020, at 12:17 PM, Andrew Makhorin
mailto:m...@gnu.org>> wrote:
On Mon, 2020-08-24 at 14:00 +, Meketon, Marc wrote:
I've always felt that GMPL needed i
August 24, 2020 10:34 AM
To: Meketon, Marc ; Andrew Makhorin
; help-glpk@gnu.org
Subject: Re: Adding if/then/else statement to GMPL
Hello Meketon !
Could you share your view of how it would be expressed (an ideal model
sample) ?
If you want to talk about it, maybe I'll be interested in impl
I've always felt that GMPL needed if-then-else, for-loops, 'let' statements and
the ability to re-solve to be a true modeling language. And Andrew has always
disagreed.
Many of the models that I create ultimately are 'iterative' where I need to
take the results of one model and use it to setup
I just tried this on PyCharm (also made by IntelliJ).
Seems to be missing some keywords. The obvious ones are:
- display
- maximize
- minimize
- solve
- subject to
- table
Gusek - which is my 'go to' editor for GMPL has the following keywords:
abs and atan binary by card ceil check cos cross cr
(symbolic) parameter.
-Original Message-
From: Mate Hegyhati
Sent: Thursday, December 12, 2019 12:35 PM
To: Meketon, Marc ; help-glpk@gnu.org
Subject: Re: next question - find some element of a set
Hi!
Thanks for the clarification. If I understand correctly, and ANY proper cost
value is ok
Here is more clarification. I have a set S and an array cost[]. I wanted
to get a cost -- any cost -- that is found in the array cost. I didn't want
to have to specify in the data section a sample element of S, I just wanted to
use GMPL to find one. In the example below, I want to find
I want to get some arbitrary element in a set and put it into a parameter. How
would I complete the below?
set := A, B, C;
param some_element_in_set, symbolic := ?;
The closest I saw was in this old help-glpk email:
https://lists.gnu.org/archive/html/help-glpk/2006-11/msg00059.html
Whi
Has anyone been able to run the sudoku_excel.mod found on the examples\sql
directory under windows 10 64bit?
Sent from my mobile
> On Dec 9, 2019, at 11:13 AM, Meketon, Marc via Users list for GLPK (GNU
> Linear Programming Kit) wrote:
>
> Forgot to CC the mailing list.
>
Forgot to CC the mailing list.
-Original Message-
From: Meketon, Marc
Sent: Monday, December 9, 2019 11:04 AM
To: Heinrich Schuchardt
Subject: RE: Issue with reading from Excel
Thank you for your quick reply.
I'm running on Windows 10, 64bit. The message did not seem like it
Hello GLPK’ers
I’m trying to use GMPL to read from Excel. Below is essentially from the
Sudok_excel.mod example found in the distribution, but where I updated it with
a later driver:
set fields dimen 2;
param givens{1..9, 1..9}, integer, >= 0, <= 9, default 0;
/* the "givens" */
table ti IN '
I don’t recall receiving any emails for a few months. I sent out a request
back in early June
(https://lists.gnu.org/archive/html/help-glpk/2019-06/msg0.html) that did
not generate any response, and prior to that there was some traffic in April,
but nothing in May or June or July (so far).
Is there a way (or a driver) to load structured JSON data into GMPL?
-Marc
___
Help-glpk mailing list
Help-glpk@gnu.org
https://lists.gnu.org/mailman/listinfo/help-glpk
Dear Jeanette,
Your mail had to be forwarded manually because you are not subscribed to the
GLPK help list:
https://lists.gnu.org/mailman/listinfo/help-glpk
64bit Windows versions have been available for a long time.
I suggest you find the Window's binaries at http://winglpk.sourceforge.net/
A
Be careful about the pre-processing that GLPK does. If pre-processing is
turned on (and that is the default) then the intermediate solutions may not be
in the same form as the final solution.
From: Help-glpk [mailto:help-glpk-bounces+marc.meketon=oliverwyman@gnu.org]
On Behalf Of Heinrich
I am, by no means, the expert on the GPL license that GLPK. My understanding
is that if you make the changes suggested below and then proceed to distribute
the software publicly (outside of your company), you will need to make the
modified source code available to the users. The actual wording
For what it is worth, I and my team-mates have done your option A before and it
has worked fine. The only slight complication is that we had to regulate the
number of simultaneous processes. In our usage, we run glpsol.exe via a
“system” call (it’s called different things in different language
Very clever solution. Thank you.
However, having the max/min_symbolic would be less esoteric maybe more useful.
Sent from my mobile
> On May 26, 2016, at 1:58 PM, Andrew Makhorin wrote:
>
>
>> Both suggestions about max/min_symbolic and the iterated concatenate
>> function would be helpful, es
einrich Schuchardt [mailto:xypron.g...@gmx.de]
Sent: Thursday, May 26, 2016 12:55 AM
To: Meketon, Marc; help-glpk@gnu.org; Andrew Makhorin
Subject: Re: [Help-glpk] Invert a set-of-sets with mutually exclusive elements
Hello Marc,
unfortunately the min and max functions do not accept symbolic parameters.
I have a simple set of sets that has mutually exclusive elements that I would
like to invert into a param that, for each element, gives me the ID of the set
it belongs to.
Below is an example of the set of sets with mutually exclusive elements:
set POOLS := {"Pool201", "Pool203", "Pool204", "Po
Use an indexed parameter:
In your model section declare:
set IdxWeeks;
param weeks[IdxWeeks];
and in your data section have:
param : IdxWeeks : weeks :=
1 1
2 4
3 8
4 11
;
-Original Message-
From: Help-glpk [mailto:help-glpk-bounces+marc.meketon=oliverwyman@gnu.org]
On Be
.se]
Sent: Thursday, March 31, 2016 10:53 AM
To: Meketon, Marc; help-glpk@gnu.org
Subject: RE: [Help-glpk] Condensing a sparse matrix by creating a subset of
parameter data
Thanks for your message. That is indeed (almost) what I'm looking for. I would
like to then apply a constraint to the s
Note that eliminating nodes that are not used typically have no effect on the
solution time and memory requirements of the mathematical program due to the
ability of the pre-processor to quickly reduce the matrix.
Sent from my iPhone
On Mar 31, 2016, at 9:19 AM, Abhishek Shivakumar
mailto:a...
Are you looking for something like the below that finds the subset of nodes
being used?
set nodes := {"A", "B", "C", "D", "E"};
set arcs within nodes cross nodes := {("A","B"), ("B","E")};
display nodes;
display arcs;
set nodes_that_are_used :=
setof{tail_node in nodes, head_node in nodes : (
anything to do with GLPK.
From: gio@gmail.com [mailto:gio@gmail.com]
Sent: Monday, March 07, 2016 11:00 AM
To: Meketon, Marc
Cc: ΤΑΣΣΟΠΟΥΛΟΣ ΙΩΑΝΝΗΣ; help-glpk@gnu.org
Subject: Re: [Help-glpk] MIP problems
Network flow problems are LP, not MIP. Integer Programming is NP-Hard.
Giorgio
On 07
MIP problems are both. Depends on the problem… Network flow problems are MIP
problems that are solved in polynomial time, and Knapsack problems are MIP
problems which are NP-hard.
From: help-glpk-bounces+marc.meketon=oliverwyman@gnu.org
[mailto:help-glpk-bounces+marc.meketon=oliverwyman..
Hi Luis.
You need to make a change to the data so that each entry for "r" has the
appropriate "i" and "j". Below is an example using your data:
set I;
/* Las i muestras */
set J;
/* los j instrumentos */
param r{i in I, j in J};
/* cada una de las muestras de los retornos */
var x
If the objective function is of the form:
sum{i in I} x[i]*x[i]
then you might be able to use a piece-wise linear formulation to approximate a
quadratic objective function.
For example (assuming the "x" above is non-negative)
#
-
What you have seems to work. I created variables (all forced to 1 just to
display something interesting)
set I;
param J {i in I }>0, integer ;
set K {i in I }:=1..J[i];
var V{i in I, j in K[i]}, =1;
minimize SumOfV : sum{i in I, j in K[i]} V[i,j];
solve;
display V;
data;
param : I : J :=
1
Has anyone linked GMPL and CBC together? If so, could you describe how? I'm
using Visual Studio Express 2013.
Many thanks!
This e-mail and any attachments may be confidential or legally privileged. If
you received this message in error or are not the intended
”
-Marc
From: help-glpk-bounces+marc.meketon=oliverwyman@gnu.org
[mailto:help-glpk-bounces+marc.meketon=oliverwyman@gnu.org] On Behalf Of
Meketon, Marc
Sent: Saturday, May 02, 2015 8:44 AM
To: john tass; help-glpk@gnu.org
Subject: Re: [Help-glpk] Problem with writing to a text file from
I tried the following:
#test of writing out to a text file
solve;
printf : 'Hello World!\n' > "c:\temp\MyTextFile.txt";
printf : 'I am fine\n' >> "c:\temp\MyTextFile.txt";
end;
and it worked fine. At first I thought that the colon (“:”) was the issue,
since I never use it, but with or without t
Nigel had asked if you used the 32bit or 64bit version.
The available memory for a single process in the 32bit world (using 32bit
Windows) is 1.75GB. See http://www.viva64.com/en/k/0036/ for example. 32bit
GLPK on a 64bit Windows might be able to reach more, but in practice I find
that also h
Linear program matrices tend to be very sparse. As an example assume a typical
real-life linear program has 1 rows and 4 columns. It is very common
for a well formulated linear program of that size to have an average of 4
non-zero entries per column. In our example, the ia, ja, ar arr
I'm not the expert, but every time I've used "<" with strings in GMPL it came
out with consistent results.
-Original Message-
From: Jason Foster [mailto:jason.fos...@utoronto.ca]
Sent: Tuesday, December 30, 2014 5:44 PM
To: Meketon, Marc
Cc: help-glpk@gnu.org
Sub
While I understand your question, in the example that you gave do you really
need ord(i) < ord(j), or can you suffice with i < j (which seems to work with
your example)? Often all you need is any consistent ordering and not
necessarily a specific one.
-Original Message-
From: help-gl
Hi fellow GLPK'ers
I'm using the interior point method in glpsol. The algorithm makes steady
progress towards the optimum, and it gets very close to it, but after 100
iterations I receive am "ITERATION LIMIT EXCEEDED; SEARCH TERMINATED" message
and the solver stops. I do not see any option fo
Could you use the “printf” statement to write a JSON text file that could be
imported into the web page?
solve;
param filename symbolic := "d:\temp\file.txt";
printf "{FinInvAff:{\n" > filename;
for { fmdl in fmatdloc,t in tim }
{
printf " fmdl:%s, t:%d, value:%f\n", fmdl, t, FinInvAff[fmdl,
My guess is that fee[m] is a const/param, so can you rewrite your constraint to
be the following?
fee[m]*fee[m] = 1000 + (100 + (sum {n in N} (n mod 47))) * (sum {l > in L}
prod[l,m]);
-Original Message-
From: help-glpk-bounces+marc.meketon=oliverwyman@gnu.org
[mailto:help-glpk-bou
This is quite interesting... the reference belongs somewhere in the wiki for
GLPK.
-Original Message-
From: help-glpk-bounces+marc.meketon=oliverwyman@gnu.org
[mailto:help-glpk-bounces+marc.meketon=oliverwyman@gnu.org] On Behalf Of
Heinrich Schuchardt
Sent: Monday, January 27,
The "binary" in your param definition suggests that out of the cross-product of
classes and students, you only really want a subset of them.
It might be better, and easier, to have a two-dimensional set. Page 47 of the
GMPL manual shows how to do the data section using "+" and "-" to represent
Hi,
I am trying to read into GMPL a named range from Excel. "distances" is a named
range in Excel, with a column called "FromNode". I am getting a syntax error
("42000:1:-3506:[Microsoft][ODBC Excel Driver] Syntax error in FROM clause.") .
Any help would be appreciated.
The code looks like:
Instead of Awk, there is another way of doing this which I often find is easier
because all the calculations stay within GMPL:
In the GMPL program, have
set indices_to_set_to_zero within J default {};
param extra_data_file symbolic := "C:\TEMP\EXTRA.dat";
# ...
# set some x's to 0; note t
Solving the knapsack subproblem of the CSP is typically best done using dynamic
programming and not using MIP. You may wish to consider that.
The best dynamic programming algorithm I have found is in the book by Kellerer,
Pferschy and Pisinger [2004, Springer-Verlag, ISBN 3-540-40286-1].
I had
I noticed that Google has a set of "OR Tools"
(http://code.google.com/p/or-tools/) that includes "A wrapper around
third-party linear solvers (GLPK, CLP, CBC, SCIP, Sulum)."
Apparently this wrapper is in C++, but uses SWIG to provide a Java, C# and
Python wrapper. It includes both linear and i
One easy form of parallelization involves using "glpsol" (the command-line
version of GLPK) instead of calling the API. Have the controlling program
launch multiple "system" windows that execute glpsol. That way each run
maintains its own memory space.
-Original Message-
From: help-gl
h z <= 1 is
non-binding. Constraint (4) becomes z <= 1-a/N2lo. Since 1 <= a <= N2lo, we
know 0 <= 1-a/N2lo < 1, implying z < 1 (strict inequality), and then the binary
constraint forces z=0.
-Original Message-
From: Michael Hennebry [mailto:henne...@web.cs.ndsu
It was Nigel Galloway's code, not my code.
-Original Message-
From: Michael Hennebry [mailto:henne...@web.cs.ndsu.nodak.edu]
Sent: Tuesday, October 08, 2013 1:43 PM
To: Meketon, Marc
Cc: Nigel Galloway; Andrew Makhorin; help-glpk@gnu.org;
pietro.scio...@archinet.it
Subject: Re:
Hi Nigel. This is very clever.
Are you sure that Z = Q[2]-Q[1]? For the case where x[1]=1, x[2]=0, x[3]=0, we
have Q[1]=0, Q[2]=0, Q[3]=1, and then Q[3]-Q[2] = 1 which is the correct answer.
For n larger than three, Z would be Q[n] - Q[n-1]
-Original Message-
From: help-glpk-bounces
Juan said he received a "segmentation fault" that is mostly likely due to the
use of memory in the basis factorization. Providing an initial basis will cut
down the number of iterations, but I would think it would be highly unlikely to
cut down the memory requirements.
Juan - are you using the
] On Behalf Of
Meketon, Marc
Sent: Monday, September 16, 2013 6:48 PM
To: help-glpk@gnu.org
Cc: Monaci Michele
Subject: [Help-glpk] Bravo on Proximity Search
I have begun using the "proximity search" option (--proxy) and set for 120
seconds. On the problem that I'm solving,
I have begun using the "proximity search" option (--proxy) and set for 120
seconds. On the problem that I'm solving, it is doing an outstanding job of
getting solutions within 10% (and sometimes even within 1%) of optimal. [It
might take GLPK 30-60 minutes longer to obtain provably optimal res
There is the time-limit option "--tmlim" for glpsol:
glpsol --tmlim 3600 (and other command line options)
-Original Message-
From: help-glpk-bounces+marc.meketon=oliverwyman@gnu.org
[mailto:help-glpk-bounces+marc.meketon=oliverwyman@gnu.org] On Behalf Of
Antonio Carlos M
013 9:34 PM
To: help-glpk; Meketon, Marc
Subject: Re: [Help-glpk] GUSEK output line coloring
Hi, Marc.
This colored output is a native feature of Scite editor (GUSEK is a Scite fork).
Unfortunately, didn't fine any help to point to you.
There are based on output pattern (normally at beginni
On my installation of GUSEK, sometimes the output screen has a purple/magenta
line. For example, among the lines that show up in my output screen in GUSEK
are:
666Intermd 140.39 0.00 140.39 0.00 666I 681I
675 Line 1.12 1.12 0.00 0.00 27L
684Intermd
The GLPK wiki discusses sorting - and I believe there is a typo in it.
Should the line:
set ind{k in 1..card(I)} := setof{i in I: pos[i] = k} i;
really be:
set ind{k in 1..card(I)} := setof{i in I: pos[i] = k-1} i;
A copy/paste of the article is below:
# sorting_symbolic.mo
ssage-
From: Robbie Morrison [mailto:rob...@actrix.co.nz]
Sent: Thursday, April 18, 2013 4:42 AM
To: GLPK help
Cc: Meketon, Marc
Subject: Re: [Help-glpk] glpk 4.49 release information
Hello Marc, all
To: "Meketon, Marc
This is great news. I have found many uses of minimum cost network-flow over
the years, including revenue management models, small models for doing
"first-come, first serve" and "last-come, first-serve" connections within the
transportation industry, passenger rail crew rostering problems, and
Add in a colon
s.t. c{i in I}: obj >= ta[i];
From: help-glpk-bounces+marc.meketon=oliverwyman@gnu.org
[mailto:help-glpk-bounces+marc.meketon=oliverwyman@gnu.org] On Behalf Of
Abhishek R Varma
Sent: Thursday, April 11, 2013 7:28 PM
To: help-glpk@gnu.org
Subject: [Help-glpk] Help
Hi,
s
You can define a parameter to do this:
param IsModel1 := 1; #to run model 2, change this to IsModel1 := 0;
minimize IsModel1 * ( [the objective function of the first model]) +
(1-IsModel1) * ([the objective function of the second model]);
subject to: Some_Constraint_in_Model2_Not_in_Model1
(1
I’ve never tried the “satisfiability” feature of GLPK, but this might work here.
If Supply/Demand where “1”s, then I’m pretty sure this could be solved in GLPK
(see the cnfsat.pdf documentation that comes with GLPK). If Supply/demand were
greater than 1, I’m not so sure – perhaps someone who un
made?
Other topics?
-Original Message-
From: Robbie Morrison [mailto:rob...@actrix.co.nz]
Sent: Tuesday, January 01, 2013 3:21 PM
To: GLPK help
Cc: Meketon, Marc
Subject: re: [Help-glpk] Any chance for a GLPK user group at a conference
Hi Marc
Runs in Firefox, but I cannot get it to run in IE 9 (and also tried
“compatibility view” in IE 9).
From: help-glpk-bounces+marc.meketon=oliverwyman@gnu.org
[mailto:help-glpk-bounces+marc.meketon=oliverwyman@gnu.org] On Behalf Of
Jeffrey Kantor
Sent: Monday, December 31, 2012 7:45 PM
To:
I wonder if there should be some type of face-to-face user group meeting to
discuss GLPK. Perhaps in Germany? Or perhaps associated with another
conference such as an INFORMS conference. We could have some interesting
discussions about parallelization, source code control, various features, et
In general, it is rare that solving the dual of a problem takes less time, so I
would not recommend an approach that tests if the dual is more numerically
stable. The L1 regression problem is a rare exception in which directly
solving the dual makes sense.
The chief issue with the original f
Perhaps solving the dual is better.
In general, if Y is an n x 1 vector (dependent variables), X is an n x p matrix
(independent variables), b is an p x 1 vector of regression coefficients (the
unknowns), the L1 regression problem is:
min ||Y - Xb||1 (the L1 norm of Y-Xb)
This has dual of:
ma
A lot of later responses have been focused on the multi-threading issues from a
data structure viewpoint.
Yet to speed up a single, large, linear program, I would think that the
discussion would have been on the use of multiple cores to speed up the
factorization, pricing and other components o
Would this work for you?
set J;
var x{i in J};
s.t. c{i in K : i < card(J)} x[i] >= x[i+1]
-Original Message-
From: help-glpk-bounces+marc.meketon=oliverwyman@gnu.org
[mailto:help-glpk-bounces+marc.meketon=oliverwyman@gnu.org] On Behalf Of
Andrew Makhorin
Sent: Tuesday,
Note that in a post 16-June-2012
(http://lists.gnu.org/archive/html/help-glpk/2012-06/msg00023.html) , Andrew
Makhorin said in response to his plans for "history branching":
"I plan to implement a strong branching first. However, this requires
reimplementing the basis factorization module in a
jEdit is not listed in the wiki-books
(https://en.wikibooks.org/wiki/GLPK/Cross_Platform_IDEs). Might be nice for
someone with experience in using jEdit for GMPL to update the wiki page.
-Marc
-Original Message-
From: help-glpk-bounces+marc.meketon=oliverwyman@gnu.org
[mailto:hel
Xypron used "M" as a large constant (e.g., ). Not as a binary variable.
param M := ;
var B{J,K} >= 0;
s.t. a{j in J}: -M*sum{k in K}B[j,k] <= A[j] <= M*sum{k in K}B[j,k];
-Original Message-
From: help-glpk-bounces+marc.meketon=oliverwyman@gnu.org
[mailto:help-glpk-b
Take a look at https://en.wikibooks.org/wiki/GLPK/GMPL_Workarounds which
describes a work-around for not having if-then-else.
-Marc
-Original Message-
From: help-glpk-bounces+marc.meketon=oliverwyman@gnu.org
[mailto:help-glpk-bounces+marc.meketon=oliverwyman@gnu.org] On Behalf O
The A=1, B=1 solution is the solution that finds the most equalized set of
variables. If that is what you want, then one way is to minimize the absolute
value of the deviations around the average of the variables.
For example, instead of A, B (and to slightly generalize this), suppose you
have
I think I have a solution. I would like to use a simpler example, and let you
(Noli) work out the details for IRR.
It is well known, and your links show how, to use Newton's algorithm (aka
Newton Raphson's algorithm) to find the IRR, since it's really find a root of a
polynomial (see the oth
One idea: how about using the ODBC connection to export the solution to Excel
or some spreadsheet, and using the IRR calculation there?
Note that you are missing one really important piece of information in your
example - what is the original investment? Often in the IRR calculation, the
0th
Of
Andrew Makhorin
Sent: Wednesday, August 01, 2012 1:56 PM
To: help-glpk@gnu.org
Subject: [Help-glpk] [Fwd: Re: [Fwd: glpsol not converging]]
Forwarded Message
From: Narendra Devta-Prasanna
To: Meketon, Marc
Cc: glpk xypron , help-glpk@gnu.org ,
Andrew Makhorin
Subject: Re
Not sure if this is relevant:
Recently I've been trying to solve some scheduling models with GLPK. The model
is very well scaled, there are no "Big M" constants, most if not all of the
coefficients in the A matrix are 0 or 1.
The Simplex part works very well, and solves the LP in a 20 seconds
012 9:45 PM
To: GLPK help
Cc: Meketon, Marc
Subject: Re: [Help-glpk] not retrieving integer solutions
Hello Marc
To: "help-glpk@gnu.org"
Subject: [Help-glpk] not retrieving integer solut
rc.meketon=oliverwyman@gnu.org
[mailto:help-glpk-bounces+marc.meketon=oliverwyman@gnu.org] On Behalf Of
Meketon, Marc
Sent: Thursday, July 12, 2012 6:15 PM
To: help-glpk@gnu.org
Subject: [Help-glpk] not retrieving integer solutions
I am solving a small integer program (37 rows and 29 columns) u
I am solving a small integer program (37 rows and 29 columns) using the C#
interface from http://yoyovicks.blog.free.fr/
I've tested the code on quite a few datasets and it worked fine. But today I
changed some objective function coefficients (just changed the sign of them),
and for one partic
The issue is that set's contain objects (like numbers, strings, other sets).
They are not considered as really having numeric entries. But param's do. So
the trick is to create a param array that translates the object in the set to
the numeric value.
Try (look for the red bold where the para
In the model, do:
set indexes;
param values{indexes} ;
param index := min{k in indexes: values[k] != 0} k;
display index; # displays: index = 5
and in the data section, do:
param : indexes : values :=
1 0
2 0
3 0
4 0
5 8
6 9
7 0
8 0
;
From: help-glpk-bounces+marc.meketon=oliverwyman@gnu.o
Thank you!
This paper also discusses "history branching" - any plans for implementing that?
-Original Message-
From: Andrew Makhorin [mailto:m...@gnu.org]
Sent: Saturday, June 16, 2012 4:20 AM
To: Meketon, Marc
Cc: help-glpk@gnu.org
Subject: Re: [Help-glpk] hybrid pseudo-cost
I've been playing around with a "crew roster" algorithm, partly using the
integer programming ability of GLPK. Part of my "playing" is to try out
different MIP options.
For a number of different problem sets, the "hybrid pseudo-cost heuristic
branching" consistently seems to do the best. Jus
A long time ago I built linear programming solvers. One of the lessons was
that double precision helps in getting solutions faster - using single
precision runs into too many numerical problems (say, too many times when the
inverse of the basis needs to be rebuilt).
Michael's comment is intere
d be hanging out by itself
without it.
I would guess that you could dump out the data this way as well, but add a
dummy value at the end.
This is somewhat convoluted and probably there is a better way.
-Original Message-
From: Noli Sicad [mailto:nsi...@gmail.com]
Sent: Thursday, March
From: help-glpk-bounces+marc.meketon=oliverwyman@gnu.org
[mailto:help-glpk-bounces+marc.meketon=oliverwyman@gnu.org] On Behalf Of
Meketon, Marc
Sent: Thursday, March 01, 2012 2:29 AM
To: Noli Sicad; help-glpk@gnu.org
Subject: Re: [Help-glpk] CSV outputting MathProg for summary report m
There is an alternative way in GMPL to write out CSV files. Use the printf
function to create the CSV file.
Something like:
printf " Period,ClearfellArea,TRV,P1P2,SLOG,PULP\n" > "filename.csv"
printf {(t,i,j) in HARVEST} ": t, sum {(t,i,j) in HARVEST} Y[t,i,j] >>
"filename.csv"
-Marc
---
One possibility to get around the memory problem is to use a "for" loop and a
"print" statement that outputs to a text file, and then use a macro in Access
to import the text file.
I think the usage is something like (I don't have the documentation in front of
me) for creating a CSV file
for
I thought that the three different basis factorization methods that Andrew
developed were meant to improve numerical stability (at the cost of speed).
Has anyone tried these?
Using "glpsol" the options are (this comes from the glpsol --help usage
statement):
LP basis factorization options:
The clause in the error message that says .[Manuf Code]=[0012LBLK] leads me to
believe that it thinks 0012LBLK is a field name, and not a string constant.
Try switching double quotes and single quotes (I'm not sure that will work, but
it's worth a try):
"WHERE qProductsUnique.[Manuf Cod
1 - 100 of 215 matches
Mail list logo