Hi
Thanks, really it was the problem ... I fix it with a *try ... catch*, once
that I want a formatted output ... so the code is such like:
...................................................
try
{
for (int i = 0; i < mat_size; i++) {
os << "\n" << i << "|" ;
for (int j = 0; j < mat_size; j++) {
os.width(1);
//os << matrix(i,j) << " ";
if ( matrix(i,j).val() == 1 )
os << j << " ";
else
os << "_" << " ";
}
}
}
catch(std::exception &e)
{
std::cerr << "\n" << e.what()
<< "\t PRINT OUTPUT: NON DEFINITION for MATRIX YET" << std::endl;
}
.............................................................................................................................
So, now in blue and red nodes .... the gist's message is:
BoolVar::val: Attempt to access value of unassigned variable PRINT
OUTPUT: NON DEFINITION for MATRIX YET
Is there any alternative or better for this solution? Is there any function
to check if all the values of a variable are already instancied/assigned? In
this case, the variable is a matrix.
Thanks
2010/6/28 Mikael Zayenz Lagerkvist <[email protected]>
> Hi,
>
> The problem is that you try to inspect unassigned variables using the
> val()-member in your code. See the marked part of the error message
> below to know what to look for.
>
> 2010/6/28 Claudio Cesar de Sá <[email protected]>:
> > (<unknown>:3284): GLib-GObject-WARNING **: IA__g_object_set_valist:
> object
> > class `GtkMenuItem' has no property named `label'
> >
> > (<unknown>:3284): GLib-GObject-WARNING **: IA__g_object_set_valist:
> object
> > class `GtkCheckMenuItem' has no property named `label'
> > terminate called after throwing an instance of
> > 'Gecode::Int::ValOfUnassignedVar'
> > what(): BoolVar::val: Attempt to access value of unassigned variable
> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>
> See also a previous discussion on errors thrown when using Gist:
> http://article.gmane.org/gmane.comp.lib.gecode.user/2858
>
> Cheers,
> Mikael
>
>
> --
> Mikael Zayenz Lagerkvist,
> http://www.ict.kth.se/~zayenz/<http://www.ict.kth.se/%7Ezayenz/>
>
--
claudio
_______________________________________________
Gecode users mailing list
[email protected]
https://www.gecode.org/mailman/listinfo/gecode-users