Consulting

Page 4 of 4 FirstFirst ... 2 3 4
Results 61 to 68 of 68

Thread: find all combinations (no repeats)

  1. #61
    Quote Originally Posted by p45cal View Post
    Your last attachment works fine here. You'll have to wait a bit.
    If you want to reassure yourself that it's working, change the line:
    ResultBlockSize = 1000000
    to say:
    ResultBlockSize = 100000
    which should produce some 24 new workbooks with your data.

    I'm presuming the file I attached to msg#58 worked OK.
    Yes, you are right. I waited for 6 minutes to generate 3 workbooks. Is it possible to improve the speed without decreasing the ResultBlockSize?


  2. #62
    Knowledge Base Approver VBAX Wizard p45cal's Avatar
    Joined
    Oct 2005
    Location
    Surrey UK
    Posts
    5,874
    Decreasing ResultBlockSize doesn't speed it up, it slows it down because it has to create more workbooks. You can increase it safely up to 1,048,574
    There is a DoEvents line whichyou can take out, but this will make it very difficult to interrupt the code should you find you've given it a task which is too big and so is taking too long.
    Otherwise, there's not much to do to speed it up further.
    So far you've been reluctant to say what you're going to do with these results, which could have a bearing on how/how quickly they can be produced.

    edit: Taking DoEvents out speeds it up almost 10 times!
    Last edited by p45cal; 03-20-2021 at 09:17 AM.
    p45cal
    Everyone: If I've helped and you can't be bothered to acknowledge it, I can't be bothered to look at further posts from you.

  3. #63
    Quote Originally Posted by p45cal View Post
    Decreasing ResultBlockSize doesn't speed it up, it slows it down because it has to create more workbooks. You can increase it safely up to 1,048,574
    There is a DoEvents line whichyou can take out, but this will make it very difficult to interrupt the code should you find you've given it a task which is too big and so is taking too long.
    Otherwise, there's not much to do to speed it up further.
    So far you've been reluctant to say what you're going to do with these results, which could have a bearing on how/how quickly they can be produced.
    I am doing a study on the analysis of chaotic data.

  4. #64
    Moderator VBAX Sage SamT's Avatar
    Joined
    Oct 2006
    Location
    Near Columbia
    Posts
    7,814
    Location
    Chaotic Data without repetitions is not Chaotic

    If a 6 column Row of numbers is one Chaotic Data Point, then 1234,65 is not the same as 1234,56

    IMO, you are making your "Chaotic" Data Set very regulated.
    I expect the student to do their homework and find all the errrors I leeve in.


    Please take the time to read the Forum FAQ

  5. #65
    Quote Originally Posted by SamT View Post
    Chaotic Data without repetitions is not Chaotic

    If a 6 column Row of numbers is one Chaotic Data Point, then 1234,65 is not the same as 1234,56

    IMO, you are making your "Chaotic" Data Set very regulated.
    if you want to study something you need to do it in phases before putting everything in the bowl and getting confused what could cause a certain behavior. Then you can widen your range and explore more.

  6. #66
    VBAX Sage
    Joined
    Apr 2007
    Location
    United States
    Posts
    8,726
    Location
    http://sprott.physics.wisc.edu/cdg.htm




    Capture.JPG


    Like SamT says:

    IMO, you are making your "Chaotic" Data Set very regulated.

    In my layman's terms, the best exmple of 'choas' is the classic butterfly effect.


    In chaos theory, the butterfly effect is the sensitive dependence on initial conditions in which a small change in one state of a deterministic nonlinear system can result in large differences in a later state.The term is closely associated with the work of mathematician and meteorologist Edward Lorenz. He noted that butterfly effect is derived from the metaphorical example of the details of a tornado (the exact time of formation, the exact path taken) being influenced by minor perturbations such as a distant butterfly flapping its wings several weeks earlier. Lorenz discovered the effect when he observed runs of his weather model with initial condition data that were rounded in a seemingly inconsequential manner. He noted that the weather model would fail to reproduce the results of runs with the unrounded initial condition data. A very small change in initial conditions had created a significantly different outcome.[1]


    The idea that small causes may have large effects in weather was earlier recognized by French mathematician and engineer Henri Poincaré. American mathematician and philosopher Norbert Wiener also contributed to this theory. Edward Lorenz's work placed the concept of instability of the Earth's atmosphere onto a quantitative base and linked the concept of instability to the properties of large classes of dynamic systems which are undergoing nonlinear dynamics and deterministic chaos.[2]
    Last edited by Paul_Hossler; 03-20-2021 at 06:52 PM.
    ---------------------------------------------------------------------------------------------------------------------

    Paul


    Remember: Tell us WHAT you want to do, not HOW you think you want to do it

    1. Use [CODE] ....[/CODE ] Tags for readability
    [CODE]PasteYourCodeHere[/CODE ] -- (or paste your code, select it, click [#] button)
    2. Upload an example
    Go Advanced / Attachments - Manage Attachments / Add Files / Select Files / Select the file(s) / Upload Files / Done
    3. Mark the thread as [Solved] when you have an answer
    Thread Tools (on the top right corner, above the first message)
    4. Read the Forum FAQ, especially the part about cross-posting in other forums
    http://www.vbaexpress.com/forum/faq...._new_faq_item3

  7. #67
    Moderator VBAX Sage SamT's Avatar
    Joined
    Oct 2006
    Location
    Near Columbia
    Posts
    7,814
    Location
    Function Chaotic() As Long
    'Returns 2 digit number
    Randomize
    Chaotic = CLong(Rnd() * 100)
    End Function

    'May be faster
    Function Chaotic2() As Long
    'Returns 2 digit number: final *100
    Chaotic = CLong(Rnd(CInt(Right(CStr(CDble(Now)), 3) * -1) * 100))
    End Function
    I expect the student to do their homework and find all the errrors I leeve in.


    Please take the time to read the Forum FAQ

  8. #68
    VBAX Sage
    Joined
    Apr 2007
    Location
    United States
    Posts
    8,726
    Location
    SamT -- I would say that IMVVVHO is more of a Monte Carlo approach


    I was thinking (again, it's been a long time for me) that testing a model through 1000's of iterations using an inputs of t-sub0 = 1.00001 and t-sub0 = 1.000011 to see the differences at the would be closer to the butterfly effect
    ---------------------------------------------------------------------------------------------------------------------

    Paul


    Remember: Tell us WHAT you want to do, not HOW you think you want to do it

    1. Use [CODE] ....[/CODE ] Tags for readability
    [CODE]PasteYourCodeHere[/CODE ] -- (or paste your code, select it, click [#] button)
    2. Upload an example
    Go Advanced / Attachments - Manage Attachments / Add Files / Select Files / Select the file(s) / Upload Files / Done
    3. Mark the thread as [Solved] when you have an answer
    Thread Tools (on the top right corner, above the first message)
    4. Read the Forum FAQ, especially the part about cross-posting in other forums
    http://www.vbaexpress.com/forum/faq...._new_faq_item3

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •