[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug-glpk] Assertion failed: avl_get_node_type(node) == A_INDEX - glpmpl
From: |
Xypron |
Subject: |
[Bug-glpk] Assertion failed: avl_get_node_type(node) == A_INDEX - glpmpl01.c at line 1890 |
Date: |
Sat, 01 Jan 2011 22:05:33 +0100 |
User-agent: |
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.16) Gecko/20101123 SeaMonkey/2.0.11 |
Hello Andrew,
the following (obviously syntactically broken) model does not lead to
correct syntax error handling:
Reading model section from error.mod...
Assertion failed: avl_get_node_type(node) == A_INDEX
Error detected in file glpmpl01.c at line 1890
set P := {0};
param p{p in P};
end;
In functions
* parameter_statement
* set_statement
* variable_statement
* constraint_statement
* objective_statement
please, change the sequence of commands to first add the parameter name
to the symbolic table and then parse the indexing expression.
/* include the parameter name in the symbolic names table */
{ AVLNODE *node;
node = avl_insert_node(mpl->tree, par->name);
avl_set_node_type(node, A_PARAMETER);
avl_set_node_link(node, (void *)par);
}
/* parse optional indexing expression */
if (mpl->token == T_LBRACE)
{ par->domain = indexing_expression(mpl);
par->dim = domain_arity(mpl, par->domain);
}
This results in the following error output for above model:
Reading model section from /home/zfsdt/temp/error.mod...
/tmp/error.mod:2: syntax error in literal set
Context: set P := { 0 } ; param p { p in
Best regards
Xypron
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Bug-glpk] Assertion failed: avl_get_node_type(node) == A_INDEX - glpmpl01.c at line 1890,
Xypron <=