Changeset 1329


Ignore:
Timestamp:
12/26/24 01:43:47 (3 weeks ago)
Author:
Maciej Komosinski
Message:

Cosmetic

Files:
8 edited

Legend:

Unmodified
Added
Removed
  • cpp/common/nonstd_math.h

    r1318 r1329  
    9595        static constexpr unsigned int FPEX_INVALID = FE_INVALID;
    9696        static constexpr unsigned int FPEX_OVERFLOW = FE_OVERFLOW;
    97 #elif defined IPHONE
     97#elif defined IPHONE || defined MACOS
    9898        // (not implemented but these constants are still needed)
    9999        static constexpr unsigned int FPEX_DIV0 = 0;
  • experiments/frams/foraminifera/data/scripts/foraminifera.expdef

    r1152 r1329  
    8484        //world
    8585        SignalView.mode = 1;
    86         World.wrldwat = 200;
     86        World.wrldwat = 50;
    8787        World.wrldsiz = micronsToFrams(100000);
    8888        World.wrldbnd = 1;
  • experiments/frams/foraminifera/data/scripts/foraminifera.show

    r1152 r1329  
    105105property:
    106106id:feedtrans
    107 name:Energy transfer
    108 type:d 0 2 1 ~0.0001~0.001~0.01
     107name:Energy transfer per second
     108type:d 0 2 1 ~0.0005~0.001~0.002
    109109
    110110property:
    111111id:energy_nut
    112 name:Nutrient energy
    113 type:d 0 2 1 ~28908~108908~188908
     112name:Nutrient energy [ng Corg]
     113# shorter approximate values instead of precise picograms ~28908~108908~188908. Details in http://dx.doi.org/10.1016/j.jocs.2016.09.009
     114type:d 0 2 1 ~≈29~≈109~≈189
    114115
    115116property:
  • experiments/frams/multi-threading/test-mt.cmd

    r703 r1329  
    44
    55rem real task: maximize fitness=velocity
    6 rem frams "ex standard-mt" "ExpProperties.threads=%%T;" "ExpProperties.capacity=%%C;" "UserScripts.script_Multithreading_efficiency_test_args(0,120,10);" -q >exp-evol-speed\test_%%T_%%C.out
     6rem frams "expdef standard-mt" "ExpProperties.threads=%%T;" "ExpProperties.capacity=%%C;" "UserScripts.script_Multithreading_efficiency_test_args(0,120,10);" -q >exp-evol-speed\test_%%T_%%C.out
    77
    88
     
    1212
    1313rem no mutation, no crossover, only cloning - so that the same genotype is always evaluated. Useful to measure "raw" efficiency of parallel computation
    14 rem frams "expdef standard-mt" "ExpProperties.threads=%%T;" "ExpProperties.p_mut=0;" "ExpProperties.p_xov=0;" "ExpProperties.capacity=%%C;" "UserScripts.script_Multithreading_efficiency_test_args(0,6,10);" -q >exp-evol-speed-nochange\test_%%T_%%C.out
     14frams "expdef standard-mt" "ExpProperties.threads=%%T;" "ExpProperties.p_mut=0;" "ExpProperties.p_xov=0;" "ExpProperties.capacity=%%C;" "UserScripts.script_Multithreading_efficiency_test_args(0,6,10);" -q >exp-evol-speed-nochange\test_%%T_%%C.out
    1515
    1616
    1717rem same as above but with a bigger genotype, so that the time spent on script processing is relatively shorter, and more time is used for pure simulation
    18 rem frams "expdef standard-mt" "ExpProperties.threads=%%T;" "ExpProperties.p_mut=0;" "ExpProperties.p_xov=0;" "ExpProperties.capacity=%%C;" "UserScripts.script_Multithreading_efficiency_test_args(6,6,10);" -q >exp-evol-speed-nochange-biggeno\test_%%T_%%C.out
     18frams "expdef standard-mt" "ExpProperties.threads=%%T;" "ExpProperties.p_mut=0;" "ExpProperties.p_xov=0;" "ExpProperties.capacity=%%C;" "UserScripts.script_Multithreading_efficiency_test_args(6,6,10);" -q >exp-evol-speed-nochange-biggeno\test_%%T_%%C.out
    1919
    2020
  • framspy/FramsticksEvolution.py

    r1312 r1329  
    6767
    6868def is_feasible_fitness_value(fitness_value: float) -> bool:
    69         assert isinstance(fitness_value, float), f"feasible_fitness({fitness_value}): argument is not of type float, it is of type {type(fitness_value)}"  # since we are using DEAP, we unfortunately must represent the fitness of an "infeasible solution" as a float...
     69        assert isinstance(fitness_value, float), f"feasible_fitness({fitness_value}): argument is not of type 'float', it is of type '{type(fitness_value)}'"  # since we are using DEAP, we unfortunately must represent the fitness of an "infeasible solution" as a float...
    7070        return fitness_value != FITNESS_VALUE_INFEASIBLE_SOLUTION  # ...so if a valid solution happens to have fitness equal to this special value, such a solution will be considered infeasible :/
    7171
  • framspy/README.txt

    r1195 r1329  
    2727framework ( https://deap.readthedocs.io/en/master/ ) to perform the optimization.
    2828Supports multiple criteria, the generational architecture, and numerous parameters
    29 to customize the evolutionary search. Invalid genotypes are assigned the fitness of "-1"
    30 and the selection process is responsible for their extinction.
     29to customize the evolutionary search.
    3130See "run-deap-examples.cmd".
    3231
  • framspy/dissimilarity/density_distribution.py

    r1325 r1329  
    66
    77class DensityDistribution:
    8     """Two dissimilarity measures based on the spatial distribution of two Models. The Model bounding box is divided into a grid of equally-sized cuboids, the number of which is the 'resolution' parameter cubed. Then the Model surface is covered with points; the density of the surface sampling is determined by the 'density' parameter. There are two versions of the measure. In the default version ('frequency'=False), a signature of each cuboid is the centroid and the number of samples. In the 'frequency'=True version, FFT is computed from the vector containing the number of samples in each cuboid. The final result of the dissimilarity measure is the distance between the signatures and it can be computed using EMD, L1, or L2 norms (the 'metric' parameter).
     8    """Two dissimilarity measures based on the spatial distribution of two Models. The Model bounding box is divided into a grid of equally-sized cuboids, the number of which is the 'resolution' parameter cubed. Then the Model surface is covered with points; the density of the surface sampling is determined by the 'density' parameter. There are two versions of the measure. In the default version ('frequency'=False), the signature of each cuboid is the centroid and the number of samples. In the 'frequency'=True version, FFT is computed from the vector containing the number of samples in each cuboid. The final result of the dissimilarity measure is the distance between the signatures and it can be computed using EMD, L1, or L2 norms (the 'metric' parameter).
    99    """
    1010
     
    4343    def calculateNeighborhood(self,array,mean_coords):
    4444        """ Calculates number of elements for given sample and set ups the center of this sample
    45         to the center of mass (calculated by mean of every coordinate)
     45        to the center of mass (calculated by mean of every coordinate).
    4646        Args:
    4747            array ([[float,float,float],...,[float,float,float]]): array of voxels that belong to given sample.
     
    6161
    6262
    63     def calculateDistPoints(self,point1, point2):
    64         """ Returns Euclidean distance between two points
    65         Args (distribution):
    66             point1 ([float,float,float]) - coordinates of first point
    67             point2 ([float,float,float]) - coordinates of second point
     63    def calculateDistPoints(self, point1, point2):
     64        """ Returns Euclidean distance between two samples (1D for frequency) or points (3D for distribution).
    6865        Args (frequency):
    6966            point1 (float) - value of the first sample
    7067            point2 (float) - value of the second sample
     68        Args (distribution):
     69            point1 ([float,float,float]) - coordinates of the first point
     70            point2 ([float,float,float]) - coordinates of the second point
    7171
    7272        Returns:
     
    7474        """
    7575        if self.frequency:
    76             return abs(point1-point2) # TODO vector instead of scalar returned?
     76            return abs(point1-point2)
    7777        else:
    7878            return np.linalg.norm(point1-point2, ord=2)
    7979
    8080
    81     def calculateDistanceMatrix(self,array1, array2):
     81    def calculateDistanceMatrix(self, array1, array2):
    8282        """
    8383        Args:
     
    138138            steps3 ([float,float,float]): [size of interval for x axis, size of interval for y axis, size of interval for y axis]
    139139
     140        Returns (frequency):
     141           signature np.array(,dtype=np.float64): returns signatuere np.array of coefficients
    140142        Returns (distribution):
    141143           signature [np.array(,dtype=np.float64),np.array(,dtype=np.float64)]: returns signatuere [np.array of points, np.array of weights]
    142         Returns (frequency):
    143            signature np.array(,dtype=np.float64): returns signatuere np.array of coefficients
    144144        """
    145145        edges_x,edges_y,edges_z = edges3
     
    212212
    213213    def getVoxels(self,geno):
    214         """Generates voxels for genotype using frams.ModelGeometry
     214        """Generates voxels for genotype using frams.ModelGeometry.
    215215
    216216        Args:
  • js/standard_expdef_demo/README.txt

    r880 r1329  
    1 This is a simple demo/animation demonstrating the basic behavior of "standard.expdef" experiment definition in Framsticks.
     1This is a simple demo/animation demonstrating the basic behavior of the "standard.expdef" experiment definition in Framsticks.
    22This demo uses Framsticks SDK and three.js.
    33Published online at http://www.framsticks.com/common/std_expdef.html
Note: See TracChangeset for help on using the changeset viewer.