Menu
Menu
DaniWeb
Log In
Sign Up
Read
Contribute
Meet
Search
Search
About 31 results for
opimization
- Page 1
cutting opimization code..
Programming
Software Development
8 Years Ago
by zizo.ahmed.779
… 650 cm --->6 .... so i want code for cutting
opimization
of these parts with stock i need help for code…
Compile, but doesn't run?? Segmentation fault
Programming
Software Development
14 Years Ago
by bpt0004
… (Schwefel, Rosenbrock, Griewangk) \n" << "4) Perform
Opimization
\n" << "5) Show All Optimization Results…
Re: Compile, but doesn't run?? Segmentation fault
Programming
Software Development
14 Years Ago
by bpt0004
… (Schwefel, Rosenbrock, Griewangk) \n" << "4) Perform
Opimization
\n" << "5) Show All Optimization Results…
This one line (317) is giving me a headache, pleaes help me
Programming
Software Development
14 Years Ago
by bpt0004
… (Schwefel, Rosenbrock, Griewangk) \n" << "4) Perform
Opimization
\n" << "5) Show All Optimization Results…
Re: Google Sand Box Effect
Digital Media
Digital Marketing
Search Engine Strategies
17 Years Ago
by adeelkhero
…. The thing is that On-Page optimization and Off-Page
opimization
are 2 different sections of entire SEO process. We always…
Re: polynomial: problem with overloading operator =
Programming
Software Development
15 Years Ago
by StuXYZ
… would never do that, be very very careful of compiler
opimization
, double loops that i=j (e.g. [icode]for(int…
Re: Counting elementary events for sum of variable number of n-faced dice
Programming
Software Development
12 Years Ago
by TrustyTony
Finally slight
opimization
with itertools.groupby (my parameters are by the way same …
Re: cutting opimization code..
Programming
Software Development
8 Years Ago
by AleMonteiro
You need help with the code or with the logic of the optimization? Maybe if you explain the logic somebody can help with the code.
Re: cutting opimization code..
Programming
Software Development
8 Years Ago
by zizo.ahmed.779
the problem that i don't know when to start .. what code i will use ..i made manual code to select measures from dvg and transfer to textboxes then calculate manually but i want to make something like "real cut 1d " or " smart 1d cutting" apps. i try to open code of them using reflector but i coudn't ...plz help
Re: cutting opimization code..
Programming
Software Development
8 Years Ago
by zizo.ahmed.779
hello no answer or help???????
Re: cutting opimization code..
Programming
Software Development
8 Years Ago
by Reverend Jim
>the problem that i don't know when to start You start by writing the parts that you can and stubbing out the rest. Then you can ask specific questions about the stubbed out parts. When I see phrases such as "I want to make something like..." my first impression is that you haven't really thought about what you want to do. If that is …
Re: cutting opimization code..
Programming
Software Development
8 Years Ago
by rproffitt
Maybe you need to know what you are doing could be called. Here's a google using what I think you are looking for. https://www.google.com/search?hl=en&as_q=1d+nesting+algorithm As you can see this leads you to the old "bin packing problem" and now you have a lot of prior discussions you can check over. It's an old question with …
Re: Compile, but doesn't run?? Segmentation fault
Programming
Software Development
14 Years Ago
by donaldw
Please use code tags when posting code. That's really hard to read.
Re: Compile, but doesn't run?? Segmentation fault
Programming
Software Development
14 Years Ago
by bpt0004
sorry, i fixed it
Re: Compile, but doesn't run?? Segmentation fault
Programming
Software Development
14 Years Ago
by donaldw
What kind of debugging have you done on it so far? The seg fault appears to happen when you declare the new Individual object on line 544.
Re: Compile, but doesn't run?? Segmentation fault
Programming
Software Development
14 Years Ago
by bpt0004
none yet (i know its a bad answer), i have no idea how to fix it neither
Re: Compile, but doesn't run?? Segmentation fault
Programming
Software Development
14 Years Ago
by power_computer
So you wrote all this code and didnt bother to compiler and run it till the end? Tip: Working one function at a time, saving it, compiling, and debugging it, doing a small test of it if you can save you alot of trouble when you arrive to a sitution if you dont know where error might be occuring in this mess just follow donald's suggestion he has …
Re: Compile, but doesn't run?? Segmentation fault
Programming
Software Development
14 Years Ago
by donaldw
Indeed, I have. OP: What compiler are you using? Regardless, most have some sort of debugging functionality that allows you to step through the code. If you do this, you will see that it runs to line 237, where it calls[CODE]newUserInterface.MainMenu();[/CODE]and jumps to line 544:[CODE]Individual newIndividual;[/CODE]Execution never makes …
Re: Compile, but doesn't run?? Segmentation fault
Programming
Software Development
14 Years Ago
by mrnutty
From what my debugger is telling me, you have a stack overflow on line 544
Re: Compile, but doesn't run?? Segmentation fault
Programming
Software Development
14 Years Ago
by bpt0004
found the error, thank you all for the input, i'll definately be compiling while coding more often
Re: Compile, but doesn't run?? Segmentation fault
Programming
Software Development
14 Years Ago
by donaldw
Glad you found the error and learned a lesson also. What ended up being the cause of the fault? Don't forget to mark the thread solved.
Re: This one line (317) is giving me a headache, pleaes help me
Programming
Software Development
14 Years Ago
by jonsca
[code] int GeneticAlgorithm::BinarySelection(int populationSize) { firstRandom = static_cast<int>(( static_cast<double>(rand()))/ static_cast<double>( RAND_MAX) *(populationSize-0 + 1) + 0); secondRandom = static_cast<int>(( static_cast<double>(rand()))/ static_cast<double>( RAND_MAX) *(populationSize-0 + 1) …
Re: This one line (317) is giving me a headache, pleaes help me
Programming
Software Development
14 Years Ago
by vmanes
I get no errors on that line, but several other compiler errors and warnings do come up (Visual C++ 2008) Have you in fact posted the latest version of your code that is giving you problems? Have you cleared all the other errors/warnings?
Re: This one line (317) is giving me a headache, pleaes help me
Programming
Software Development
14 Years Ago
by bpt0004
I changed it to [CODE]int GeneticAlgorithm::BinarySelection(int populationSize) { firstRandom = static_cast<int>(( static_cast<double>(rand()))/ static_cast<double>( RAND_MAX) *(populationSize-0 + 1) + 0); secondRandom = static_cast<int>(( static_cast<double>(rand()))/ static_cast<double>( RAND_MAX) *(…
Re: This one line (317) is giving me a headache, pleaes help me
Programming
Software Development
14 Years Ago
by bpt0004
The code will compile and work fine but will not run properly.... run the program press 4 (optimize) enter 2-genetic enter 5 for population enter 5 for mutation rate enter 5 for mutation amount... this leads to an illegal index =(
Re: This one line (317) is giving me a headache, pleaes help me
Programming
Software Development
14 Years Ago
by jonsca
Your random number code is off by 1. If you want to get numbers between 0 and populationsize-1 just do [icode] rand() % populationsize [/icode]. Make sure you seed it somewhere (only once) with srand()
Re: This one line (317) is giving me a headache, pleaes help me
Programming
Software Development
14 Years Ago
by bpt0004
jonsca, which one are you talking about? what line?
Re: This one line (317) is giving me a headache, pleaes help me
Programming
Software Development
14 Years Ago
by jonsca
when you generate firstRandom and secondRandom in BinarySelection. Your random values permit index values equal to the population size which will overrun your array.
Re: This one line (317) is giving me a headache, pleaes help me
Programming
Software Development
14 Years Ago
by bpt0004
jonsca i changed it to this[CODE]int GeneticAlgorithm::BinarySelection(int populationSize) { srand(time(0)); firstRandom = static_cast<int>(( static_cast<double>(rand()))/ static_cast<double>( RAND_MAX) *((populationSize-1)-0 + 1) + 0); secondRandom = static_cast<int>(( static_cast<double>(rand()))/ …
Re: This one line (317) is giving me a headache, pleaes help me
Programming
Software Development
14 Years Ago
by jonsca
You're never updating counter in GeneticAlgorithm::GeneticAlgorithm() I think you should change checkanswer to a bool [code] while(counter < 50) //keep going until we find the answer, or until 50 iterations occur { if(checkAnswer()) break; //check to see if we have an individual with the correct answer…
1
2
Next
Search
Search
Forum Categories
Hardware/Software
Programming
Digital Media
Community Center
Latest Content
Newest Topics
Latest Topics
Latest Posts
Latest Comments
Top Tags
Topics Feed
Social
Meet People
Forums
Top Members
Community Functions
DaniWeb Premium
Newsletter Archive
Markdown Syntax
Community Rules
Developer APIs
Connect API
Forum API Docs
Tools
SEO Backlink Checker
Legal
Terms of Service
Privacy Policy
FAQ
About Us
Advertise
Contact Us
© 2024 DaniWeb® LLC