Help “current directory” function

2020-12-02 Thread Manuel Castro




Hi glpk wizards,I wonder if there a kind of function or workaround 
that returns the directory path of where the ‘.mod’ file is??Basically in the 
folder where the ‘.mod’ file is, I have created another folder called “data” 
where I have all my input and output CSV data files. I can insert this 
directory path as a string in the GLPK reading CSV file statement. But of 
course if I change the directory of the project then, I have to go to the 
‘.mod’ file and rewrite the directory path which is very inconvenient. So, is 
there a function/workaround that can return the directory path of the ‘mod’ 
file?Many thanks for your help.Kind regards,Manuel.










Re: MathProg grammar in EBNF

2020-12-02 Thread Germán Ferrari
On Wed, Dec 2, 2020 at 6:29 PM Andrew Makhorin  wrote:

> On Wed, 2020-12-02 at 11:27 -0300, Germán Ferrari wrote:
> > Hi.
> >
> > I couldn't find the MathProg grammar in EBNF
>
> You can find all the grammar productions actually used by parsing
> routines in comments to these routines;
>
> see glpk/src/mpl/mpl1.c and mpl2.c.
>
> For example:
>
> /*--
> -- object_reference - parse reference to named object.
> --
> -- This routine parses primary expression using the syntax:
> --
> --  ::= 
> --  ::= 
> --  ::=  [  ]
> --  ::= 
> --  ::=  [  ]
> --  ::=  
> --  ::=  [  ]
> --  
> --  ::=  
> --  ::=  [  ]
> --  
> --  ::= 
> --  ::= 
> --  ::= 
> --  ::= 
> --  ::= 
> --  ::=  | .lb | .ub | .status | .val | .dual */
>

It did not occur to me to look there. Thank you for the pointers.


> > so I created one. It only covers the declaration statements. Maybe
> > it's useful to somebody else.
>
> Thank you.
>
> >
> > Any comments welcome.
>
> I'd like to note that if you enclose non-terminals in < and >, then
> terminal symbols are not needed to be enclosed in quotes.
>

Noted! Thank you


>
> >
> > Thank you.
> >
> > Regards,
> > Germán.
>


Re: MathProg grammar in EBNF

2020-12-02 Thread Andrew Makhorin
On Wed, 2020-12-02 at 11:27 -0300, Germán Ferrari wrote:
> Hi.
> 
> I couldn't find the MathProg grammar in EBNF 

You can find all the grammar productions actually used by parsing
routines in comments to these routines; 

see glpk/src/mpl/mpl1.c and mpl2.c.

For example:

/*--
-- object_reference - parse reference to named object.
--
-- This routine parses primary expression using the syntax:
--
--  ::= 
--  ::= 
--  ::=  [  ]
--  ::= 
--  ::=  [  ]
--  ::=  
--  ::=  [  ]
--  
--  ::=  
--  ::=  [  ]
--  
--  ::= 
--  ::= 
--  ::= 
--  ::= 
--  ::= 
--  ::=  | .lb | .ub | .status | .val | .dual */

> so I created one. It only covers the declaration statements. Maybe
> it's useful to somebody else.

Thank you.

> 
> Any comments welcome. 

I'd like to note that if you enclose non-terminals in < and >, then
terminal symbols are not needed to be enclosed in quotes.

> 
> Thank you.
> 
> Regards,
> Germán.



MathProg grammar in EBNF

2020-12-02 Thread Germán Ferrari
Hi.

I couldn't find the MathProg grammar in EBNF so I created one. It only
covers the declaration statements. Maybe it's useful to somebody else.

Any comments welcome.

Thank you.

Regards,
Germán.


ebnf-mathprog.pdf
Description: Adobe PDF document