π
<-

loll


File hierarchy

 Downloads
 Files created online(47174)
 TI-Nspire
(26850)

 nCreator(4737)

DownloadTélécharger


LicenceLicense : Non spécifiée / IncluseUnspecified / Included

 TéléchargerDownload

Actions



Vote :

ScreenshotAperçu


Informations

Catégorie :Category: nCreator TI-Nspire
Auteur Author: kevincalderon13
Type : Classeur 3.0.1
Page(s) : 1
Taille Size: 6.66 Ko KB
Mis en ligne Uploaded: 01/07/2025 - 08:56:44
Uploadeur Uploader: kevincalderon13 (Profil)
Téléchargements Downloads: 1
Visibilité Visibility: Archive publique
Shortlink : https://tipla.net/a4770256

Description 

Fichier Nspire généré sur TI-Planet.org.

Compatible OS 3.0 et ultérieurs.

<<
import math # === DISTRIBUCIONES === def normal_cdf ( x , mu , sigma ):     z = ( x - mu ) / ( math . sqrt ( 2 ) * sigma )     return 0.5 * ( 1 + math . erf ( z )) def uniform_cdf ( x , a , b ):     if x < a :         return 0     elif x > b :         return 1     else :         return ( x - a ) / ( b - a ) def expon_cdf ( x , lamb ):     if x < 0 :         return 0     else :         return 1 - math . exp ( - lamb * x ) def weibull_cdf ( x , alpha , beta ):     if x < 0 :         return 0     else :         return 1 - math . exp ( - ( x / beta ) ** alpha ) 0 def binomial_cdf ( x , n , p ):     cdf = 0     for k in range ( int ( x ) + 1 ):         coef = math . comb ( n , k )         cdf += coef * ( p ** k ) * (( 1 - p ) ** ( n - k ))     return cdf # === CÁLCULO COMBINACIONES Y COPT === def generar_combinaciones ( n ):     total = 2 ** n     combinaciones = []     for i in range ( total ):         binario = []         for j in range ( n - 1 , - 1 , - 1 ):             bit = ( i >> j ) & 1             binario . append ( bit )         combinaciones . append ( binario )     return combinaciones def calcular_copt ( capacidades , indisponibilidades ):     n = len ( capacidades )     combinaciones = generar_combinaciones ( n )     resultados = []     for estado in combinaciones :         cout = 0         prob = 1         for i in range ( n ):             if estado [ i ] == 1 :                 cout += capacidades [ i ]                 prob *= indisponibilidades [ i ]             else :                 prob *= ( 1 - indisponibilidades [ i ])         resultados . append (( cout , prob ))     unicos = []     for cout , _ in resultados :         if cout not in unicos :             unicos . append ( cout )     unicos . sort ()     tabla = []     for c in unicos :         p_total = 0         for r in resultados :             if r [ 0 ] == c :                 p_total += r [ 1 ]         tabla . append (( c , p_total ))     return tabla def imprimir_tabla_copt ( copt_tabla , total_generacion ):     print ( " n TABLA COPT:" )     print ( " Cout |  Cdis |     P     | 1 - sum(P)" )     suma = 0     for i in range ( len ( copt_tabla )):         cout , p = copt_tabla [ i ]         cdis = total_generacion - cout         if i == 0 :             uno_menos_suma = 1.0         else :             suma += copt_tabla [ i - 1 ][ 1 ]             uno_menos_suma = 1.0 - suma         print ( " {:>5} | {:>5} | {:.6f} | {:.6f} " . format ( cout , cdis , p , uno_menos_suma )) def calcular_lolp_tabla ( copt_tabla , total_generacion , tipo_dist , params ):     print ( " n TABLA LOLP:" )     print ( "Cdis | Load CDF | 1 - CDF |  P(Gi)  | P(Gi)*P(carga>Gi)" )     lolp = 0     for i in range ( len ( copt_tabla )):         cout = copt_tabla [ i ][ 0 ]         p_estado = copt_tabla [ i ][ 1 ]         cdis = cout         capacidad_disponible = total_generacion - cout         if tipo_dist == "normal" :             mu , sigma = params             load_cdf = normal_cdf ( capacidad_disponible , mu , sigma )         elif tipo_dist == "uniform" :             a , b = params             load_cdf = uniform_cdf ( capacidad_disponible , a , b )         elif tipo_dist == "expon" :             lamb = params [ 0 ]             load_cdf = expon_cdf ( capacidad_disponible , lamb )         elif tipo_dist == "weibull" :             alpha , beta = params             load_cdf = weibull_cdf ( capacidad_disponible , alpha , beta )         elif tipo_dist == "binomial" :             n , p = params             load_cdf = binomial_cdf ( capacidad_disponible , n , p )         else :             load_cdf = 0         uno_menos_cdf = 1 - load_cdf         contribucion = p_estado * uno_menos_cdf         lolp += contribucion         print ( " {:>4} | {:>9.6f} | {:>7.6f} | {:>7.6f} | {:>17.6f} " . format (             cdis , load_cdf , uno_menos_cdf , p_estado , contribucion         ))     print ( "LOLP =" , round ( lolp , 6 )) # === ENTRADA DE USUARIO === n = int ( input ( "Num. generadores: " )) capacidades = [] indisponibilidades = [] for i in range ( n ):     cap = float ( input ( "Capacidad G" + str ( i + 1 ) + ": " ))     u = float ( input ( "Indisp G" + str ( i + 1 ) + ": " ))     capacidades . append ( cap )     indisponibilidades . append ( u ) # Selección de distribución print ( "Distribución de la carga:" ) print ( "1. Normal" ) print
[...]

>>

-
Search
-
Social TI-Planet
-
Featured topics
Comparaisons des meilleurs prix pour acheter sa calculatrice !
"1 calculatrice pour tous", le programme solidaire de Texas Instruments. Reçois gratuitement et sans aucune obligation d'achat, 5 calculatrices couleur programmables en Python à donner aux élèves les plus nécessiteux de ton lycée. Tu peux recevoir au choix 5 TI-82 Advanced Edition Python ou bien 5 TI-83 Premium CE Edition Python.
Enseignant(e), reçois gratuitement 1 exemplaire de test de la TI-82 Advanced Edition Python. À demander d'ici le 31 décembre 2024.
Aidez la communauté à documenter les révisions matérielles en listant vos calculatrices graphiques !
1234
-
Donations / Premium
For more contests, prizes, reviews, helping us pay the server and domains...
Donate
Discover the the advantages of a donor account !
JoinRejoignez the donors and/or premium!les donateurs et/ou premium !


Partner and ad
Notre partenaire Jarrety Calculatrices à acheter chez Calcuso
-
Stats.
926 utilisateurs:
>881 invités
>38 membres
>7 robots
Record simultané (sur 6 mois):
7582 utilisateurs (le 25/06/2025)
-
Other interesting websites
Texas Instruments Education
Global | France
 (English / Français)
Banque de programmes TI
ticalc.org
 (English)
La communauté TI-82
tout82.free.fr
 (Français)