Search:

Type: Posts; User: joan

Page 1 of 3 1 2 3

Search: Search took 0.01 seconds.

  1. Thread: Minimum element

    by joan
    Replies
    6
    Views
    1,169

    No, elad..it is not that complicated.What i mean...

    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...
  2. Thread: Minimum element

    by joan
    Replies
    6
    Views
    1,169

    Returns the value of a solution(it is an...

    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...
  3. Thread: Minimum element

    by joan
    Replies
    6
    Views
    1,169

    Minimum element

    Hi guys

    I have this code


    while (timer.elapsed_time(Timer::VIRTUAL) < tmax) {
    .
    .
    .
    .
  4. Thread: iterated greedy!!

    by joan
    Replies
    71
    Views
    5,377

    Ok..if sometime you could look at look at it.. ...

    Ok..if sometime you could look at look at it..

    anyway thanx for all again
  5. Thread: iterated greedy!!

    by joan
    Replies
    71
    Views
    5,377

    also, if you have time to look it.. the algorithm...

    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)...
  6. Thread: iterated greedy!!

    by joan
    Replies
    71
    Views
    5,377

    I really don't know if it works or not. In the...

    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...
  7. Thread: iterated greedy!!

    by joan
    Replies
    71
    Views
    5,377

    I don't know if that expression...

    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...
  8. Thread: iterated greedy!!

    by joan
    Replies
    71
    Views
    5,377

    Yes, but i don't know how to write it.As you see...

    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 (...
  9. Thread: iterated greedy!!

    by joan
    Replies
    71
    Views
    5,377

    Ok. i will explain. You have seen my final code....

    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 ->...
  10. Thread: iterated greedy!!

    by joan
    Replies
    71
    Views
    5,377

    for example, the function rmv_columns if it was...

    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]...
  11. Thread: iterated greedy!!

    by joan
    Replies
    71
    Views
    5,377

    Hi everyone. I don't know how many of you have...

    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...
  12. Thread: iterated greedy!!

    by joan
    Replies
    71
    Views
    5,377

    Ok. i'll try in action!! Just want to really...

    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
  13. Thread: iterated greedy!!

    by joan
    Replies
    71
    Views
    5,377

    >>the number of rows covered by the current...

    >>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)...
  14. Thread: iterated greedy!!

    by joan
    Replies
    71
    Views
    5,377

    If i understood well ( i'm not so sure) then it...

    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]){...
  15. Thread: iterated greedy!!

    by joan
    Replies
    71
    Views
    5,377

    As you see in the definition of the Solution,...

    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...
  16. Thread: iterated greedy!!

    by joan
    Replies
    71
    Views
    5,377

    No Daved..this is the part i cannot write..In...

    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...
  17. Thread: iterated greedy!!

    by joan
    Replies
    71
    Views
    5,377

    Yes dwks..that works Thanx

    Yes dwks..that works
    Thanx
  18. Thread: iterated greedy!!

    by joan
    Replies
    71
    Views
    5,377

    Hi Daved.. For your first question: I asked my...

    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...
  19. Thread: iterated greedy!!

    by joan
    Replies
    71
    Views
    5,377

    Daved, if you are online at some point, please...

    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...
  20. Thread: iterated greedy!!

    by joan
    Replies
    71
    Views
    5,377

    Look at this code. Compiling it i get no...

    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.....
  21. Thread: iterated greedy!!

    by joan
    Replies
    71
    Views
    5,377

    Ok..i think the mistake is that the term ...

    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...
  22. Thread: iterated greedy!!

    by joan
    Replies
    71
    Views
    5,377

    i have write this code, but i have many errors. I...

    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...
  23. Thread: iterated greedy!!

    by joan
    Replies
    71
    Views
    5,377

    Ok.. I think i have understand what u are trying...

    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...
  24. Thread: iterated greedy!!

    by joan
    Replies
    71
    Views
    5,377

    I will try to understand it good and then see if...

    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.
    ...
  25. Thread: iterated greedy!!

    by joan
    Replies
    71
    Views
    5,377

    It is the first time i work with this..removing...

    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...
Results 1 to 25 of 58
Page 1 of 3 1 2 3