Skip to main content
  • Home
  • Development
  • Documentation
  • Donate
  • Operational login
  • Browse the archive

swh logo
SoftwareHeritage
Software
Heritage
Archive
Features
  • Search

  • Downloads

  • Save code now

  • Add forge now

  • Help

  • 7595b7f
  • /
  • create_random_strategy.m
Raw File Download
Permalinks

To reference or cite the objects present in the Software Heritage archive, permalinks based on SoftWare Hash IDentifiers (SWHIDs) must be used.
Select below a type of object currently browsed in order to display its associated SWHID and permalink.

  • content
  • directory
content badge Iframe embedding
swh:1:cnt:dcf06db424b63f8cf2ce18353629fa09ba6546a4
directory badge Iframe embedding
swh:1:dir:7595b7f884ea123ac63f18b52702d1440bf0baf1
Citations

This interface enables to generate software citations, provided that the root directory of browsed objects contains a citation.cff or codemeta.json file.
Select below a type of object currently browsed in order to generate citations for them.

  • content
  • directory
Generate software citation in BibTex format (requires biblatex-software package)
Generating citation ...
Generate software citation in BibTex format (requires biblatex-software package)
Generating citation ...
create_random_strategy.m
function [ mut_strat_test ] = create_random_strategy( param_range,random_guy_sensors )
param_range_width = param_range(:,3) - param_range(:,1);
 
% then make strategy
random_sensor = find(random_guy_sensors ==1);
if random_sensor == 1 % only-nutrient sensor
    mut_strat_test = [rand*param_range_width(1)+param_range(1,1)...
        (rand*param_range_width(2)+param_range(2,1)) ...
        (rand*param_range_width(3)+param_range(3,1)), 0,param_range(5,1), 0, param_range(7,1), 0, param_range(9,1)]; % I make sure the thresholds are inside the allowed range evene for non-active sensor-modes
elseif random_sensor == 2 % only opp toxin sensor
    mut_strat_test = [rand*param_range_width(1)+param_range(1,1), 0, param_range(3,1) ...
        (rand*param_range_width(4)+param_range(4,1)) ...
        (rand*param_range_width(5)+param_range(5,1)), 0,param_range(7,1), 0, param_range(9,1)];
elseif random_sensor == 3 % only self toxin sensor
    mut_strat_test = [rand*param_range_width(1)+param_range(1,1), 0, param_range(3,1), 0, param_range(5,1), ...
        (rand*param_range_width(6)+param_range(6,1)) ...
        (rand*param_range_width(7)+param_range(7,1)),0,param_range(9,1)];
else % only QS sensor
    mut_strat_test = [rand*param_range_width(1)+param_range(1,1), 0,param_range(3,1), 0, param_range(5,1), 0, param_range(7,1), ...
        (rand*param_range_width(8)+param_range(8,1)) ...
        (rand*param_range_width(9)+param_range(9,1))];
end
 
 
end
 

back to top

Software Heritage — Copyright (C) 2015–2025, The Software Heritage developers. License: GNU AGPLv3+.
The source code of Software Heritage itself is available on our development forge.
The source code files archived by Software Heritage are available under their own copyright and licenses.
Terms of use: Archive access, API— Contact— JavaScript license information— Web API