Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
T
tp_math_simplex_pellandini_noel
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
leo.pellandi
tp_math_simplex_pellandini_noel
Commits
4d6ab915
Commit
4d6ab915
authored
2 years ago
by
lucien.noel
Browse files
Options
Downloads
Patches
Plain Diff
structure faite
parent
6a569d41
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
tp.py
+25
-1
25 additions, 1 deletion
tp.py
with
25 additions
and
1 deletion
tp.py
+
25
−
1
View file @
4d6ab915
...
...
@@ -99,6 +99,22 @@ def creer_matrice_ABC_forme_standard(file_lines):
print
(
""
)
return
(
a
,
b
,
c
)
def
calcule_variable_ecart
(
a
,
b
,
c
):
print
(
"
créé la matrice Z et la rend
"
)
# aj*cj+aj*cj+i=bi
return
0
def
select_colonne_entrante
(
c
):
#rend l'index d'une valeur <0, s'il y en a plusieurs choisi celle avec la plus petite valeur. S'il y en a pas rend -1
return
-
1
def
trouve_ligne_sortante
(
a
,
b
,
i
):
#bj/Aij
return
0
def
pivot_gauss
(
tab
,
i
,
j
):
return
tab
if
__name__
==
"
__main__
"
:
strattime
=
time
.
time
()
...
...
@@ -106,5 +122,13 @@ if __name__ == "__main__":
Lines
=
file1
.
readlines
()
(
a
,
b
,
c
)
=
creer_matrice_ABC_forme_standard
(
Lines
)
z
=
calcule_variable_ecart
(
a
,
b
,
c
)
# identite = un tab de la meme dimension que z remplis de 0 sauf une diagonale de 1
identite
=
0
j
=
select_colonne_entrante
(
c
)
i
=
trouve_ligne_sortante
(
a
,
b
,
i
)
# tab = la fusion de nos tableaux pour le pivot de gauss
tab
=
0
tab
=
pivot_gauss
(
tab
,
i
,
j
)
print
(
"
%s secondes
"
%
(
time
.
time
()
-
strattime
))
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment