Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
T
tp-math
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
Math
2e-annee
tp-math
Commits
293e49d1
Commit
293e49d1
authored
2 years ago
by
thibault.capt
Browse files
Options
Downloads
Patches
Plain Diff
régler probleme - sur une ligne
parent
c7f024a4
Branches
master
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/Main.java
+2
-3
2 additions, 3 deletions
src/Main.java
src/Simplex.java
+3
-4
3 additions, 4 deletions
src/Simplex.java
with
5 additions
and
7 deletions
src/Main.java
+
2
−
3
View file @
293e49d1
...
...
@@ -84,9 +84,8 @@ public class Main {
spx
.
printSimplex
(
spx
.
getMatEcart
(),
"Tableau initial"
,
0
);
// true = phase 1 membres de droite pas admissible | false = phase 2 membres de droite admissible
int
phase
=
spx
.
which_phase
();
if
(
phase
!=
-
1
)
{
spx
.
tabAux
(
phase
);
if
(
spx
.
which_phase
())
{
spx
.
tabAux
(
0
);
// TODO changer ça
}
else
{
spx
.
pivot
(
spx
.
getMatEcart
());
spx
.
printSimplex
(
spx
.
getMatEcart
(),
"Résultat"
,
3
);
...
...
This diff is collapsed.
Click to expand it.
src/Simplex.java
+
3
−
4
View file @
293e49d1
...
...
@@ -59,12 +59,11 @@ public class Simplex {
*
* @return true = phase 1 | false = phase 2
*/
int
which_phase
()
{
int
res
=
-
1
;
boolean
which_phase
()
{
for
(
int
i
=
0
;
i
<
this
.
x
;
i
++)
{
if
(
signe
(
this
.
matEcart
.
getData
(
i
,
this
.
y
-
1
)))
re
s
=
i
;
if
(
signe
(
this
.
matEcart
.
getData
(
i
,
this
.
y
-
1
)))
re
turn
true
;
}
return
res
;
return
false
;
}
void
tabAux
(
int
line
)
{
...
...
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