help-glpk
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Help-glpk] Includes


From: Robbie Morrison
Subject: Re: [Help-glpk] Includes
Date: Fri, 18 Nov 2011 07:14:39 +1300 (NZDT)
User-agent: SquirrelMail/1.4.17

Hi Nilo, Andrew

------------------------------------------------------------
To:           Nilo Cesar Teixeira <address@hidden>
Subject:      Re: [Help-glpk] Includes
Message-ID:  <address@hidden>
From:         Andrew Makhorin <address@hidden>
Date:         Thu, 17 Nov 2011 17:19:37 +0300
------------------------------------------------------------

>> Is it possible to "include" part of a model in a gmpl file ?
>>
>> I would like to keep the constraints in a different file.
>
> MathProg does not support file inclusions. However,
> you may use the C preprocessor 'gcc -E' or a similar
> text tool to do that.

First, it would help if you said what environment
you're on: Windows, Linux, or something else.

I have read that the C/C++ preprocessor should
only be used for its intended application.  One
alternative is GNU m4:

  http://en.wikipedia.org/wiki/GNU_m4

Or you could write some scripting, if the task is
simple, calling perhaps 'cat' and the 'bash'
redirection operator '>'.

HTH, Robbie
---
Robbie Morrison
PhD student -- policy-oriented energy system simulation
Technical University of Berlin (TU-Berlin), Germany
University email (redirected) : address@hidden
Webmail (preferred)           : address@hidden
[from Webmail client]





reply via email to

[Prev in Thread] Current Thread [Next in Thread]