File: roseninputs.py

package info (click to toggle)
mystic 0.4.3-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 5,656 kB
  • sloc: python: 40,894; makefile: 33; sh: 9
file content (36 lines) | stat: -rw-r--r-- 999 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#!/usr/bin/env python
#
# Author: Alta Fang (altafang @caltech and alta @princeton)
# Author: Mike McKerns (mmckerns @caltech and @uqfoundation)
# Copyright (c) 1997-2016 California Institute of Technology.
# Copyright (c) 2016-2024 The Uncertainty Quantification Foundation.
# License: 3-clause BSD.  The full license text is available at:
#  - https://github.com/uqfoundation/mystic/blob/master/LICENSE
"""
roseninputs.py -- inputs for testing the rosenbrock function for testsolvers_pyre.py
"""

from mystic.models import rosen as cost
from mystic.termination import *

ND = 3

# for Differential Evolution: 
NP = 30

from numpy import inf
from mystic.tools import random_seed
random_seed(123)

x0 = [0.8, 1.2, 0.5]

# used with SetStrictRanges
#min_bounds = [-0.999, -0.999, 0.999]     
#max_bounds = [200.001, 100.001, inf]    

termination = CandidateRelativeTolerance()
#termination = VTR()
#termination = ChangeOverGeneration()
#termination = NormalizedChangeOverGeneration()

# End of file