Celine,
GLPK examples include assign.mod which when run produces:
Agent Task Cost
1 1 13
2 8 8
3 7 13
4 5 12
5 2 6
6 6 16
7 4 3
8 3 5
----------------------
Total: 76
To reproduce this using glpk's API I turn to page 46 Assignment Problem
section of Graphs.pdf in glpk docs directory and do the following to
the code example on page 56:
Change GLP_ASN_MMP to GLP_ASN_MIN (line 19).
Modify the printf to only print when x is 1
then using the assign.mod data in DIMACS format (sample.asn attached)
it produces the following:
Reading assignment problem data from `sample.asn'...
Assignment problem has 8 + 10 = 18 nodes and 64 arcs
75 lines were read
ret = 10; sol = 76
edge 1 11: x = 1; c = 13
edge 2 18: x = 1; c = 8
edge 3 17: x = 1; c = 13
edge 4 15: x = 1; c = 12
edge 5 12: x = 1; c = 6
edge 6 16: x = 1; c = 16
edge 7 14: x = 1; c = 3
edge 8 13: x = 1; c = 5
I distinguished Agent Nodes from Task Nodes by adding 10 to the Task
Nodes so it thinks there are 18 nodes in total but 9 and 10 are unused.
If you don't want to use DIMACS you may write your own read procedure
using the glp_add_vertices and glp_add_arc routines described on pages
8 and 9.
--
Nigel Galloway
[email protected]
On Wed, Aug 14, 2013, at 11:45 AM, Celine wrote:
Hi Nigel,
Thank you for your replying in the previous email.
I am trying to solve an assignment problem using glpk callable library
in C. But I cannot figure out how, since in the assignment problem, the
decision variables are in 2-dimension. So could you please help me out
by giving the appropriate functions in callable library or giving an
example? Thank you so much in advance!
If I didn't express my question clearly, please let me know.
Sincerely,
Shilan
On Wed, Aug 7, 2013 at 5:25 AM, Nigel Galloway
<[1][email protected]> wrote:
From: Nigel Galloway <[2][email protected]>
To: [3][email protected]
Subject: Re: [Help-glpk] [Fwd: glpk on aix]
Date: Tue, 06 Aug 2013 03:44:28 -0700
see [4]http://www.perzl.org/aix/index.php?n=Main.Glpk for a package
prepared for aix 5.
Does the source not compile out of the box on aix 6.1?
note the comments:
The library is available as 32-bit and 64-bit:
If you are compiling a 32-bit program, no special compiler options
are needed.
If you are compiling a 64-bit program, you have to compile and link
your application with "cc -q64" or "gcc -maix64".
--
Nigel Galloway
[5][email protected]
On Mon, Aug 5, 2013, at 03:48 PM, Andrew Makhorin wrote:
> -------- Forwarded Message --------
> From: Celine <[6][email protected]>
> To: [7][email protected]
> Subject: glpk on aix
> Date: Mon, 5 Aug 2013 15:29:26 -0400
>
> Hi there,
>
> Could you please let me know if you have a version of glpk that can
run
> on the aix 6.1 OS? I am looking forward to your response.
>
> I would really appreciate your help.
>
> Thank you so much in advance,
> Celine.
>
>
>
> _______________________________________________
> Help-glpk mailing list
> [8][email protected]
> [9]https://lists.gnu.org/mailman/listinfo/help-glpk
--
[10]http://www.fastmail.fm - The professional email service
_______________________________________________
Help-glpk mailing list
[11][email protected]
[12]https://lists.gnu.org/mailman/listinfo/help-glpk
--
[13]http://www.fastmail.fm - Or how I learned to stop worrying and
love email again
References
1. mailto:[email protected]
2. mailto:[email protected]
3. mailto:[email protected]
4. http://www.perzl.org/aix/index.php?n=Main.Glpk
5. mailto:[email protected]
6. mailto:[email protected]
7. mailto:[email protected]
8. mailto:[email protected]
9. https://lists.gnu.org/mailman/listinfo/help-glpk
10. http://www.fastmail.fm/
11. mailto:[email protected]
12. https://lists.gnu.org/mailman/listinfo/help-glpk
13. http://www.fastmail.fm/
--
http://www.fastmail.fm - One of many happy users:
http://www.fastmail.fm/help/overview_quotes.html
sample.asn
Description: Binary data
_______________________________________________ Help-glpk mailing list [email protected] https://lists.gnu.org/mailman/listinfo/help-glpk
