Jump to content
Old threads will finally start getting archived ×

JChilds

Members
  • Posts

    86
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

JChilds's Achievements

Member

Member (2/5)

0

Reputation

  1. Thankyou very much
  2. The string will always be different(in both cases), but the format the same .
  3. Hi guys, I have been playing with regex, but it and I really do not get on apparently. How would I go about matching '1234' in this expression: (123|789,1234) And, How would I get this as an array in php (im not sure if regex is the correct thing to use here) ' _x[5,1,0,0,0,0,0,0,1,0,1,4,4,9,10,5]' (the values within the [] obviously.
  4. Seems to be some confusion on the priority also. Here is a graphical example: If priorities are the same, the current drill is to be assigned to the station with the lowest number of drills at present. I was thinking about another way to do it: - Get list of x,y coords for drills for each station - Compare the arrays and delete duplicates depending on priority. - if no priority, rely on size of each array to decide.. Is this a good/possible way to do it? Or is it not practical?
  5. Hi, Thanks for that, but it has got me mighty confused. I have spent some time going over it and i'm wondering is it possible to have a separate distance for each station(assigned at same time where priorty is assigned)? Also. If the drills are not within the specified radius of any station, they are not included. Sorry I am being a pain. I only know the basics of php and have really jumped in the deep end i think.
  6. xyph, You are correct. I currently use this to get all drills within a certain radius. $query = " SELECT * FROM $table WHERE (SQRT( ($x-x)*($x-x)+($y-y)*($y-y) ) < $radius ) "; sample data: x y 500 485 517 514 495 515 504 481 518 501 499 506 501 518 507 487 495 500 486 507 510 493 513 516 513 514 505 511 504 489 512 515 503 513 511 515 478 499 stations: 500,500 480,490
  7. xyph, The lists of drills are already assigned to each station. But there are alot of double ups (two or more stations being assigned the same drill) There can be 200 or more drills assigned to each station. IF two stations have the same priority, the current drill is assigned to the station with the least amount of drills currently assigned to it.
  8. It also has to be a possibility for two stations to have the same priority. (if this happens, I have to assign the current doubled up drill to the station with the least amount of drills assigned to it)
  9. Only one drill can go to each station. To specify a little further: Each Station already has a list of drills within its radius. But a drill cannot be assigned to more than one station. Where as at the moment the stations are assigned to all drills within their radius, so there are alot of doubles.
  10. I have a file with id_12345 randomtext id_987459768 This code gets me 'id_12345' but I only want it to return 12345 Is this possible? /id_[1-9]?\d+/g
  11. If you imagine the three stations having rings (radius) around them. This radius can well and truely overlap a near by station. Only the 'overlap' of the rings is to be split/prioritized.
  12. I have a list of x,y coordinates. (drill positions) I have Three Primary x,y co-ords. (station positions) I want to assign drill positions to stations based on how close they are and the priority of the station(1, 2 or 3). I also want the option of making all stations have a priority or 1 so they divide equally.(for drill positions that are close to two stations) I have absolutely no idea how to tackle this. Is there a formula anyone is aware of? Can anyone even attempt to show me how to tackle this. I am 100% lost.
  13. Im not very well versed in mysql at all. id is int(11) There are no relationships defined in 'designer' in phpmyadmin
  14. It is going to be ongoing. I understand it is going to be slow. That is why I am here, to see if there is a better way of doing it. As a general rule, only ~ 1000 records will need to be updated(each time) as most of the 'problems' are the more recent jobs.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.