[gecode-users] Float values and element constraint
Arshad Khan
khan.m.arshad at gmail.com
Tue Feb 21 13:59:37 CET 2017
Hello All,
I am a Gecode novice and seeking your expert help on one of the issue that
I am facing when using float values.
In the example warehouse.cpp, the supply cost from a warehouse to a store
is defined using an int value matrix (c_supply). This matrix is later used
in one of the constraint that computes the cost. Now I want to use a cost
matrix of float values. However, the constraint uses an 'element'
constraint to compute the cost which is not defined for float values. How
can I convert the constraint to use float values? Any help is greatly
appreciated.
For your reference, the relevant code from the example is follows:
// Compute cost for each warehouse
for (int s=0; s<n_stores; s++) {
IntArgs c(n_warehouses, c_supply[s]);
c_store[s] = expr(*this, element(c, supplier[s]));
}
(What I want is to have a FloatValArgs type for c.)
Thanks and Regards
Arshad
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.gecode.org/pipermail/users/attachments/20170221/8e3b976e/attachment.html>
More information about the users
mailing list