PHP Classes

Add constraint to have all X integers

Recommend this page to a friend!

      PHP Simplex Solver  >  All threads  >  Add constraint to have all X integers  >  (Un) Subscribe thread alerts  
Subject:Add constraint to have all X integers
Summary:How to force X to be integers
Messages:1
Author:Arthur Gelcer
Date:2021-11-19 18:42:27
 

  1. Add constraint to have all X integers   Reply   Report abuse  
Picture of Arthur Gelcer Arthur Gelcer - 2021-11-19 18:42:27
First, thank you for sharing this amazing class. It might help me immensely.


I added one new X:
----------------------------------------------------------------
$leftdata=array
(
array(0.5,2,1),
array(1,2,4),
array(5,1,3)
); // Persamaan disebelah kiri

$rightdata=array(24,60,50); //nilai sebelah kanan <- Subject to constraint

$zdata=array(6,14,13); // Persamaan Maximum atau minimum
----------------------------------------------------------------
Result is:
Z=242.76923076923
X2=5.6923076923077
X3=11.692307692308
X1=1.8461538461538

However, I would like to have all X as integers. Is it possible to do it?

Thank you.

 
For more information send a message to info at phpclasses dot org.