No, elad..it is not that complicated.What i mean by smallest is simply the smallest value, it is an integer.But anyway thanx..I think i fixed it.
I defined a vector where are being stored the values...
Type: Posts; User: joan
No, elad..it is not that complicated.What i mean by smallest is simply the smallest value, it is an integer.But anyway thanx..I think i fixed it.
I defined a vector where are being stored the values...
Returns the value of a solution(it is an instance). the code above represents an algorithm(if u want i can post it)
Ok i better have to post it. Here it is
while...
Hi guys
I have this code
while (timer.elapsed_time(Timer::VIRTUAL) < tmax) {
.
.
.
.
Ok..if sometime you could look at look at it..
anyway thanx for all again
also, if you have time to look it.. the algorithm has as inputs -i ( the instances) -t time and -n the number of trials. i have defined all these as:
void read_parameters(int argc, char **argv)...
I really don't know if it works or not. In the first iteration i get a value that it is close to the optimal solution.In the other steps i get smaller and smaller values until one that is the...
I don't know if that expression >>selected_columns.erase(i); is correct. Because i look at the definition of erase and it is not quite like this.Also when i compile it like this i get an error for...
Yes, but i don't know how to write it.As you see above. I don't know how to express the selected_columns.???? part. if i do for example selected_columns.pop_back() it just gives me smaller values (...
Ok. i will explain. You have seen my final code.
start:
int not_covered;
for (int n=1; n <= num_trials; n++){
while (!aSol -> is_complete()) {
for (int i = 0; i < instance ->...
for example, the function rmv_columns if it was sth like this:
void Solution::rmv_column(int i) {
selected_columns.erase(i)
obj_value = obj_value - (instance->cost)[i];
is_added[i]...
Hi everyone.
I don't know how many of you have read this thread (apart from Daved) there are TOO many posts.Anyway, i have a problem( the last one).This last code:
int not_covered;
for (int...
Ok. i'll try in action!!
Just want to really really thank one more time..
If it wasn't you to guide me, i simply wouldn't have done it :-)
No sabia que hablas espanol
>>the number of rows covered by the current column but not by any other column added to the solution" divided by the cost. Isn't that right?
Exactly..
so by using
k[i] = (not_covered)...
If i understood well ( i'm not so sure) then it must be like this:
while (!aSol -> is_complete()) {
for (int i = 0; i < instance -> n_cols ; i++) {
if(aSol -> is_added[i]){...
As you see in the definition of the Solution, n_covered is a count that it is increasing when a row is not covered. But still as i told u i cannot express in programming language the term
>>the rows...
No Daved..this is the part i cannot write..In theory i know how it works(ok it's not that difficult)
But i cannot express the term: "The rows that covers the current column - the rows that have...
Yes dwks..that works
Thanx
Hi Daved..
For your first question: I asked my profesor and he told me that it would be no problem removing some columns of the set( half of them would be nice) randomly.That means that the columns...
Daved, if you are online at some point, please check this code. How does it seem to you?
I have to give this project on Monday. I have finished with the rest of the code ( erase and repeat again...
Look at this code. Compiling it i get no error(well it's sth). Except for the errors i get for the erase function. I don't really understand if it works. Please, if you can, tell me so. Please.....
Ok..i think the mistake is that the term
(instance -> covered_by[j][i].size())
indicates the number of columns that cover the j row.So i cannot make this..It has no sense.
I will try to find...
i have write this code, but i have many errors. I will try to figuer out what's goin on. If any time you are online and see it, say to me what u see wrong!! As you see below i have mess a little up...
Ok.. I think i have understand what u are trying to say.
But really, i don't know how to make the function( what parameters to use, etc..).It is quite complicated.
One question: the >> rows...
I will try to understand it good and then see if it works..
Only sth that is the key.When you say >> minus the number of rows that have already been covered by columns added to the solution.
...
It is the first time i work with this..removing randomly elements from an array..I keep searching in internet but i haven't really found what i want ( not exactly, even more or less).
My first...